diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index b88cb60cc633..83b9fe66ba1b 100644 --- a/toolchain/check/testdata/alias/fail_bool_value.carbon +++ b/toolchain/check/testdata/alias/fail_bool_value.carbon @@ -19,7 +19,7 @@ let a_test: bool = a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: bool = bool_literal false [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/fail_builtins.carbon b/toolchain/check/testdata/alias/fail_builtins.carbon index eda7939a88b3..e0be9b944a9b 100644 --- a/toolchain/check/testdata/alias/fail_builtins.carbon +++ b/toolchain/check/testdata/alias/fail_builtins.carbon @@ -23,7 +23,7 @@ alias b = bool; // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] diff --git a/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon b/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon index d723fa4b98bf..5fdb94b817ba 100644 --- a/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon +++ b/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon @@ -20,8 +20,8 @@ let d: c = {}; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/export_name.carbon b/toolchain/check/testdata/alias/no_prelude/export_name.carbon index fd01a5afabbb..744d36acec29 100644 --- a/toolchain/check/testdata/alias/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/alias/no_prelude/export_name.carbon @@ -155,8 +155,8 @@ var d: D* = &c; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -224,10 +224,10 @@ var d: D* = &c; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -248,9 +248,9 @@ var d: D* = &c; // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %d.var: ref %.5 = var d -// CHECK:STDOUT: %d: ref %.5 = bind_name d, %d.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %d.var: ref %.4 = var d +// CHECK:STDOUT: %d: ref %.4 = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -265,7 +265,7 @@ var d: D* = &c; // CHECK:STDOUT: %.loc7_14: init %C = converted %.loc7_13.1, %.loc7_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_14 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c -// CHECK:STDOUT: %.loc8: %.5 = addr_of %c.ref +// CHECK:STDOUT: %.loc8: %.4 = addr_of %c.ref // CHECK:STDOUT: assign file.%d.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon b/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon index 210acbfe4050..6902f5f0c338 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon @@ -26,8 +26,8 @@ let c_var: c = d; // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %D = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon index 74e853b2eb31..e64f05b71b73 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon @@ -31,7 +31,7 @@ fn F() -> {} { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon index 22b7ccb842f1..6486ed957212 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon @@ -35,8 +35,8 @@ alias b = C; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon index 1c08fcd2f510..47f34ee6bbb7 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon @@ -21,10 +21,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %.1: type = ptr_type %empty_tuple.type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,25 +36,25 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init %.1 = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init %.1 = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_16.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_17: init %empty_tuple.type = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc12_17 -// CHECK:STDOUT: %.loc13_11: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc13_12.1: type = converted %.loc13_11, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_12.2: type = ptr_type %.1 [template = constants.%.2] -// CHECK:STDOUT: %b.var: ref %.2 = var b -// CHECK:STDOUT: %b: ref %.2 = bind_name b, %b.var -// CHECK:STDOUT: %a.ref: ref %.1 = name_ref a, %a -// CHECK:STDOUT: %.loc13_16: %.2 = addr_of %a.ref +// CHECK:STDOUT: %.loc13_11: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc13_12.1: type = converted %.loc13_11, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc13_12.2: type = ptr_type %empty_tuple.type [template = constants.%.1] +// CHECK:STDOUT: %b.var: ref %.1 = var b +// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a +// CHECK:STDOUT: %.loc13_16: %.1 = addr_of %a.ref // CHECK:STDOUT: assign %b.var, %.loc13_16 -// CHECK:STDOUT: %b.ref: ref %.2 = name_ref b, %b -// CHECK:STDOUT: %.loc17_14: %.2 = bind_value %b.ref -// CHECK:STDOUT: %.loc17_13: ref %.1 = deref %.loc17_14 +// CHECK:STDOUT: %b.ref: ref %.1 = name_ref b, %b +// CHECK:STDOUT: %.loc17_14: %.1 = bind_value %b.ref +// CHECK:STDOUT: %.loc17_13: ref %empty_tuple.type = deref %.loc17_14 // CHECK:STDOUT: %c: = bind_alias c, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/import.carbon b/toolchain/check/testdata/alias/no_prelude/import.carbon index f6db011da527..db3f344d7053 100644 --- a/toolchain/check/testdata/alias/no_prelude/import.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import.carbon @@ -171,8 +171,8 @@ var c: () = a_alias_alias; // CHECK:STDOUT: --- var1.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -180,19 +180,19 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .a_alias = %a_alias // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %a.ref: ref %.1 = name_ref a, %a -// CHECK:STDOUT: %a_alias: ref %.1 = bind_alias a_alias, %a +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a +// CHECK:STDOUT: %a_alias: ref %empty_tuple.type = bind_alias a_alias, %a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_14.2: init %.1 = tuple_init () to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_15: init %.1 = converted %.loc4_14.1, %.loc4_14.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc4_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_14.2: init %empty_tuple.type = tuple_init () to file.%a.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_15: init %empty_tuple.type = converted %.loc4_14.1, %.loc4_14.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%a.var, %.loc4_15 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -200,13 +200,13 @@ var c: () = a_alias_alias; // CHECK:STDOUT: --- var2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//var1, inst+5, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.1 = import_ref Main//var1, inst+12, loaded +// CHECK:STDOUT: %import_ref.2: ref %empty_tuple.type = import_ref Main//var1, inst+12, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -217,19 +217,19 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %a_alias.ref: ref %.1 = name_ref a_alias, imports.%import_ref.2 -// CHECK:STDOUT: %a_alias_alias: ref %.1 = bind_alias a_alias_alias, imports.%import_ref.2 -// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %a_alias.ref: ref %empty_tuple.type = name_ref a_alias, imports.%import_ref.2 +// CHECK:STDOUT: %a_alias_alias: ref %empty_tuple.type = bind_alias a_alias_alias, imports.%import_ref.2 +// CHECK:STDOUT: %.loc8_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_alias.ref: ref %.1 = name_ref a_alias, imports.%import_ref.2 -// CHECK:STDOUT: %.loc8_13: init %.1 = tuple_init () to file.%b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_20: init %.1 = converted %a_alias.ref, %.loc8_13 [template = constants.%tuple] +// CHECK:STDOUT: %a_alias.ref: ref %empty_tuple.type = name_ref a_alias, imports.%import_ref.2 +// CHECK:STDOUT: %.loc8_13: init %empty_tuple.type = tuple_init () to file.%b.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_20: init %empty_tuple.type = converted %a_alias.ref, %.loc8_13 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%b.var, %.loc8_20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -237,12 +237,12 @@ var c: () = a_alias_alias; // CHECK:STDOUT: --- fail_var3.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: ref %.1 = import_ref Main//var2, inst+6, loaded [template = ] +// CHECK:STDOUT: %import_ref.1: ref %empty_tuple.type = import_ref Main//var2, inst+6, loaded [template = ] // CHECK:STDOUT: %import_ref.2 = import_ref Main//var2, inst+10, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -253,17 +253,17 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %c.var: ref %.1 = var c -// CHECK:STDOUT: %c: ref %.1 = bind_name c, %c.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %c.var: ref %empty_tuple.type = var c +// CHECK:STDOUT: %c: ref %empty_tuple.type = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_alias_alias.ref: ref %.1 = name_ref a_alias_alias, imports.%import_ref.1 [template = ] -// CHECK:STDOUT: %.loc10_13: init %.1 = tuple_init () to file.%c.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc10_26: init %.1 = converted %a_alias_alias.ref, %.loc10_13 [template = constants.%tuple] +// CHECK:STDOUT: %a_alias_alias.ref: ref %empty_tuple.type = name_ref a_alias_alias, imports.%import_ref.1 [template = ] +// CHECK:STDOUT: %.loc10_13: init %empty_tuple.type = tuple_init () to file.%c.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_26: init %empty_tuple.type = converted %a_alias_alias.ref, %.loc10_13 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%c.var, %.loc10_26 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/import_access.carbon b/toolchain/check/testdata/alias/no_prelude/import_access.carbon index 2df9dec89709..73bfc961913c 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_access.carbon @@ -83,8 +83,8 @@ var inst: Test.A = {}; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/import_order.carbon b/toolchain/check/testdata/alias/no_prelude/import_order.carbon index d27b79c95d6b..60a4b1670475 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_order.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_order.carbon @@ -34,10 +34,10 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.v: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,10 +60,10 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_19.2: type = converted %.loc4_19.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc4_16: %.2 = field_decl v, element0 [template] -// CHECK:STDOUT: %.loc4_22: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_19.2: type = converted %.loc4_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc4_16: %.1 = field_decl v, element0 [template] +// CHECK:STDOUT: %.loc4_22: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -74,13 +74,13 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %empty_tuple.type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,7 +90,7 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: %import_ref.4: type = import_ref Main//a, inst+16, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.5: type = import_ref Main//a, inst+18, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+2, unloaded -// CHECK:STDOUT: %import_ref.7: %.5 = import_ref Main//a, inst+7, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.7: %.4 = import_ref Main//a, inst+7, loaded [template = %.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -128,41 +128,41 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_23.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_24.1: %.2 = struct_literal (%.loc7_23.1) -// CHECK:STDOUT: %.loc7_24.2: ref %.1 = class_element_access file.%d_val.var, element0 -// CHECK:STDOUT: %.loc7_23.2: init %.1 = tuple_init () to %.loc7_24.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_24.3: init %.1 = converted %.loc7_23.1, %.loc7_23.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_23.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_24.1: %.1 = struct_literal (%.loc7_23.1) +// CHECK:STDOUT: %.loc7_24.2: ref %empty_tuple.type = class_element_access file.%d_val.var, element0 +// CHECK:STDOUT: %.loc7_23.2: init %empty_tuple.type = tuple_init () to %.loc7_24.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_24.3: init %empty_tuple.type = converted %.loc7_23.1, %.loc7_23.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_24.4: init %C = class_init (%.loc7_24.3), file.%d_val.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_25: init %C = converted %.loc7_24.1, %.loc7_24.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%d_val.var, %.loc7_25 // CHECK:STDOUT: %d_val.ref: ref %C = name_ref d_val, file.%d_val -// CHECK:STDOUT: %v.ref.loc8: %.5 = name_ref v, imports.%import_ref.7 [template = imports.%.1] -// CHECK:STDOUT: %.loc8_27.1: ref %.1 = class_element_access %d_val.ref, element0 -// CHECK:STDOUT: %.loc8_29.1: %.2 = struct_literal (%.loc8_27.1) -// CHECK:STDOUT: %.loc8_29.2: ref %.1 = class_element_access file.%c_val.var, element0 -// CHECK:STDOUT: %.loc8_27.2: init %.1 = tuple_init () to %.loc8_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_29.3: init %.1 = converted %.loc8_27.1, %.loc8_27.2 [template = constants.%tuple] +// CHECK:STDOUT: %v.ref.loc8: %.4 = name_ref v, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %.loc8_27.1: ref %empty_tuple.type = class_element_access %d_val.ref, element0 +// CHECK:STDOUT: %.loc8_29.1: %.1 = struct_literal (%.loc8_27.1) +// CHECK:STDOUT: %.loc8_29.2: ref %empty_tuple.type = class_element_access file.%c_val.var, element0 +// CHECK:STDOUT: %.loc8_27.2: init %empty_tuple.type = tuple_init () to %.loc8_29.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_29.3: init %empty_tuple.type = converted %.loc8_27.1, %.loc8_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_29.4: init %C = class_init (%.loc8_29.3), file.%c_val.var [template = constants.%struct] // CHECK:STDOUT: %.loc8_30: init %C = converted %.loc8_29.1, %.loc8_29.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c_val.var, %.loc8_30 // CHECK:STDOUT: %c_val.ref: ref %C = name_ref c_val, file.%c_val -// CHECK:STDOUT: %v.ref.loc9: %.5 = name_ref v, imports.%import_ref.7 [template = imports.%.1] -// CHECK:STDOUT: %.loc9_27.1: ref %.1 = class_element_access %c_val.ref, element0 -// CHECK:STDOUT: %.loc9_29.1: %.2 = struct_literal (%.loc9_27.1) -// CHECK:STDOUT: %.loc9_29.2: ref %.1 = class_element_access file.%b_val.var, element0 -// CHECK:STDOUT: %.loc9_27.2: init %.1 = tuple_init () to %.loc9_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc9_29.3: init %.1 = converted %.loc9_27.1, %.loc9_27.2 [template = constants.%tuple] +// CHECK:STDOUT: %v.ref.loc9: %.4 = name_ref v, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %.loc9_27.1: ref %empty_tuple.type = class_element_access %c_val.ref, element0 +// CHECK:STDOUT: %.loc9_29.1: %.1 = struct_literal (%.loc9_27.1) +// CHECK:STDOUT: %.loc9_29.2: ref %empty_tuple.type = class_element_access file.%b_val.var, element0 +// CHECK:STDOUT: %.loc9_27.2: init %empty_tuple.type = tuple_init () to %.loc9_29.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_29.3: init %empty_tuple.type = converted %.loc9_27.1, %.loc9_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_29.4: init %C = class_init (%.loc9_29.3), file.%b_val.var [template = constants.%struct] // CHECK:STDOUT: %.loc9_30: init %C = converted %.loc9_29.1, %.loc9_29.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%b_val.var, %.loc9_30 // CHECK:STDOUT: %b_val.ref: ref %C = name_ref b_val, file.%b_val -// CHECK:STDOUT: %v.ref.loc10: %.5 = name_ref v, imports.%import_ref.7 [template = imports.%.1] -// CHECK:STDOUT: %.loc10_27.1: ref %.1 = class_element_access %b_val.ref, element0 -// CHECK:STDOUT: %.loc10_29.1: %.2 = struct_literal (%.loc10_27.1) -// CHECK:STDOUT: %.loc10_29.2: ref %.1 = class_element_access file.%a_val.var, element0 -// CHECK:STDOUT: %.loc10_27.2: init %.1 = tuple_init () to %.loc10_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc10_29.3: init %.1 = converted %.loc10_27.1, %.loc10_27.2 [template = constants.%tuple] +// CHECK:STDOUT: %v.ref.loc10: %.4 = name_ref v, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %.loc10_27.1: ref %empty_tuple.type = class_element_access %b_val.ref, element0 +// CHECK:STDOUT: %.loc10_29.1: %.1 = struct_literal (%.loc10_27.1) +// CHECK:STDOUT: %.loc10_29.2: ref %empty_tuple.type = class_element_access file.%a_val.var, element0 +// CHECK:STDOUT: %.loc10_27.2: init %empty_tuple.type = tuple_init () to %.loc10_29.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_29.3: init %empty_tuple.type = converted %.loc10_27.1, %.loc10_27.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_29.4: init %C = class_init (%.loc10_29.3), file.%a_val.var [template = constants.%struct] // CHECK:STDOUT: %.loc10_30: init %C = converted %.loc10_29.1, %.loc10_29.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%a_val.var, %.loc10_30 diff --git a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon index c271d9248504..4cf93fb964e0 100644 --- a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon @@ -23,13 +23,13 @@ fn F() -> NS.a { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.v: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -61,10 +61,10 @@ fn F() -> NS.a { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_19.2: type = converted %.loc11_19.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_16: %.2 = field_decl v, element0 [template] -// CHECK:STDOUT: %.loc11_22: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_19.2: type = converted %.loc11_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_16: %.1 = field_decl v, element0 [template] +// CHECK:STDOUT: %.loc11_22: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -73,11 +73,11 @@ fn F() -> NS.a { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_18.1: %.3 = struct_literal (%.loc19_17.1) -// CHECK:STDOUT: %.loc19_18.2: ref %.1 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc19_17.2: init %.1 = tuple_init () to %.loc19_18.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_18.3: init %.1 = converted %.loc19_17.1, %.loc19_17.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc19_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_18.1: %.2 = struct_literal (%.loc19_17.1) +// CHECK:STDOUT: %.loc19_18.2: ref %empty_tuple.type = class_element_access %return, element0 +// CHECK:STDOUT: %.loc19_17.2: init %empty_tuple.type = tuple_init () to %.loc19_18.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc19_18.3: init %empty_tuple.type = converted %.loc19_17.1, %.loc19_17.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc19_18.4: init %C = class_init (%.loc19_18.3), %return [template = constants.%struct] // CHECK:STDOUT: %.loc19_19: init %C = converted %.loc19_18.1, %.loc19_18.4 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_19 to %return @@ -85,12 +85,12 @@ fn F() -> NS.a { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_22.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_23.1: %.3 = struct_literal (%.loc16_22.1) +// CHECK:STDOUT: %.loc16_22.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_23.1: %.2 = struct_literal (%.loc16_22.1) // CHECK:STDOUT: %.loc16_23.2: ref %C = temporary_storage -// CHECK:STDOUT: %.loc16_23.3: ref %.1 = class_element_access %.loc16_23.2, element0 -// CHECK:STDOUT: %.loc16_22.2: init %.1 = tuple_init () to %.loc16_23.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_23.4: init %.1 = converted %.loc16_22.1, %.loc16_22.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc16_23.3: ref %empty_tuple.type = class_element_access %.loc16_23.2, element0 +// CHECK:STDOUT: %.loc16_22.2: init %empty_tuple.type = tuple_init () to %.loc16_23.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_23.4: init %empty_tuple.type = converted %.loc16_22.1, %.loc16_22.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc16_23.5: init %C = class_init (%.loc16_23.4), %.loc16_23.2 [template = constants.%struct] // CHECK:STDOUT: %.loc16_23.6: ref %C = temporary %.loc16_23.2, %.loc16_23.5 // CHECK:STDOUT: %.loc16_24.1: ref %C = converted %.loc16_23.1, %.loc16_23.6 diff --git a/toolchain/check/testdata/alias/no_prelude/local.carbon b/toolchain/check/testdata/alias/no_prelude/local.carbon index bebcc075b1a2..00a6e6cfc0fe 100644 --- a/toolchain/check/testdata/alias/no_prelude/local.carbon +++ b/toolchain/check/testdata/alias/no_prelude/local.carbon @@ -17,10 +17,10 @@ fn F() -> () { // CHECK:STDOUT: --- local.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,31 +28,31 @@ fn F() -> () { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc11_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.1 { +// CHECK:STDOUT: fn @F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init %.1 = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init %.1 = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_16.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_17: init %empty_tuple.type = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc12_17 -// CHECK:STDOUT: %a.ref: ref %.1 = name_ref a, %a -// CHECK:STDOUT: %b: ref %.1 = bind_alias b, %a -// CHECK:STDOUT: %b.ref: ref %.1 = name_ref b, %b -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc14: %.1 = converted %b.ref, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_alias b, %a +// CHECK:STDOUT: %b.ref: ref %empty_tuple.type = name_ref b, %b +// CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14: %empty_tuple.type = converted %b.ref, %tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/array_in_place.carbon b/toolchain/check/testdata/array/array_in_place.carbon index abff0b2b64c6..ce8353543638 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -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: } diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index 1dc2f61dd707..3f1085372f67 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -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: } diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index 268ca77b45b7..7ffc6b86ae55 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -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: } diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index 460f22dd5ff3..5d3194b87369 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -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: } diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 8b95a6dd1898..eb566d24e60f 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -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: } diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index a9fd5ff62978..bd3576910471 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -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: diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index 5e0e116addde..11a7f4b58f6c 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -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 = ] diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 0fcb86888b42..374479103a25 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -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 , i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = 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, [template = ] // CHECK:STDOUT: %.loc30_32: type = array_type , [template = ] // CHECK:STDOUT: %b.var: ref = 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: diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index 3fb547b0262a..9b38fb5e769f 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -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: diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index a6ded308cfd9..af697887891c 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -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, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon index 7c289645d91c..5a8ef99180cf 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon @@ -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 = ] // CHECK:STDOUT: %.loc15_34.2: i32 = bind_value %.loc15_34.1 // CHECK:STDOUT: assign file.%b.var, %.loc15_34.2 diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 9458cbb59cf6..037def18ba8f 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -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, [template = ] // CHECK:STDOUT: assign file.%a.var, -// 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, [template = ] // CHECK:STDOUT: assign file.%b.var, -// 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, -// 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, // 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: diff --git a/toolchain/check/testdata/array/fail_undefined_bound.carbon b/toolchain/check/testdata/array/fail_undefined_bound.carbon index e7c869a072f6..2ccdfe802d3a 100644 --- a/toolchain/check/testdata/array/fail_undefined_bound.carbon +++ b/toolchain/check/testdata/array/fail_undefined_bound.carbon @@ -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: diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 56bf9c8fd58d..9091f0989024 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -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 diff --git a/toolchain/check/testdata/array/generic_empty.carbon b/toolchain/check/testdata/array/generic_empty.carbon index 49c333507af2..ef3d0f202362 100644 --- a/toolchain/check/testdata/array/generic_empty.carbon +++ b/toolchain/check/testdata/array/generic_empty.carbon @@ -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: } diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 2f261aaf4ffd..7e26aafd1829 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -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 diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 0f70bcb6f7fe..b9799ac1c2cc 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -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: } diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 513f5cc380ad..0fe0ab04b9be 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -110,20 +110,20 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %A = struct_value (%.6, %.7) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %A = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.8: = complete_type_witness %A [template] -// CHECK:STDOUT: %.9: type = ptr_type %B [template] +// CHECK:STDOUT: %.7: = complete_type_witness %A [template] +// CHECK:STDOUT: %.8: type = ptr_type %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -155,7 +155,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %A.ref.loc18: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc21: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %B.ref.loc22: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc22: type = ptr_type %B [template = constants.%.9] +// CHECK:STDOUT: %.loc22: type = ptr_type %B [template = constants.%.8] // CHECK:STDOUT: %B.ref.loc24: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %b_factory.var: ref %B = var b_factory // CHECK:STDOUT: %b_factory: ref %B = bind_name b_factory, %b_factory.var @@ -165,11 +165,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl y, element1 [template] +// CHECK:STDOUT: %.loc6_8: %.1 = field_decl y, element1 [template] // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %return.patt: %A = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %A = out_param_pattern %return.patt, runtime_param0 @@ -178,7 +178,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %return.param: ref %A = out_param runtime_param0 // CHECK:STDOUT: %return: ref %A = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -190,7 +190,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A -// CHECK:STDOUT: %.loc15: = complete_type_witness %A [template = constants.%.8] +// CHECK:STDOUT: %.loc15: = complete_type_witness %A [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -200,13 +200,13 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %A { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_18: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_26: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_27.1: %.3 = struct_literal (%.loc9_18, %.loc9_26) +// CHECK:STDOUT: %.loc9_18: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_26: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_27.1: %.2 = struct_literal (%.loc9_18, %.loc9_26) // CHECK:STDOUT: %.loc9_27.2: ref i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_27.3: init i32 = initialize_from %.loc9_18 to %.loc9_27.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_27.3: init i32 = initialize_from %.loc9_18 to %.loc9_27.2 [template = constants.%.5] // CHECK:STDOUT: %.loc9_27.4: ref i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc9_27.5: init i32 = initialize_from %.loc9_26 to %.loc9_27.4 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_27.5: init i32 = initialize_from %.loc9_26 to %.loc9_27.4 [template = constants.%.6] // CHECK:STDOUT: %.loc9_27.6: init %A = class_init (%.loc9_27.3, %.loc9_27.5), %return [template = constants.%struct] // CHECK:STDOUT: %.loc9_28: init %A = converted %.loc9_27.1, %.loc9_27.6 [template = constants.%struct] // CHECK:STDOUT: return %.loc9_28 to %return @@ -214,13 +214,13 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_22: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_30: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc17_31.1: %.3 = struct_literal (%.loc17_22, %.loc17_30) +// CHECK:STDOUT: %.loc17_22: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_30: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_31.1: %.2 = struct_literal (%.loc17_22, %.loc17_30) // CHECK:STDOUT: %.loc17_31.2: ref i32 = class_element_access file.%a_ref.var, element0 -// CHECK:STDOUT: %.loc17_31.3: init i32 = initialize_from %.loc17_22 to %.loc17_31.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_31.3: init i32 = initialize_from %.loc17_22 to %.loc17_31.2 [template = constants.%.5] // CHECK:STDOUT: %.loc17_31.4: ref i32 = class_element_access file.%a_ref.var, element1 -// CHECK:STDOUT: %.loc17_31.5: init i32 = initialize_from %.loc17_30 to %.loc17_31.4 [template = constants.%.7] +// CHECK:STDOUT: %.loc17_31.5: init i32 = initialize_from %.loc17_30 to %.loc17_31.4 [template = constants.%.6] // CHECK:STDOUT: %.loc17_31.6: init %A = class_init (%.loc17_31.3, %.loc17_31.5), file.%a_ref.var [template = constants.%struct] // CHECK:STDOUT: %.loc17_32: init %A = converted %.loc17_31.1, %.loc17_31.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%a_ref.var, %.loc17_32 @@ -236,8 +236,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %B.ref.loc22: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc22_25.1: ref %B = as_compatible %a_ref.ref.loc22 // CHECK:STDOUT: %.loc22_25.2: ref %B = converted %a_ref.ref.loc22, %.loc22_25.1 -// CHECK:STDOUT: %.loc22_17: %.9 = addr_of %.loc22_25.2 -// CHECK:STDOUT: %b_ptr: %.9 = bind_name b_ptr, %.loc22_17 +// CHECK:STDOUT: %.loc22_17: %.8 = addr_of %.loc22_25.2 +// CHECK:STDOUT: %b_ptr: %.8 = bind_name b_ptr, %.loc22_17 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, @A.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_5: ref %B = splice_block file.%b_factory.var {} @@ -254,10 +254,10 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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: = complete_type_witness i32 [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: = complete_type_witness i32 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -289,7 +289,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc5_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_12.2: type = converted %int.make_type_32, %.loc5_12.1 [template = i32] // CHECK:STDOUT: adapt_decl i32 -// CHECK:STDOUT: %.loc6: = complete_type_witness i32 [template = constants.%.2] +// CHECK:STDOUT: %.loc6: = complete_type_witness i32 [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -299,13 +299,13 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_13: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_13: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_32.loc8, %.loc8_18.1 [template = i32] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc8_23.1: %A = as_compatible %.loc8_13 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_23.2: %A = converted %.loc8_13, %.loc8_23.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_23.1: %A = as_compatible %.loc8_13 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_23.2: %A = converted %.loc8_13, %.loc8_23.1 [template = constants.%.2] // CHECK:STDOUT: %a: %A = bind_name a, %.loc8_23.2 // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] @@ -322,8 +322,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] @@ -358,7 +358,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc4_18: %.1 = struct_literal () // CHECK:STDOUT: %.loc4_19: type = converted %.loc4_18, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: adapt_decl %.1 -// CHECK:STDOUT: %.loc4_21: = complete_type_witness %.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_21: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -404,17 +404,17 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %A [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %A = struct_value (%.7, %.8) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %A [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %A = struct_value (%.6, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -447,12 +447,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl y, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_8: %.1 = field_decl y, element1 [template] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -463,7 +463,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A -// CHECK:STDOUT: %.loc11: = complete_type_witness %A [template = constants.%.6] +// CHECK:STDOUT: %.loc11: = complete_type_witness %A [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -473,15 +473,15 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_25: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_33: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_34.1: %.3 = struct_literal (%.loc13_25, %.loc13_33) +// CHECK:STDOUT: %.loc13_25: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_33: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_34.1: %.2 = struct_literal (%.loc13_25, %.loc13_33) // CHECK:STDOUT: %A.ref.loc13: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc13_34.2: ref %A = temporary_storage // CHECK:STDOUT: %.loc13_34.3: ref i32 = class_element_access %.loc13_34.2, element0 -// CHECK:STDOUT: %.loc13_34.4: init i32 = initialize_from %.loc13_25 to %.loc13_34.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_34.4: init i32 = initialize_from %.loc13_25 to %.loc13_34.3 [template = constants.%.6] // CHECK:STDOUT: %.loc13_34.5: ref i32 = class_element_access %.loc13_34.2, element1 -// CHECK:STDOUT: %.loc13_34.6: init i32 = initialize_from %.loc13_33 to %.loc13_34.5 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_34.6: init i32 = initialize_from %.loc13_33 to %.loc13_34.5 [template = constants.%.7] // CHECK:STDOUT: %.loc13_34.7: init %A = class_init (%.loc13_34.4, %.loc13_34.6), %.loc13_34.2 [template = constants.%struct] // CHECK:STDOUT: %.loc13_34.8: ref %A = temporary %.loc13_34.2, %.loc13_34.7 // CHECK:STDOUT: %.loc13_36: ref %A = converted %.loc13_34.1, %.loc13_34.8 @@ -490,15 +490,15 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc13_42.2: ref %B = converted %.loc13_36, %.loc13_42.1 // CHECK:STDOUT: %.loc13_42.3: %B = bind_value %.loc13_42.2 // CHECK:STDOUT: %b_value: %B = bind_name b_value, %.loc13_42.3 -// CHECK:STDOUT: %.loc24_24: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc24_32: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc24_33.1: %.3 = struct_literal (%.loc24_24, %.loc24_32) +// CHECK:STDOUT: %.loc24_24: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc24_32: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_33.1: %.2 = struct_literal (%.loc24_24, %.loc24_32) // CHECK:STDOUT: %A.ref.loc24: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc24_33.2: ref %A = temporary_storage // CHECK:STDOUT: %.loc24_33.3: ref i32 = class_element_access %.loc24_33.2, element0 -// CHECK:STDOUT: %.loc24_33.4: init i32 = initialize_from %.loc24_24 to %.loc24_33.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_33.4: init i32 = initialize_from %.loc24_24 to %.loc24_33.3 [template = constants.%.6] // CHECK:STDOUT: %.loc24_33.5: ref i32 = class_element_access %.loc24_33.2, element1 -// CHECK:STDOUT: %.loc24_33.6: init i32 = initialize_from %.loc24_32 to %.loc24_33.5 [template = constants.%.8] +// CHECK:STDOUT: %.loc24_33.6: init i32 = initialize_from %.loc24_32 to %.loc24_33.5 [template = constants.%.7] // CHECK:STDOUT: %.loc24_33.7: init %A = class_init (%.loc24_33.4, %.loc24_33.6), %.loc24_33.2 [template = constants.%struct] // CHECK:STDOUT: %.loc24_33.8: ref %A = temporary %.loc24_33.2, %.loc24_33.7 // CHECK:STDOUT: %.loc24_35: ref %A = converted %.loc24_33.1, %.loc24_33.8 @@ -515,15 +515,15 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %A [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %A [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] // CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] @@ -533,15 +533,15 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%B) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @As(%B) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %struct: %.3 = struct_value (%.7) [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -554,7 +554,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+7, loaded [template = constants.%As] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+14, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+36, loaded [symbolic = @As.%.2 (constants.%.12)] +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.7) = import_ref Core//prelude/operators/as, inst+36, loaded [symbolic = @As.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+29, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+29, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+29, unloaded @@ -584,8 +584,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %.2: @As.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @As.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -599,8 +599,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -610,7 +610,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A -// CHECK:STDOUT: %.loc10: = complete_type_witness %A [template = constants.%.6] +// CHECK:STDOUT: %.loc10: = complete_type_witness %A [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -628,11 +628,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_18: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_19.1: %.3 = struct_literal (%.loc21_18) +// CHECK:STDOUT: %.loc21_18: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc21_19.1: %.2 = struct_literal (%.loc21_18) // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %struct: %.3 = struct_value (%.loc21_18) [template = constants.%struct] -// CHECK:STDOUT: %.loc21_19.2: %.3 = converted %.loc21_19.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.loc21_18) [template = constants.%struct] +// CHECK:STDOUT: %.loc21_19.2: %.2 = converted %.loc21_19.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc21_21: %B = converted %.loc21_19.1, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return @@ -668,7 +668,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.10 -// CHECK:STDOUT: %.2 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/as_type.carbon b/toolchain/check/testdata/as/as_type.carbon index b49e1d45284a..9cb62578ad55 100644 --- a/toolchain/check/testdata/as/as_type.carbon +++ b/toolchain/check/testdata/as/as_type.carbon @@ -14,10 +14,10 @@ let t: type = (i32, i32) as type; // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,12 +43,12 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_24: %.2 = tuple_literal (%int.make_type_32.loc11_16, %int.make_type_32.loc11_21) +// CHECK:STDOUT: %.loc11_24: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_16, %int.make_type_32.loc11_21) // CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_32.loc11_16 [template = i32] // CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_32.loc11_16, %.loc11_26.1 [template = i32] // CHECK:STDOUT: %.loc11_26.3: type = value_of_initializer %int.make_type_32.loc11_21 [template = i32] // CHECK:STDOUT: %.loc11_26.4: type = converted %int.make_type_32.loc11_21, %.loc11_26.3 [template = i32] -// CHECK:STDOUT: %.loc11_26.5: type = converted %.loc11_24, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_26.5: type = converted %.loc11_24, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %t: type = bind_name t, %.loc11_26.5 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index d426a678e684..34ebe146ccca 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -16,11 +16,11 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,7 +54,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_10: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_10: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_32.loc12, %.loc12_15.1 [template = i32] diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index 6a8049fe367b..2b01ed1080d9 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -20,12 +20,12 @@ let n: (i32, i32) = 1 as (i32, 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: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] // CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] @@ -35,14 +35,14 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%.3) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @As(%.3) [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%tuple.type.2) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @As(%tuple.type.2) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %As.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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,7 +55,7 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+7, loaded [template = constants.%As] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+14, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+36, loaded [symbolic = @As.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+36, loaded [symbolic = @As.%.2 (constants.%.7)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+29, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+29, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+29, unloaded @@ -69,12 +69,12 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc17_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_17.1: %.2 = tuple_literal (%int.make_type_32.loc17_9, %int.make_type_32.loc17_14) +// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc17_9, %int.make_type_32.loc17_14) // CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32] // CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_32.loc17_9, %.loc17_17.2 [template = i32] // CHECK:STDOUT: %.loc17_17.4: type = value_of_initializer %int.make_type_32.loc17_14 [template = i32] // CHECK:STDOUT: %.loc17_17.5: type = converted %int.make_type_32.loc17_14, %.loc17_17.4 [template = i32] -// CHECK:STDOUT: %.loc17_17.6: type = converted %.loc17_17.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc17_17.6: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(constants.%Dest: type) { @@ -86,8 +86,8 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %.2: @As.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @As.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -109,18 +109,18 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_21: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_21: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32.loc17_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc17_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_35.1: %.2 = tuple_literal (%int.make_type_32.loc17_27, %int.make_type_32.loc17_32) +// CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc17_27, %int.make_type_32.loc17_32) // CHECK:STDOUT: %.loc17_35.2: type = value_of_initializer %int.make_type_32.loc17_27 [template = i32] // CHECK:STDOUT: %.loc17_35.3: type = converted %int.make_type_32.loc17_27, %.loc17_35.2 [template = i32] // CHECK:STDOUT: %.loc17_35.4: type = value_of_initializer %int.make_type_32.loc17_32 [template = i32] // CHECK:STDOUT: %.loc17_35.5: type = converted %int.make_type_32.loc17_32, %.loc17_35.4 [template = i32] -// CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_23.1: %.3 = converted %.loc17_21, [template = ] +// CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc17_23.1: %tuple.type.2 = converted %.loc17_21, [template = ] // CHECK:STDOUT: %.loc17_23.2: i32 = tuple_access %.loc17_23.1, element0 [template = ] -// CHECK:STDOUT: %n: %.3 = bind_name n, +// CHECK:STDOUT: %n: %tuple.type.2 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,16 +145,16 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(constants.%.3) { -// CHECK:STDOUT: %Dest => constants.%.3 -// CHECK:STDOUT: %Dest.patt => constants.%.3 +// CHECK:STDOUT: specific @As(constants.%tuple.type.2) { +// CHECK:STDOUT: %Dest => constants.%tuple.type.2 +// CHECK:STDOUT: %Dest.patt => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %As.type => constants.%As.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index 07facb9fb23f..f124bf673637 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -20,10 +20,10 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [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] @@ -33,14 +33,14 @@ let n: i32 = 1 as 2; // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [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: %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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ let n: i32 = 1 as 2; // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -79,8 +79,8 @@ let n: i32 = 1 as 2; // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -102,8 +102,8 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_14: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc17_19.1: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc17_14: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_19.1: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %.loc17_19.2: type = converted %.loc17_19.1, [template = ] // CHECK:STDOUT: %n: i32 = bind_name n, // CHECK:STDOUT: return @@ -139,7 +139,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/identity.carbon b/toolchain/check/testdata/as/identity.carbon index 191a0ae50cba..abeafa2f2c67 100644 --- a/toolchain/check/testdata/as/identity.carbon +++ b/toolchain/check/testdata/as/identity.carbon @@ -35,10 +35,10 @@ fn Initializing() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Value.type: type = fn_type @Value [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Value: %Value.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = ptr_type %X [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = ptr_type %X [template] // CHECK:STDOUT: %Reference.type: type = fn_type @Reference [template] // CHECK:STDOUT: %Reference: %Reference.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] @@ -74,13 +74,13 @@ fn Initializing() { // CHECK:STDOUT: %n: %X = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %Reference.decl: %Reference.type = fn_decl @Reference [template = constants.%Reference] { -// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref.loc21: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc21: type = ptr_type %X [template = constants.%.5] -// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %.loc21: type = ptr_type %X [template = constants.%.4] +// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %return.patt: %X = return_slot_pattern @@ -109,15 +109,15 @@ fn Initializing() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Reference(%p.param_patt: %.5) { +// CHECK:STDOUT: fn @Reference(%p.param_patt: %.4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %X.ref.loc22_10: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc22_11: type = ptr_type %X [template = constants.%.5] -// CHECK:STDOUT: %p.ref: %.5 = name_ref p, %p +// CHECK:STDOUT: %.loc22_11: type = ptr_type %X [template = constants.%.4] +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p // CHECK:STDOUT: %.loc22_17: ref %X = deref %p.ref // CHECK:STDOUT: %X.ref.loc22_23: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc22_15: %.5 = addr_of %.loc22_17 -// CHECK:STDOUT: %q: %.5 = bind_name q, %.loc22_15 +// CHECK:STDOUT: %.loc22_15: %.4 = addr_of %.loc22_17 +// CHECK:STDOUT: %q: %.4 = bind_name q, %.loc22_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/no_prelude/tuple.carbon b/toolchain/check/testdata/as/no_prelude/tuple.carbon index 91e0f8168e53..374d66132ce5 100644 --- a/toolchain/check/testdata/as/no_prelude/tuple.carbon +++ b/toolchain/check/testdata/as/no_prelude/tuple.carbon @@ -31,15 +31,15 @@ fn Var() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %Let.type: type = fn_type @Let [template] // CHECK:STDOUT: %Let: %Let.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%X, %X) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.6, %.6) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%X, %X) [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.3, %.3) [template] +// CHECK:STDOUT: %.4: type = ptr_type %tuple.type.3 [template] // CHECK:STDOUT: %Var.type: type = fn_type @Var [template] // CHECK:STDOUT: %Var: %Var.type = struct_value () [template] // CHECK:STDOUT: } @@ -77,26 +77,26 @@ fn Var() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %X.ref.loc19_11: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %X.ref.loc19_14: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc19_15.1: %.4 = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14) -// CHECK:STDOUT: %.loc19_15.2: type = converted %.loc19_15.1, constants.%.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_15.1: %tuple.type.1 = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14) +// CHECK:STDOUT: %.loc19_15.2: type = converted %.loc19_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Make.ref.loc19_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc19_24.1: ref %X = temporary_storage // CHECK:STDOUT: %Make.call.loc19_24: init %X = call %Make.ref.loc19_20() to %.loc19_24.1 // CHECK:STDOUT: %Make.ref.loc19_28: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc19_32.1: ref %X = temporary_storage // CHECK:STDOUT: %Make.call.loc19_32: init %X = call %Make.ref.loc19_28() to %.loc19_32.1 -// CHECK:STDOUT: %.loc19_34: %.5 = tuple_literal (%Make.call.loc19_24, %Make.call.loc19_32) +// CHECK:STDOUT: %.loc19_34: %tuple.type.2 = tuple_literal (%Make.call.loc19_24, %Make.call.loc19_32) // CHECK:STDOUT: %X.ref.loc19_40: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %X.ref.loc19_43: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc19_44.1: %.4 = tuple_literal (%X.ref.loc19_40, %X.ref.loc19_43) -// CHECK:STDOUT: %.loc19_44.2: type = converted %.loc19_44.1, constants.%.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_44.1: %tuple.type.1 = tuple_literal (%X.ref.loc19_40, %X.ref.loc19_43) +// CHECK:STDOUT: %.loc19_44.2: type = converted %.loc19_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc19_24.2: ref %X = temporary %.loc19_24.1, %Make.call.loc19_24 // CHECK:STDOUT: %.loc19_24.3: %X = bind_value %.loc19_24.2 // CHECK:STDOUT: %.loc19_32.2: ref %X = temporary %.loc19_32.1, %Make.call.loc19_32 // CHECK:STDOUT: %.loc19_32.3: %X = bind_value %.loc19_32.2 -// CHECK:STDOUT: %tuple: %.5 = tuple_value (%.loc19_24.3, %.loc19_32.3) -// CHECK:STDOUT: %.loc19_45: %.5 = converted %.loc19_34, %tuple -// CHECK:STDOUT: %a: %.5 = bind_name a, %.loc19_45 +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc19_24.3, %.loc19_32.3) +// CHECK:STDOUT: %.loc19_45: %tuple.type.2 = converted %.loc19_34, %tuple +// CHECK:STDOUT: %a: %tuple.type.2 = bind_name a, %.loc19_45 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -104,23 +104,23 @@ fn Var() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %X.ref.loc24_11: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %X.ref.loc24_14: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc24_15.1: %.4 = tuple_literal (%X.ref.loc24_11, %X.ref.loc24_14) -// CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %b.var: ref %.5 = var b -// CHECK:STDOUT: %b: ref %.5 = bind_name b, %b.var +// CHECK:STDOUT: %.loc24_15.1: %tuple.type.1 = tuple_literal (%X.ref.loc24_11, %X.ref.loc24_14) +// CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b +// CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %Make.ref.loc24_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_34.1: ref %X = tuple_access %b.var, element0 // CHECK:STDOUT: %Make.call.loc24_24: init %X = call %Make.ref.loc24_20() to %.loc24_34.1 // CHECK:STDOUT: %Make.ref.loc24_28: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_34.2: ref %X = tuple_access %b.var, element1 // CHECK:STDOUT: %Make.call.loc24_32: init %X = call %Make.ref.loc24_28() to %.loc24_34.2 -// CHECK:STDOUT: %.loc24_34.3: %.5 = tuple_literal (%Make.call.loc24_24, %Make.call.loc24_32) +// CHECK:STDOUT: %.loc24_34.3: %tuple.type.2 = tuple_literal (%Make.call.loc24_24, %Make.call.loc24_32) // CHECK:STDOUT: %X.ref.loc24_40: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %X.ref.loc24_43: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc24_44.1: %.4 = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43) -// CHECK:STDOUT: %.loc24_44.2: type = converted %.loc24_44.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %.loc24_34.4: init %.5 = tuple_init (%Make.call.loc24_24, %Make.call.loc24_32) to %b.var -// CHECK:STDOUT: %.loc24_45: init %.5 = converted %.loc24_34.3, %.loc24_34.4 +// CHECK:STDOUT: %.loc24_44.1: %tuple.type.1 = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43) +// CHECK:STDOUT: %.loc24_44.2: type = converted %.loc24_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc24_34.4: init %tuple.type.2 = tuple_init (%Make.call.loc24_24, %Make.call.loc24_32) to %b.var +// CHECK:STDOUT: %.loc24_45: init %tuple.type.2 = converted %.loc24_34.3, %.loc24_34.4 // CHECK:STDOUT: assign %b.var, %.loc24_45 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 65b6135aede9..f73dd7913fb6 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -27,11 +27,11 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] // 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 = unbound_element_type %X, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %X, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] // CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] @@ -41,28 +41,28 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %As.type.3: type = interface_type @As, @As(%X) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @As(%X) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %As.type.3, %Convert.type.3 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: = interface_witness (%Convert.2) [template] -// CHECK:STDOUT: %.10: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %As.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.9: type = ptr_type %.2 [template] // CHECK:STDOUT: %As.type.4: type = interface_type @As, @As(i32) [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @As(i32) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %As.type.4, %Convert.type.5 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.14: i32 = int_value 4 [template] -// CHECK:STDOUT: %.15: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.16: = bound_method %.14, %Convert.2 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %As.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.13: i32 = int_value 4 [template] +// CHECK:STDOUT: %.14: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.15: = bound_method %.13, %Convert.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,7 +75,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, inst+7, loaded [template = constants.%As] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+14, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+36, loaded [symbolic = @As.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+36, loaded [symbolic = @As.%.2 (constants.%.14)] // CHECK:STDOUT: %import_ref.5: @As.%Convert.type (%Convert.type.1) = import_ref Core//prelude/operators/as, inst+29, loaded [symbolic = @As.%Convert (constants.%Convert.1)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+29, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+29, unloaded @@ -121,8 +121,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] -// CHECK:STDOUT: %.2: @As.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @As.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -148,7 +148,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -171,7 +171,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.13] +// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -182,8 +182,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X @@ -203,7 +203,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: fn @Convert.2[%self.param_patt: i32]() -> %return: %X { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: i32 = name_ref self, %self -// CHECK:STDOUT: %.loc16_51.1: %.3 = struct_literal (%self.ref) +// CHECK:STDOUT: %.loc16_51.1: %.2 = struct_literal (%self.ref) // CHECK:STDOUT: %.loc16_51.2: ref i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc16_51.3: init i32 = initialize_from %self.ref to %.loc16_51.2 // CHECK:STDOUT: %.loc16_51.4: init %X = class_init (%.loc16_51.3), %return @@ -214,7 +214,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %X]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %X = name_ref self, %self -// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] +// CHECK:STDOUT: %n.ref: %.1 = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] // CHECK:STDOUT: %.loc20_45.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc20_45.2: i32 = bind_value %.loc20_45.1 // CHECK:STDOUT: return %.loc20_45.2 @@ -222,13 +222,13 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_16: i32 = int_value 4 [template = constants.%.14] +// CHECK:STDOUT: %.loc23_16: i32 = int_value 4 [template = constants.%.13] // CHECK:STDOUT: %int.make_type_32.loc23_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_32.loc23_21 [template = i32] // CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_32.loc23_21, %.loc23_21.1 [template = i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc23_26.1: %Convert.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc23_26.2: = bound_method %.loc23_16, %.loc23_26.1 [template = constants.%.16] +// CHECK:STDOUT: %.loc23_26.1: %Convert.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc23_26.2: = bound_method %.loc23_16, %.loc23_26.1 [template = constants.%.15] // CHECK:STDOUT: %.loc23_26.3: ref %X = temporary_storage // CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %.loc23_26.2(%.loc23_16) to %.loc23_26.3 // CHECK:STDOUT: %.loc23_26.4: init %X = converted %.loc23_16, %Convert.call.loc23_26 @@ -236,7 +236,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_32.loc23_35 [template = i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_32.loc23_35, %.loc23_35.1 [template = i32] // CHECK:STDOUT: %.loc23_26.5: ref %X = temporary %.loc23_26.3, %.loc23_26.4 -// CHECK:STDOUT: %.loc23_32.1: %Convert.type.5 = interface_witness_access constants.%.13, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc23_32.1: %Convert.type.5 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.4] // CHECK:STDOUT: %.loc23_32.2: = bound_method %.loc23_26.5, %.loc23_32.1 // CHECK:STDOUT: %.loc23_26.6: %X = bind_value %.loc23_26.5 // CHECK:STDOUT: %Convert.call.loc23_32: init i32 = call %.loc23_32.2(%.loc23_26.6) @@ -276,8 +276,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%X, i32) { @@ -295,8 +295,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(i32, constants.%X) { diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index c49abc02750e..c13785e9e666 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -17,15 +17,15 @@ var test_type: type = 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 0 [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: 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: %.4: f64 = float_literal 0.10000000000000001 [template] -// CHECK:STDOUT: %.5: type = ptr_type String [template] -// CHECK:STDOUT: %.6: String = string_literal "Test" [template] +// CHECK:STDOUT: %.3: f64 = float_literal 0.10000000000000001 [template] +// CHECK:STDOUT: %.4: type = ptr_type String [template] +// CHECK:STDOUT: %.5: String = string_literal "Test" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ var test_type: type = i32; // CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_32, %.loc11_15.1 [template = i32] // CHECK:STDOUT: %test_i32.var: ref i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref i32 = bind_name test_i32, %test_i32.var -// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 64 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_15.1) [template = f64] // CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_15.3: type = converted %float.make_type, %.loc12_15.2 [template = f64] @@ -69,11 +69,11 @@ var test_type: type = i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc11: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%test_i32.var, %.loc11 -// CHECK:STDOUT: %.loc12: f64 = float_literal 0.10000000000000001 [template = constants.%.4] +// CHECK:STDOUT: %.loc12: f64 = float_literal 0.10000000000000001 [template = constants.%.3] // CHECK:STDOUT: assign file.%test_f64.var, %.loc12 -// CHECK:STDOUT: %.loc13: String = string_literal "Test" [template = constants.%.6] +// CHECK:STDOUT: %.loc13: String = string_literal "Test" [template = constants.%.5] // CHECK:STDOUT: %test_str: String = bind_name test_str, %.loc13 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: assign file.%test_type.var, %int.make_type_32 diff --git a/toolchain/check/testdata/basics/fail_bad_run.carbon b/toolchain/check/testdata/basics/fail_bad_run.carbon index e80457f0937e..a4fd81c7e051 100644 --- a/toolchain/check/testdata/basics/fail_bad_run.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run.carbon @@ -21,9 +21,9 @@ fn Run() -> String {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type String [template] +// CHECK:STDOUT: %.1: type = ptr_type String [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index da52ce92a68c..ece026cac537 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -17,7 +17,7 @@ fn Run(n: 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: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] diff --git a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon index a6cf060db2db..9f3f3441b0d5 100644 --- a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon +++ b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon @@ -21,7 +21,7 @@ var x: type = 42; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_value 42 [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 x: type = 42; // 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 x: type = 42; // 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 @@ -73,8 +73,8 @@ var x: type = 42; // 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: @@ -130,7 +130,7 @@ var x: type = 42; // 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: diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 1bdefe3f3d95..6222b8eb3180 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -41,9 +41,9 @@ let e: f64 = 5.0e39999999999999999993; // 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: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: 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: } @@ -78,11 +78,11 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_8.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_8.2: type = converted %int.make_type_32.loc27, %.loc27_8.1 [template = i32] -// CHECK:STDOUT: %.loc33_8.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc33_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%.loc33_8.1) [template = f64] // CHECK:STDOUT: %.loc33_8.2: type = value_of_initializer %float.make_type.loc33 [template = f64] // CHECK:STDOUT: %.loc33_8.3: type = converted %float.make_type.loc33, %.loc33_8.2 [template = f64] -// CHECK:STDOUT: %.loc38_8.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc38_8.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%Float(%.loc38_8.1) [template = f64] // CHECK:STDOUT: %.loc38_8.2: type = value_of_initializer %float.make_type.loc38 [template = f64] // CHECK:STDOUT: %.loc38_8.3: type = converted %float.make_type.loc38, %.loc38_8.2 [template = f64] diff --git a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon index d25f0768dfde..903cc3293cff 100644 --- a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon +++ b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon @@ -18,7 +18,7 @@ var y: i32 = x.b; // 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: diff --git a/toolchain/check/testdata/basics/multifile.carbon b/toolchain/check/testdata/basics/multifile.carbon index 801c3113adb9..1d448d5f8104 100644 --- a/toolchain/check/testdata/basics/multifile.carbon +++ b/toolchain/check/testdata/basics/multifile.carbon @@ -22,7 +22,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -51,7 +51,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon index 177f9b15824c..ce45c4f1fa49 100644 --- a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon +++ b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon @@ -19,7 +19,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon index 0b39231a2dc8..4c794e971cd0 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon @@ -81,7 +81,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -181,7 +181,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] @@ -208,7 +208,7 @@ fn B() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref.loc6_3: = name_ref A, imports.%A [template = imports.%A] // CHECK:STDOUT: %A.ref.loc6_4: %A.type = name_ref A, imports.%import_ref [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref.loc6_4() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref.loc6_4() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon index 3256a2ddab34..cf057345db31 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon @@ -167,13 +167,13 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: --- raw_and_textual_ir.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type (%.1, %.1) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple.1: %.1 = tuple_value () [template] -// CHECK:STDOUT: %tuple.2: %.2 = tuple_value (%tuple.1, %tuple.1) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -181,39 +181,39 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %n.patt: %.1 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.1 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %empty_tuple.type = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %empty_tuple.type = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_20: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_24: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_25.1: %.2 = tuple_literal (%.loc15_20, %.loc15_24) -// CHECK:STDOUT: %.loc15_25.2: type = converted %.loc15_20, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_25.3: type = converted %.loc15_24, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_25.4: type = converted %.loc15_25.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %n.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.1 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_20: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_24: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_25.1: %tuple.type = tuple_literal (%.loc15_20, %.loc15_24) +// CHECK:STDOUT: %.loc15_25.2: type = converted %.loc15_20, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_25.3: type = converted %.loc15_24, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_25.4: type = converted %.loc15_25.1, constants.%tuple.type [template = constants.%tuple.type] +// CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%n.param_patt: %.1) -> %return: %.2 { +// CHECK:STDOUT: fn @Foo(%n.param_patt: %empty_tuple.type) -> %return: %tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.1 = name_ref n, %n -// CHECK:STDOUT: %.loc16_15.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_16.1: %.2 = tuple_literal (%n.ref, %.loc16_15.1) -// CHECK:STDOUT: %.loc16_16.2: ref %.1 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_11: init %.1 = tuple_init () to %.loc16_16.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.3: init %.1 = converted %n.ref, %.loc16_11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.4: ref %.1 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_15.2: init %.1 = tuple_init () to %.loc16_16.4 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.5: init %.1 = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.6: init %.2 = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc16_17: init %.2 = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple.2] +// CHECK:STDOUT: %n.ref: %empty_tuple.type = name_ref n, %n +// CHECK:STDOUT: %.loc16_15.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_16.1: %tuple.type = tuple_literal (%n.ref, %.loc16_15.1) +// CHECK:STDOUT: %.loc16_16.2: ref %empty_tuple.type = tuple_access %return, element0 +// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = tuple_init () to %.loc16_16.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.3: init %empty_tuple.type = converted %n.ref, %.loc16_11 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.4: ref %empty_tuple.type = tuple_access %return, element1 +// CHECK:STDOUT: %.loc16_15.2: init %empty_tuple.type = tuple_init () to %.loc16_16.4 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.5: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.6: init %tuple.type = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple] +// CHECK:STDOUT: %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple] // CHECK:STDOUT: return %.loc16_17 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon index e740c254812a..b5dd1331efa3 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon @@ -27,7 +27,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: --- raw_identifier.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] @@ -43,67 +43,67 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { -// CHECK:STDOUT: %n.patt: %.1 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.1 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %empty_tuple.type = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %empty_tuple.type = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_10.2: type = converted %.loc15_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.1 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc15_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_10.2: type = converted %.loc15_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %n.patt: %.1 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.1 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %empty_tuple.type = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %empty_tuple.type = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_12.2: type = converted %.loc19_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc19_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_19.2: type = converted %.loc19_19.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.1 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc19_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_12.2: type = converted %.loc19_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc19_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_19.2: type = converted %.loc19_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { -// CHECK:STDOUT: %if.patt: %.1 = binding_pattern r#if -// CHECK:STDOUT: %if.param_patt: %.1 = value_param_pattern %if.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %if.patt: %empty_tuple.type = binding_pattern r#if +// CHECK:STDOUT: %if.param_patt: %empty_tuple.type = value_param_pattern %if.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc23_13.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc23_13.2: type = converted %.loc23_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc23_20.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc23_20.2: type = converted %.loc23_20.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %if.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %if: %.1 = bind_name r#if, %if.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc23_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc23_13.2: type = converted %.loc23_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc23_20.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc23_20.2: type = converted %.loc23_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %if.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %if: %empty_tuple.type = bind_name r#if, %if.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @A(%n.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @A(%n.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.1 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %empty_tuple.type = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%n.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @B(%n.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.1 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %empty_tuple.type = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%if.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @C(%if.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %if.ref: %.1 = name_ref r#if, %if +// CHECK:STDOUT: %if.ref: %empty_tuple.type = name_ref r#if, %if // CHECK:STDOUT: return %if.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon index 8fd4e61bf8ac..4fd70291c441 100644 --- a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon @@ -19,13 +19,13 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: --- textual_ir.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type (%.1, %.1) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple.1: %.1 = tuple_value () [template] -// CHECK:STDOUT: %tuple.2: %.2 = tuple_value (%tuple.1, %tuple.1) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,39 +33,39 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %n.patt: %.1 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.1 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %empty_tuple.type = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %empty_tuple.type = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_20: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_24: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_25.1: %.2 = tuple_literal (%.loc15_20, %.loc15_24) -// CHECK:STDOUT: %.loc15_25.2: type = converted %.loc15_20, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_25.3: type = converted %.loc15_24, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_25.4: type = converted %.loc15_25.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %n.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.1 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_20: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_24: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_25.1: %tuple.type = tuple_literal (%.loc15_20, %.loc15_24) +// CHECK:STDOUT: %.loc15_25.2: type = converted %.loc15_20, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_25.3: type = converted %.loc15_24, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_25.4: type = converted %.loc15_25.1, constants.%tuple.type [template = constants.%tuple.type] +// CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%n.param_patt: %.1) -> %return: %.2 { +// CHECK:STDOUT: fn @Foo(%n.param_patt: %empty_tuple.type) -> %return: %tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.1 = name_ref n, %n -// CHECK:STDOUT: %.loc16_15.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_16.1: %.2 = tuple_literal (%n.ref, %.loc16_15.1) -// CHECK:STDOUT: %.loc16_16.2: ref %.1 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_11: init %.1 = tuple_init () to %.loc16_16.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.3: init %.1 = converted %n.ref, %.loc16_11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.4: ref %.1 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_15.2: init %.1 = tuple_init () to %.loc16_16.4 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.5: init %.1 = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.6: init %.2 = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc16_17: init %.2 = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple.2] +// CHECK:STDOUT: %n.ref: %empty_tuple.type = name_ref n, %n +// CHECK:STDOUT: %.loc16_15.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_16.1: %tuple.type = tuple_literal (%n.ref, %.loc16_15.1) +// CHECK:STDOUT: %.loc16_16.2: ref %empty_tuple.type = tuple_access %return, element0 +// CHECK:STDOUT: %.loc16_11: init %empty_tuple.type = tuple_init () to %.loc16_16.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.3: init %empty_tuple.type = converted %n.ref, %.loc16_11 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.4: ref %empty_tuple.type = tuple_access %return, element1 +// CHECK:STDOUT: %.loc16_15.2: init %empty_tuple.type = tuple_init () to %.loc16_16.4 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.5: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_16.6: init %tuple.type = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple] +// CHECK:STDOUT: %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple] // CHECK:STDOUT: return %.loc16_17 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 485ac3588496..7dcaae83e58c 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -33,37 +33,37 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.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 6 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 8 [template] -// CHECK:STDOUT: %.6: i32 = int_value 9 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.8: type = tuple_type (i32, i32, i32, i32, i32, i32) [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %.11: i32 = int_value 2 [template] -// CHECK:STDOUT: %.12: i32 = int_value 3 [template] -// CHECK:STDOUT: %.13: i32 = int_value 4 [template] -// CHECK:STDOUT: %.14: i32 = int_value 5 [template] -// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.5, %.6, %.5, %.5, %.7, %.7) [template] -// CHECK:STDOUT: %.15: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: i32 = int_value 6 [template] +// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: i32 = int_value 8 [template] +// CHECK:STDOUT: %.5: i32 = int_value 9 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (i32, i32, i32, i32, i32, i32) [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.8: i32 = int_value 1 [template] +// CHECK:STDOUT: %.9: i32 = int_value 2 [template] +// CHECK:STDOUT: %.10: i32 = int_value 3 [template] +// CHECK:STDOUT: %.11: i32 = int_value 4 [template] +// CHECK:STDOUT: %.12: i32 = int_value 5 [template] +// CHECK:STDOUT: %array.1: %.2 = tuple_value (%.4, %.5, %.4, %.4, %.6, %.6) [template] +// CHECK:STDOUT: %.13: 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: %.16: type = array_type %.2, f64 [template] -// CHECK:STDOUT: %.17: type = ptr_type %.16 [template] -// CHECK:STDOUT: %.18: f64 = float_literal 0.90000000000000002 [template] -// CHECK:STDOUT: %.19: f64 = float_literal 8 [template] -// CHECK:STDOUT: %.20: f64 = float_literal 80 [template] -// CHECK:STDOUT: %.21: f64 = float_literal 1.0E+7 [template] -// CHECK:STDOUT: %.22: f64 = float_literal 1.0E+8 [template] -// CHECK:STDOUT: %.23: f64 = float_literal 1.0E-8 [template] -// CHECK:STDOUT: %.24: type = tuple_type (f64, f64, f64, f64, f64, f64) [template] -// CHECK:STDOUT: %array.2: %.16 = tuple_value (%.18, %.19, %.20, %.21, %.22, %.23) [template] +// CHECK:STDOUT: %.14: type = array_type %.1, f64 [template] +// CHECK:STDOUT: %.15: type = ptr_type %.14 [template] +// CHECK:STDOUT: %.16: f64 = float_literal 0.90000000000000002 [template] +// CHECK:STDOUT: %.17: f64 = float_literal 8 [template] +// CHECK:STDOUT: %.18: f64 = float_literal 80 [template] +// CHECK:STDOUT: %.19: f64 = float_literal 1.0E+7 [template] +// CHECK:STDOUT: %.20: f64 = float_literal 1.0E+8 [template] +// CHECK:STDOUT: %.21: f64 = float_literal 1.0E-8 [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (f64, f64, f64, f64, f64, f64) [template] +// CHECK:STDOUT: %array.2: %.14 = tuple_value (%.16, %.17, %.18, %.19, %.20, %.21) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,75 +89,75 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_19: i32 = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_19: i32 = int_value 6 [template = constants.%.1] // CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_32, %.loc14_14.1 [template = i32] -// CHECK:STDOUT: %.loc14_20: type = array_type %.loc14_19, i32 [template = constants.%.3] -// CHECK:STDOUT: %ints.var: ref %.3 = var ints -// CHECK:STDOUT: %ints: ref %.3 = bind_name ints, %ints.var -// CHECK:STDOUT: %.loc15: i32 = int_value 8 [template = constants.%.5] -// CHECK:STDOUT: %.loc16: i32 = int_value 9 [template = constants.%.6] -// CHECK:STDOUT: %.loc17: i32 = int_value 8 [template = constants.%.5] -// CHECK:STDOUT: %.loc18: i32 = int_value 8 [template = constants.%.5] -// CHECK:STDOUT: %.loc19: i32 = int_value 2147483647 [template = constants.%.7] -// CHECK:STDOUT: %.loc20: i32 = int_value 2147483647 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_3.1: %.8 = tuple_literal (%.loc15, %.loc16, %.loc17, %.loc18, %.loc19, %.loc20) -// CHECK:STDOUT: %.loc21_3.2: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc14_20: type = array_type %.loc14_19, i32 [template = constants.%.2] +// CHECK:STDOUT: %ints.var: ref %.2 = var ints +// CHECK:STDOUT: %ints: ref %.2 = bind_name ints, %ints.var +// CHECK:STDOUT: %.loc15: i32 = int_value 8 [template = constants.%.4] +// CHECK:STDOUT: %.loc16: i32 = int_value 9 [template = constants.%.5] +// CHECK:STDOUT: %.loc17: i32 = int_value 8 [template = constants.%.4] +// CHECK:STDOUT: %.loc18: i32 = int_value 8 [template = constants.%.4] +// CHECK:STDOUT: %.loc19: i32 = int_value 2147483647 [template = constants.%.6] +// CHECK:STDOUT: %.loc20: i32 = int_value 2147483647 [template = constants.%.6] +// CHECK:STDOUT: %.loc21_3.1: %tuple.type.1 = tuple_literal (%.loc15, %.loc16, %.loc17, %.loc18, %.loc19, %.loc20) +// CHECK:STDOUT: %.loc21_3.2: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc21_3.3: ref i32 = array_index %ints.var, %.loc21_3.2 -// CHECK:STDOUT: %.loc21_3.4: init i32 = initialize_from %.loc15 to %.loc21_3.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc21_3.5: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc21_3.4: init i32 = initialize_from %.loc15 to %.loc21_3.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc21_3.5: i32 = int_value 1 [template = constants.%.8] // CHECK:STDOUT: %.loc21_3.6: ref i32 = array_index %ints.var, %.loc21_3.5 -// CHECK:STDOUT: %.loc21_3.7: init i32 = initialize_from %.loc16 to %.loc21_3.6 [template = constants.%.6] -// CHECK:STDOUT: %.loc21_3.8: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc21_3.7: init i32 = initialize_from %.loc16 to %.loc21_3.6 [template = constants.%.5] +// CHECK:STDOUT: %.loc21_3.8: i32 = int_value 2 [template = constants.%.9] // CHECK:STDOUT: %.loc21_3.9: ref i32 = array_index %ints.var, %.loc21_3.8 -// CHECK:STDOUT: %.loc21_3.10: init i32 = initialize_from %.loc17 to %.loc21_3.9 [template = constants.%.5] -// CHECK:STDOUT: %.loc21_3.11: i32 = int_value 3 [template = constants.%.12] +// CHECK:STDOUT: %.loc21_3.10: init i32 = initialize_from %.loc17 to %.loc21_3.9 [template = constants.%.4] +// CHECK:STDOUT: %.loc21_3.11: i32 = int_value 3 [template = constants.%.10] // CHECK:STDOUT: %.loc21_3.12: ref i32 = array_index %ints.var, %.loc21_3.11 -// CHECK:STDOUT: %.loc21_3.13: init i32 = initialize_from %.loc18 to %.loc21_3.12 [template = constants.%.5] -// CHECK:STDOUT: %.loc21_3.14: i32 = int_value 4 [template = constants.%.13] +// CHECK:STDOUT: %.loc21_3.13: init i32 = initialize_from %.loc18 to %.loc21_3.12 [template = constants.%.4] +// CHECK:STDOUT: %.loc21_3.14: i32 = int_value 4 [template = constants.%.11] // CHECK:STDOUT: %.loc21_3.15: ref i32 = array_index %ints.var, %.loc21_3.14 -// CHECK:STDOUT: %.loc21_3.16: init i32 = initialize_from %.loc19 to %.loc21_3.15 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_3.17: i32 = int_value 5 [template = constants.%.14] +// CHECK:STDOUT: %.loc21_3.16: init i32 = initialize_from %.loc19 to %.loc21_3.15 [template = constants.%.6] +// CHECK:STDOUT: %.loc21_3.17: i32 = int_value 5 [template = constants.%.12] // CHECK:STDOUT: %.loc21_3.18: ref i32 = array_index %ints.var, %.loc21_3.17 -// CHECK:STDOUT: %.loc21_3.19: init i32 = initialize_from %.loc20 to %.loc21_3.18 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_3.20: init %.3 = array_init (%.loc21_3.4, %.loc21_3.7, %.loc21_3.10, %.loc21_3.13, %.loc21_3.16, %.loc21_3.19) to %ints.var [template = constants.%array.1] -// CHECK:STDOUT: %.loc21_4: init %.3 = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] +// CHECK:STDOUT: %.loc21_3.19: init i32 = initialize_from %.loc20 to %.loc21_3.18 [template = constants.%.6] +// CHECK:STDOUT: %.loc21_3.20: init %.2 = array_init (%.loc21_3.4, %.loc21_3.7, %.loc21_3.10, %.loc21_3.13, %.loc21_3.16, %.loc21_3.19) to %ints.var [template = constants.%array.1] +// CHECK:STDOUT: %.loc21_4: init %.2 = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] // CHECK:STDOUT: assign %ints.var, %.loc21_4 -// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 64 [template = constants.%.15] +// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 64 [template = constants.%.13] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc22_16.1) [template = f64] -// CHECK:STDOUT: %.loc22_21: i32 = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %.loc22_21: i32 = int_value 6 [template = constants.%.1] // CHECK:STDOUT: %.loc22_16.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc22_16.3: type = converted %float.make_type, %.loc22_16.2 [template = f64] -// CHECK:STDOUT: %.loc22_22: type = array_type %.loc22_21, f64 [template = constants.%.16] -// CHECK:STDOUT: %floats.var: ref %.16 = var floats -// CHECK:STDOUT: %floats: ref %.16 = bind_name floats, %floats.var -// CHECK:STDOUT: %.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%.18] -// CHECK:STDOUT: %.loc24: f64 = float_literal 8 [template = constants.%.19] -// CHECK:STDOUT: %.loc25: f64 = float_literal 80 [template = constants.%.20] -// CHECK:STDOUT: %.loc26: f64 = float_literal 1.0E+7 [template = constants.%.21] -// CHECK:STDOUT: %.loc27: f64 = float_literal 1.0E+8 [template = constants.%.22] -// CHECK:STDOUT: %.loc28: f64 = float_literal 1.0E-8 [template = constants.%.23] -// CHECK:STDOUT: %.loc29_3.1: %.24 = tuple_literal (%.loc23, %.loc24, %.loc25, %.loc26, %.loc27, %.loc28) -// CHECK:STDOUT: %.loc29_3.2: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc22_22: type = array_type %.loc22_21, f64 [template = constants.%.14] +// CHECK:STDOUT: %floats.var: ref %.14 = var floats +// CHECK:STDOUT: %floats: ref %.14 = bind_name floats, %floats.var +// CHECK:STDOUT: %.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%.16] +// CHECK:STDOUT: %.loc24: f64 = float_literal 8 [template = constants.%.17] +// CHECK:STDOUT: %.loc25: f64 = float_literal 80 [template = constants.%.18] +// CHECK:STDOUT: %.loc26: f64 = float_literal 1.0E+7 [template = constants.%.19] +// CHECK:STDOUT: %.loc27: f64 = float_literal 1.0E+8 [template = constants.%.20] +// CHECK:STDOUT: %.loc28: f64 = float_literal 1.0E-8 [template = constants.%.21] +// CHECK:STDOUT: %.loc29_3.1: %tuple.type.2 = tuple_literal (%.loc23, %.loc24, %.loc25, %.loc26, %.loc27, %.loc28) +// CHECK:STDOUT: %.loc29_3.2: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc29_3.3: ref f64 = array_index %floats.var, %.loc29_3.2 -// CHECK:STDOUT: %.loc29_3.4: init f64 = initialize_from %.loc23 to %.loc29_3.3 [template = constants.%.18] -// CHECK:STDOUT: %.loc29_3.5: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc29_3.4: init f64 = initialize_from %.loc23 to %.loc29_3.3 [template = constants.%.16] +// CHECK:STDOUT: %.loc29_3.5: i32 = int_value 1 [template = constants.%.8] // CHECK:STDOUT: %.loc29_3.6: ref f64 = array_index %floats.var, %.loc29_3.5 -// CHECK:STDOUT: %.loc29_3.7: init f64 = initialize_from %.loc24 to %.loc29_3.6 [template = constants.%.19] -// CHECK:STDOUT: %.loc29_3.8: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc29_3.7: init f64 = initialize_from %.loc24 to %.loc29_3.6 [template = constants.%.17] +// CHECK:STDOUT: %.loc29_3.8: i32 = int_value 2 [template = constants.%.9] // CHECK:STDOUT: %.loc29_3.9: ref f64 = array_index %floats.var, %.loc29_3.8 -// CHECK:STDOUT: %.loc29_3.10: init f64 = initialize_from %.loc25 to %.loc29_3.9 [template = constants.%.20] -// CHECK:STDOUT: %.loc29_3.11: i32 = int_value 3 [template = constants.%.12] +// CHECK:STDOUT: %.loc29_3.10: init f64 = initialize_from %.loc25 to %.loc29_3.9 [template = constants.%.18] +// CHECK:STDOUT: %.loc29_3.11: i32 = int_value 3 [template = constants.%.10] // CHECK:STDOUT: %.loc29_3.12: ref f64 = array_index %floats.var, %.loc29_3.11 -// CHECK:STDOUT: %.loc29_3.13: init f64 = initialize_from %.loc26 to %.loc29_3.12 [template = constants.%.21] -// CHECK:STDOUT: %.loc29_3.14: i32 = int_value 4 [template = constants.%.13] +// CHECK:STDOUT: %.loc29_3.13: init f64 = initialize_from %.loc26 to %.loc29_3.12 [template = constants.%.19] +// CHECK:STDOUT: %.loc29_3.14: i32 = int_value 4 [template = constants.%.11] // CHECK:STDOUT: %.loc29_3.15: ref f64 = array_index %floats.var, %.loc29_3.14 -// CHECK:STDOUT: %.loc29_3.16: init f64 = initialize_from %.loc27 to %.loc29_3.15 [template = constants.%.22] -// CHECK:STDOUT: %.loc29_3.17: i32 = int_value 5 [template = constants.%.14] +// CHECK:STDOUT: %.loc29_3.16: init f64 = initialize_from %.loc27 to %.loc29_3.15 [template = constants.%.20] +// CHECK:STDOUT: %.loc29_3.17: i32 = int_value 5 [template = constants.%.12] // CHECK:STDOUT: %.loc29_3.18: ref f64 = array_index %floats.var, %.loc29_3.17 -// CHECK:STDOUT: %.loc29_3.19: init f64 = initialize_from %.loc28 to %.loc29_3.18 [template = constants.%.23] -// CHECK:STDOUT: %.loc29_3.20: init %.16 = array_init (%.loc29_3.4, %.loc29_3.7, %.loc29_3.10, %.loc29_3.13, %.loc29_3.16, %.loc29_3.19) to %floats.var [template = constants.%array.2] -// CHECK:STDOUT: %.loc29_4: init %.16 = converted %.loc29_3.1, %.loc29_3.20 [template = constants.%array.2] +// CHECK:STDOUT: %.loc29_3.19: init f64 = initialize_from %.loc28 to %.loc29_3.18 [template = constants.%.21] +// CHECK:STDOUT: %.loc29_3.20: init %.14 = array_init (%.loc29_3.4, %.loc29_3.7, %.loc29_3.10, %.loc29_3.13, %.loc29_3.16, %.loc29_3.19) to %floats.var [template = constants.%array.2] +// CHECK:STDOUT: %.loc29_4: init %.14 = converted %.loc29_3.1, %.loc29_3.20 [template = constants.%array.2] // CHECK:STDOUT: assign %floats.var, %.loc29_4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index 16e0b5eb381e..ff44572dd533 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -15,10 +15,10 @@ var b: i32 = ((2)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,9 +53,9 @@ var b: i32 = ((2)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: assign file.%a.var, %.loc11 -// CHECK:STDOUT: %.loc12: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: assign file.%b.var, %.loc12 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/run.carbon b/toolchain/check/testdata/basics/run.carbon index c54590552ba1..cf628272420f 100644 --- a/toolchain/check/testdata/basics/run.carbon +++ b/toolchain/check/testdata/basics/run.carbon @@ -14,7 +14,7 @@ fn Run() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index 09b1a1cbbb55..db0945987d6a 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -14,11 +14,11 @@ fn Run() -> i32 { return 0; } // 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: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,7 +52,7 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc11_26 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index 41a5db08ed78..71c3e86614fc 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -124,13 +124,13 @@ var test_f128: f128; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %.7: type = int_type signed, %.6 [template] +// CHECK:STDOUT: %.2: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %.4: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.6: type = int_type signed, %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -151,23 +151,23 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 8 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%.loc3_14.1) [template = constants.%.3] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%.3] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3, %.loc3_14.2 [template = constants.%.3] -// CHECK:STDOUT: %test_i8.var: ref %.3 = var test_i8 -// CHECK:STDOUT: %test_i8: ref %.3 = bind_name test_i8, %test_i8.var -// CHECK:STDOUT: %.loc4_15.1: Core.IntLiteral = int_value 16 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_15.1) [template = constants.%.5] -// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%.5] -// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4, %.loc4_15.2 [template = constants.%.5] -// CHECK:STDOUT: %test_i16.var: ref %.5 = var test_i16 -// CHECK:STDOUT: %test_i16: ref %.5 = bind_name test_i16, %test_i16.var -// CHECK:STDOUT: %.loc5_15.1: Core.IntLiteral = int_value 64 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_15.1) [template = constants.%.7] -// CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%.7] -// CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_signed.loc5, %.loc5_15.2 [template = constants.%.7] -// CHECK:STDOUT: %test_i64.var: ref %.7 = var test_i64 -// CHECK:STDOUT: %test_i64: ref %.7 = bind_name test_i64, %test_i64.var +// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%.loc3_14.1) [template = constants.%.2] +// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%.2] +// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3, %.loc3_14.2 [template = constants.%.2] +// CHECK:STDOUT: %test_i8.var: ref %.2 = var test_i8 +// CHECK:STDOUT: %test_i8: ref %.2 = bind_name test_i8, %test_i8.var +// CHECK:STDOUT: %.loc4_15.1: Core.IntLiteral = int_value 16 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_15.1) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%.4] +// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4, %.loc4_15.2 [template = constants.%.4] +// CHECK:STDOUT: %test_i16.var: ref %.4 = var test_i16 +// CHECK:STDOUT: %test_i16: ref %.4 = bind_name test_i16, %test_i16.var +// CHECK:STDOUT: %.loc5_15.1: Core.IntLiteral = int_value 64 [template = constants.%.5] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_15.1) [template = constants.%.6] +// CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_signed.loc5, %.loc5_15.2 [template = constants.%.6] +// CHECK:STDOUT: %test_i64.var: ref %.6 = var test_i64 +// CHECK:STDOUT: %test_i64: ref %.6 = bind_name test_i64, %test_i64.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%size.param_patt: Core.IntLiteral) -> type = "int.make_type_signed"; @@ -177,12 +177,12 @@ var test_f128: f128; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 15 [template] -// CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1000000000 [template] +// CHECK:STDOUT: %.2: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 15 [template] +// CHECK:STDOUT: %.4: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} @@ -194,13 +194,13 @@ var test_f128: f128; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %.7: type = int_type unsigned, %.6 [template] +// CHECK:STDOUT: %.2: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %.4: type = int_type unsigned, %.3 [template] +// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.6: type = int_type unsigned, %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -221,23 +221,23 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc3_14.1: Core.IntLiteral = int_value 8 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%.loc3_14.1) [template = constants.%.3] -// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%.3] -// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_unsigned.loc3, %.loc3_14.2 [template = constants.%.3] -// CHECK:STDOUT: %test_u8.var: ref %.3 = var test_u8 -// CHECK:STDOUT: %test_u8: ref %.3 = bind_name test_u8, %test_u8.var -// CHECK:STDOUT: %.loc4_15.1: Core.IntLiteral = int_value 16 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%.loc4_15.1) [template = constants.%.5] -// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%.5] -// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_unsigned.loc4, %.loc4_15.2 [template = constants.%.5] -// CHECK:STDOUT: %test_u16.var: ref %.5 = var test_u16 -// CHECK:STDOUT: %test_u16: ref %.5 = bind_name test_u16, %test_u16.var -// CHECK:STDOUT: %.loc5_15.1: Core.IntLiteral = int_value 64 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_15.1) [template = constants.%.7] -// CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%.7] -// CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_unsigned.loc5, %.loc5_15.2 [template = constants.%.7] -// CHECK:STDOUT: %test_u64.var: ref %.7 = var test_u64 -// CHECK:STDOUT: %test_u64: ref %.7 = bind_name test_u64, %test_u64.var +// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%.loc3_14.1) [template = constants.%.2] +// CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%.2] +// CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_unsigned.loc3, %.loc3_14.2 [template = constants.%.2] +// CHECK:STDOUT: %test_u8.var: ref %.2 = var test_u8 +// CHECK:STDOUT: %test_u8: ref %.2 = bind_name test_u8, %test_u8.var +// CHECK:STDOUT: %.loc4_15.1: Core.IntLiteral = int_value 16 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%.loc4_15.1) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%.4] +// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_unsigned.loc4, %.loc4_15.2 [template = constants.%.4] +// CHECK:STDOUT: %test_u16.var: ref %.4 = var test_u16 +// CHECK:STDOUT: %test_u16: ref %.4 = bind_name test_u16, %test_u16.var +// CHECK:STDOUT: %.loc5_15.1: Core.IntLiteral = int_value 64 [template = constants.%.5] +// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_15.1) [template = constants.%.6] +// CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_unsigned.loc5, %.loc5_15.2 [template = constants.%.6] +// CHECK:STDOUT: %test_u64.var: ref %.6 = var test_u64 +// CHECK:STDOUT: %test_u64: ref %.6 = bind_name test_u64, %test_u64.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UInt(%size.param_patt: Core.IntLiteral) -> type = "int.make_type_unsigned"; @@ -247,12 +247,12 @@ var test_f128: f128; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] -// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 15 [template] -// CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 1000000000 [template] +// CHECK:STDOUT: %.2: type = int_type unsigned, %.1 [template] +// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 15 [template] +// CHECK:STDOUT: %.4: type = int_type unsigned, %.3 [template] +// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/builtins/bool/make_type.carbon b/toolchain/check/testdata/builtins/bool/make_type.carbon index f06e3f2f2996..b85015cc5db8 100644 --- a/toolchain/check/testdata/builtins/bool/make_type.carbon +++ b/toolchain/check/testdata/builtins/bool/make_type.carbon @@ -26,7 +26,7 @@ var b: Bool() = false; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,9 +58,9 @@ var b: Bool() = false; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %.1: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,7 +91,7 @@ var b: Bool() = false; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc6: bool = bool_literal false [template = constants.%.1] // CHECK:STDOUT: assign file.%b.var, %.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 86aca445a45f..a286c0646159 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -55,15 +55,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 2.2000000000000002 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 2.3000000000000003 [template] -// CHECK:STDOUT: %.5: f64 = float_literal 4.5 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 2.2000000000000002 [template] +// CHECK:STDOUT: %.3: f64 = float_literal 2.3000000000000003 [template] +// CHECK:STDOUT: %.4: f64 = float_literal 4.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -163,9 +163,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2.2000000000000002 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_23: f64 = float_literal 2.3000000000000003 [template = constants.%.4] -// CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%.loc8_18, %.loc8_23) [template = constants.%.5] +// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2.2000000000000002 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_23: f64 = float_literal 2.3000000000000003 [template = constants.%.3] +// CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%.loc8_18, %.loc8_23) [template = constants.%.4] // CHECK:STDOUT: assign file.%x.var, %float.add // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -175,7 +175,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index fa36005e11d4..f498d1cf289a 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -57,19 +57,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 10 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 2.5 [template] -// CHECK:STDOUT: %.5: f64 = float_literal 4 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.8: f64 = float_literal +Inf [template] -// CHECK:STDOUT: %.9: f64 = float_literal NaN [template] +// CHECK:STDOUT: %.2: f64 = float_literal 10 [template] +// CHECK:STDOUT: %.3: f64 = float_literal 2.5 [template] +// CHECK:STDOUT: %.4: f64 = float_literal 4 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.7: f64 = float_literal +Inf [template] +// CHECK:STDOUT: %.8: f64 = float_literal NaN [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -179,23 +179,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc8: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_24: f64 = float_literal 2.5 [template = constants.%.4] -// CHECK:STDOUT: %float.div.loc8: init f64 = call %Div.ref.loc8(%.loc8_18, %.loc8_24) [template = constants.%.5] +// CHECK:STDOUT: %.loc8_18: f64 = float_literal 10 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_24: f64 = float_literal 2.5 [template = constants.%.3] +// CHECK:STDOUT: %float.div.loc8: init f64 = call %Div.ref.loc8(%.loc8_18, %.loc8_24) [template = constants.%.4] // CHECK:STDOUT: assign file.%a.var, %float.div.loc8 // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc9_18: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_23: f64 = float_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %float.div.loc9: init f64 = call %Div.ref.loc9(%.loc9_18, %.loc9_23) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_27.1: f64 = value_of_initializer %float.div.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_27.2: f64 = converted %float.div.loc9, %.loc9_27.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_18: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_23: f64 = float_literal 0 [template = constants.%.6] +// CHECK:STDOUT: %float.div.loc9: init f64 = call %Div.ref.loc9(%.loc9_18, %.loc9_23) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_27.1: f64 = value_of_initializer %float.div.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_27.2: f64 = converted %float.div.loc9, %.loc9_27.1 [template = constants.%.7] // CHECK:STDOUT: %b: f64 = bind_name b, %.loc9_27.2 // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc10_18: f64 = float_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_23: f64 = float_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %float.div.loc10: init f64 = call %Div.ref.loc10(%.loc10_18, %.loc10_23) [template = constants.%.9] -// CHECK:STDOUT: %.loc10_27.1: f64 = value_of_initializer %float.div.loc10 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_27.2: f64 = converted %float.div.loc10, %.loc10_27.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc10_18: f64 = float_literal 0 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_23: f64 = float_literal 0 [template = constants.%.6] +// CHECK:STDOUT: %float.div.loc10: init f64 = call %Div.ref.loc10(%.loc10_18, %.loc10_23) [template = constants.%.8] +// CHECK:STDOUT: %.loc10_27.1: f64 = value_of_initializer %float.div.loc10 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_27.2: f64 = converted %float.div.loc10, %.loc10_27.1 [template = constants.%.8] // CHECK:STDOUT: %c: f64 = bind_name c, %.loc10_27.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -205,7 +205,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index 1871a067ad43..4e154d2b7a8c 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -38,23 +38,23 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] // CHECK:STDOUT: %Eq: %Eq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: bool = bool_literal true [template] -// CHECK:STDOUT: %.8: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.9: bool = bool_literal false [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: bool = bool_literal true [template] +// CHECK:STDOUT: %.7: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.8: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -150,14 +150,14 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -173,11 +173,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Eq.ref.loc8: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc8_19: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc8_24: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_24) [template = constants.%.7] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.eq.loc8 [template = constants.%.7] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.eq.loc8, %.loc8_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc8_19: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_24: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_24) [template = constants.%.6] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.eq.loc8 [template = constants.%.6] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.eq.loc8, %.loc8_13.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -192,11 +192,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Eq.ref.loc9: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc9_20: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_25: f64 = float_literal 2 [template = constants.%.8] -// CHECK:STDOUT: %float.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_25) [template = constants.%.9] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.eq.loc9 [template = constants.%.9] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.eq.loc9, %.loc9_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc9_20: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_25: f64 = float_literal 2 [template = constants.%.7] +// CHECK:STDOUT: %float.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_25) [template = constants.%.8] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.eq.loc9 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.eq.loc9, %.loc9_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -228,7 +228,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] // CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 1ddddde7a240..feba518990b6 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -33,7 +33,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -42,18 +42,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal false [template] -// CHECK:STDOUT: %.9: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.10: bool = bool_literal true [template] -// CHECK:STDOUT: %.11: f64 = float_literal -1 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal false [template] +// CHECK:STDOUT: %.8: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.9: bool = bool_literal true [template] +// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -169,14 +169,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -194,11 +194,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc9: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc9_25: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_30: f64 = float_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %float.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_30) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater.loc9, %.loc9_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_25: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_30: f64 = float_literal 2 [template = constants.%.6] +// CHECK:STDOUT: %float.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_30) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater.loc9, %.loc9_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -213,11 +213,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc10: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc10_25: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_30: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_30) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.greater.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.greater.loc10, %.loc10_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_25: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_30: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_30) [template = constants.%.7] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.greater.loc10 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.greater.loc10, %.loc10_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -232,11 +232,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc11: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %float.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.10] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater.loc11 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater.loc11, %.loc11_13.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.8] +// CHECK:STDOUT: %float.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.9] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater.loc11 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater.loc11, %.loc11_13.1 [template = constants.%.9] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -252,14 +252,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc12: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_32: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.11] -// CHECK:STDOUT: %.loc12_38: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_31.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.11] -// CHECK:STDOUT: %.loc12_31.2: f64 = converted %float.negate.loc12, %.loc12_31.1 [template = constants.%.11] -// CHECK:STDOUT: %float.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_38) [template = constants.%.8] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater.loc12 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater.loc12, %.loc12_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_32: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.10] +// CHECK:STDOUT: %.loc12_38: f64 = float_literal 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_31.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_31.2: f64 = converted %float.negate.loc12, %.loc12_31.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_38) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater.loc12 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater.loc12, %.loc12_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -274,15 +274,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc13: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.8] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.11] -// CHECK:STDOUT: %.loc13_35.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.11] -// CHECK:STDOUT: %.loc13_35.2: f64 = converted %float.negate.loc13, %.loc13_35.1 [template = constants.%.11] -// CHECK:STDOUT: %float.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_35.2) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater.loc13, %.loc13_13.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] +// CHECK:STDOUT: %.loc13_35.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_35.2: f64 = converted %float.negate.loc13, %.loc13_35.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_35.2) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater.loc13 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater.loc13, %.loc13_13.1 [template = constants.%.9] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index a7e58bc88370..18ea8fe7c0fa 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -33,7 +33,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -42,18 +42,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal false [template] -// CHECK:STDOUT: %.9: bool = bool_literal true [template] -// CHECK:STDOUT: %.10: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.11: f64 = float_literal -1 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal false [template] +// CHECK:STDOUT: %.8: bool = bool_literal true [template] +// CHECK:STDOUT: %.9: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -169,14 +169,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -194,11 +194,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc9: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc9_27: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_32: f64 = float_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %float.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_32) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater_eq.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater_eq.loc9, %.loc9_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_27: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_32: f64 = float_literal 2 [template = constants.%.6] +// CHECK:STDOUT: %float.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_32) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.greater_eq.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.greater_eq.loc9, %.loc9_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -213,11 +213,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc10: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc10_26: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_31: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_31) [template = constants.%.9] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.greater_eq.loc10 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.greater_eq.loc10, %.loc10_13.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc10_26: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_31: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_31) [template = constants.%.8] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.greater_eq.loc10 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.greater_eq.loc10, %.loc10_13.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -232,11 +232,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc11: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_31: f64 = float_literal 0 [template = constants.%.10] -// CHECK:STDOUT: %float.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_31) [template = constants.%.9] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater_eq.loc11 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater_eq.loc11, %.loc11_13.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_31: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %float.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_31) [template = constants.%.8] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %float.greater_eq.loc11 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %float.greater_eq.loc11, %.loc11_13.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -252,14 +252,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc12: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_34: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.11] -// CHECK:STDOUT: %.loc12_40: f64 = float_literal 0 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_33.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.11] -// CHECK:STDOUT: %.loc12_33.2: f64 = converted %float.negate.loc12, %.loc12_33.1 [template = constants.%.11] -// CHECK:STDOUT: %float.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_40) [template = constants.%.8] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater_eq.loc12 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater_eq.loc12, %.loc12_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_34: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.10] +// CHECK:STDOUT: %.loc12_40: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc12_33.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_33.2: f64 = converted %float.negate.loc12, %.loc12_33.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_40) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater_eq.loc12 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater_eq.loc12, %.loc12_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -274,15 +274,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc13: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc13_26: f64 = float_literal 0 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_26: f64 = float_literal 0 [template = constants.%.9] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_38: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_38) [template = constants.%.11] -// CHECK:STDOUT: %.loc13_37.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.11] -// CHECK:STDOUT: %.loc13_37.2: f64 = converted %float.negate.loc13, %.loc13_37.1 [template = constants.%.11] -// CHECK:STDOUT: %float.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_37.2) [template = constants.%.9] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater_eq.loc13 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater_eq.loc13, %.loc13_13.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_38: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_38) [template = constants.%.10] +// CHECK:STDOUT: %.loc13_37.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_37.2: f64 = converted %float.negate.loc13, %.loc13_37.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_37.2) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater_eq.loc13 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater_eq.loc13, %.loc13_13.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index e49aae80cf97..c8df3b1dc219 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -33,7 +33,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -42,18 +42,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal true [template] -// CHECK:STDOUT: %.9: bool = bool_literal false [template] -// CHECK:STDOUT: %.10: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.11: f64 = float_literal -1 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal true [template] +// CHECK:STDOUT: %.8: bool = bool_literal false [template] +// CHECK:STDOUT: %.9: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -169,14 +169,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -194,11 +194,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc9: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_26: f64 = float_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %float.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less.loc9, %.loc9_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_26: f64 = float_literal 2 [template = constants.%.6] +// CHECK:STDOUT: %float.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less.loc9, %.loc9_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -213,11 +213,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc10: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc10_22: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_27: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_27) [template = constants.%.9] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.less.loc10 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.less.loc10, %.loc10_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc10_22: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_27: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_27) [template = constants.%.8] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %float.less.loc10 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %float.less.loc10, %.loc10_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -232,11 +232,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc11: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc11_22: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27: f64 = float_literal 0 [template = constants.%.10] -// CHECK:STDOUT: %float.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_27) [template = constants.%.9] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less.loc11 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less.loc11, %.loc11_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_22: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_27: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %float.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_27) [template = constants.%.8] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less.loc11 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less.loc11, %.loc11_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -252,14 +252,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc12: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_28: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.11] -// CHECK:STDOUT: %.loc12_34: f64 = float_literal 0 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_27.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.11] -// CHECK:STDOUT: %.loc12_27.2: f64 = converted %float.negate.loc12, %.loc12_27.1 [template = constants.%.11] -// CHECK:STDOUT: %float.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_34) [template = constants.%.8] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less.loc12 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less.loc12, %.loc12_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_28: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.10] +// CHECK:STDOUT: %.loc12_34: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc12_27.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_27.2: f64 = converted %float.negate.loc12, %.loc12_27.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_34) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less.loc12 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less.loc12, %.loc12_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -274,15 +274,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc13: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc13_22: f64 = float_literal 0 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_22: f64 = float_literal 0 [template = constants.%.9] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_34: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.11] -// CHECK:STDOUT: %.loc13_33.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.11] -// CHECK:STDOUT: %.loc13_33.2: f64 = converted %float.negate.loc13, %.loc13_33.1 [template = constants.%.11] -// CHECK:STDOUT: %float.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_33.2) [template = constants.%.9] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less.loc13 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less.loc13, %.loc13_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_34: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.10] +// CHECK:STDOUT: %.loc13_33.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_33.2: f64 = converted %float.negate.loc13, %.loc13_33.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_33.2) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less.loc13 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less.loc13, %.loc13_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index 07e693a2e260..9bfbaab3fdc1 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -33,7 +33,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -42,18 +42,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal true [template] -// CHECK:STDOUT: %.9: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.10: bool = bool_literal false [template] -// CHECK:STDOUT: %.11: f64 = float_literal -1 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal true [template] +// CHECK:STDOUT: %.8: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.9: bool = bool_literal false [template] +// CHECK:STDOUT: %.10: f64 = float_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -169,14 +169,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -194,11 +194,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc9: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc9_23: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_28: f64 = float_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %float.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_28) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less_eq.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less_eq.loc9, %.loc9_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_23: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_28: f64 = float_literal 2 [template = constants.%.6] +// CHECK:STDOUT: %float.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_28) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %float.less_eq.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %float.less_eq.loc9, %.loc9_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -213,11 +213,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc10: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc10_23: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_28: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_28) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.less_eq.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.less_eq.loc10, %.loc10_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_23: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_28: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_28) [template = constants.%.7] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %float.less_eq.loc10 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %float.less_eq.loc10, %.loc10_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -232,11 +232,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc11: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %float.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.10] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less_eq.loc11 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less_eq.loc11, %.loc11_14.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.8] +// CHECK:STDOUT: %float.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.9] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %float.less_eq.loc11 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %float.less_eq.loc11, %.loc11_14.1 [template = constants.%.9] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -252,14 +252,14 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc12: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_30: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.11] -// CHECK:STDOUT: %.loc12_36: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_29.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.11] -// CHECK:STDOUT: %.loc12_29.2: f64 = converted %float.negate.loc12, %.loc12_29.1 [template = constants.%.11] -// CHECK:STDOUT: %float.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_36) [template = constants.%.8] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less_eq.loc12 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less_eq.loc12, %.loc12_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_30: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.10] +// CHECK:STDOUT: %.loc12_36: f64 = float_literal 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_29.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_29.2: f64 = converted %float.negate.loc12, %.loc12_29.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_36) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less_eq.loc12 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less_eq.loc12, %.loc12_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -274,15 +274,15 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc13: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.8] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.11] -// CHECK:STDOUT: %.loc13_35.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.11] -// CHECK:STDOUT: %.loc13_35.2: f64 = converted %float.negate.loc13, %.loc13_35.1 [template = constants.%.11] -// CHECK:STDOUT: %float.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_35.2) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less_eq.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less_eq.loc13, %.loc13_14.1 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] +// CHECK:STDOUT: %.loc13_35.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_35.2: f64 = converted %float.negate.loc13, %.loc13_35.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_35.2) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less_eq.loc13 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less_eq.loc13, %.loc13_14.1 [template = constants.%.9] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 9a55c4a3cd90..9ea17aceb243 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -48,7 +48,7 @@ var dyn: Float(dyn_size); // 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: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] @@ -93,10 +93,10 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 64 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 64 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 0 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] @@ -123,7 +123,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// CHECK:STDOUT: %.loc6_14: i32 = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_14: i32 = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%.loc6_14) [template = f64] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc6_16.2: type = converted %float.make_type, %.loc6_16.1 [template = f64] @@ -161,7 +161,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: f64 = float_literal 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: f64 = float_literal 0 [template = constants.%.2] // CHECK:STDOUT: assign file.%f.var, %.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -170,12 +170,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 32 [template] +// CHECK:STDOUT: %.1: i32 = int_value 32 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 64 [template] +// CHECK:STDOUT: %.2: i32 = int_value 64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -199,7 +199,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// CHECK:STDOUT: %.loc10_26: i32 = int_value 32 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_26: i32 = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc10: init type = call %Float.ref.loc10(%.loc10_26) [template = ] // CHECK:STDOUT: %.loc10_28.1: type = value_of_initializer %float.make_type.loc10 [template = ] // CHECK:STDOUT: %.loc10_28.2: type = converted %float.make_type.loc10, %.loc10_28.1 [template = ] @@ -226,7 +226,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: i32 = int_value 64 [template = constants.%.3] +// CHECK:STDOUT: %.loc12: i32 = int_value 64 [template = constants.%.2] // CHECK:STDOUT: assign file.%dyn_size.var, %.loc12 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index 3f9552ba9ba8..db04a7898eb7 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -55,15 +55,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 0.5 [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.3: f64 = float_literal 0.5 [template] +// CHECK:STDOUT: %.4: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -163,9 +163,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.4] -// CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%.loc8_18, %.loc8_23) [template = constants.%.5] +// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.3] +// CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%.loc8_18, %.loc8_23) [template = constants.%.4] // CHECK:STDOUT: assign file.%x.var, %float.mul // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -175,7 +175,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index 52bfa530b9c8..63a286aaff06 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -76,14 +76,14 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 1.5 [template] -// CHECK:STDOUT: %.4: f64 = float_literal -1.5 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 1.5 [template] +// CHECK:STDOUT: %.3: f64 = float_literal -1.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -172,10 +172,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc8_21: f64 = float_literal 1.5 [template = constants.%.3] -// CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%.loc8_21) [template = constants.%.4] -// CHECK:STDOUT: %.loc8_25.1: f64 = value_of_initializer %float.negate [template = constants.%.4] -// CHECK:STDOUT: %.loc8_25.2: f64 = converted %float.negate, %.loc8_25.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_21: f64 = float_literal 1.5 [template = constants.%.2] +// CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%.loc8_21) [template = constants.%.3] +// CHECK:STDOUT: %.loc8_25.1: f64 = value_of_initializer %float.negate [template = constants.%.3] +// CHECK:STDOUT: %.loc8_25.2: f64 = converted %float.negate, %.loc8_25.1 [template = constants.%.3] // CHECK:STDOUT: %a: f64 = bind_name a, %.loc8_25.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -185,7 +185,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 1526888b1131..b6ffe29ce130 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -38,23 +38,23 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] // CHECK:STDOUT: %Neq: %Neq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.7: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal true [template] -// CHECK:STDOUT: %.9: bool = bool_literal false [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.6: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal true [template] +// CHECK:STDOUT: %.8: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -150,14 +150,14 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -173,11 +173,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Neq.ref.loc8: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc8_20: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc8_25: f64 = float_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %float.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_20, %.loc8_25) [template = constants.%.8] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.neq.loc8 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.neq.loc8, %.loc8_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc8_20: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_25: f64 = float_literal 2 [template = constants.%.6] +// CHECK:STDOUT: %float.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_20, %.loc8_25) [template = constants.%.7] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %float.neq.loc8 [template = constants.%.7] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %float.neq.loc8, %.loc8_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -192,11 +192,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Neq.ref.loc9: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_26: f64 = float_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %float.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.9] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.neq.loc9 [template = constants.%.9] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.neq.loc9, %.loc9_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_26: f64 = float_literal 1 [template = constants.%.5] +// CHECK:STDOUT: %float.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.8] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %float.neq.loc9 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %float.neq.loc9, %.loc9_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -228,7 +228,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] // CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 1c16d489d117..d746702a55fb 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -55,15 +55,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 2 [template] -// CHECK:STDOUT: %.4: f64 = float_literal 0.5 [template] -// CHECK:STDOUT: %.5: f64 = float_literal 1.5 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 2 [template] +// CHECK:STDOUT: %.3: f64 = float_literal 0.5 [template] +// CHECK:STDOUT: %.4: f64 = float_literal 1.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -163,9 +163,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.4] -// CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%.loc8_18, %.loc8_23) [template = constants.%.5] +// CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.3] +// CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%.loc8_18, %.loc8_23) [template = constants.%.4] // CHECK:STDOUT: assign file.%x.var, %float.sub // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -175,7 +175,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index 7c489df14b24..2edb2ffb422d 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -23,15 +23,15 @@ fn RuntimeCall(a: i32, b: i32) -> 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: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 12 [template] -// CHECK:STDOUT: %.3: i32 = int_value 10 [template] -// CHECK:STDOUT: %.4: i32 = int_value 8 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %.2: i32 = int_value 10 [template] +// CHECK:STDOUT: %.3: i32 = int_value 8 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,20 +80,20 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_24: i32 = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %int.and: init i32 = call %And.ref(%.loc4_20, %.loc4_24) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_24: i32 = int_value 10 [template = constants.%.2] +// CHECK:STDOUT: %int.and: init i32 = call %And.ref(%.loc4_20, %.loc4_24) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_27: type = array_type %int.and, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_27: type = array_type %int.and, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 8 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 8 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -137,9 +137,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index dfa996fa81df..e7704b72c386 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -24,18 +24,18 @@ fn RuntimeCall(a: i32) -> 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: %Complement.type: type = fn_type @Complement [template] // CHECK:STDOUT: %Complement: %Complement.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1193046 [template] -// CHECK:STDOUT: %.3: i32 = int_value -1193047 [template] -// CHECK:STDOUT: %.4: i32 = int_value 16777215 [template] -// CHECK:STDOUT: %.5: i32 = int_value 15584169 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1193046 [template] +// CHECK:STDOUT: %.2: i32 = int_value -1193047 [template] +// CHECK:STDOUT: %.3: i32 = int_value 16777215 [template] +// CHECK:STDOUT: %.4: i32 = int_value 15584169 [template] +// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -103,23 +103,23 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %Complement.ref: %Complement.type = name_ref Complement, %Complement.decl [template = constants.%Complement] -// CHECK:STDOUT: %.loc5_31: i32 = int_value 1193046 [template = constants.%.2] -// CHECK:STDOUT: %int.complement: init i32 = call %Complement.ref(%.loc5_31) [template = constants.%.3] -// CHECK:STDOUT: %.loc5_42: i32 = int_value 16777215 [template = constants.%.4] -// CHECK:STDOUT: %.loc5_30.1: i32 = value_of_initializer %int.complement [template = constants.%.3] -// CHECK:STDOUT: %.loc5_30.2: i32 = converted %int.complement, %.loc5_30.1 [template = constants.%.3] -// CHECK:STDOUT: %int.and: init i32 = call %And.ref(%.loc5_30.2, %.loc5_42) [template = constants.%.5] +// CHECK:STDOUT: %.loc5_31: i32 = int_value 1193046 [template = constants.%.1] +// CHECK:STDOUT: %int.complement: init i32 = call %Complement.ref(%.loc5_31) [template = constants.%.2] +// CHECK:STDOUT: %.loc5_42: i32 = int_value 16777215 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_30.1: i32 = value_of_initializer %int.complement [template = constants.%.2] +// CHECK:STDOUT: %.loc5_30.2: i32 = converted %int.complement, %.loc5_30.1 [template = constants.%.2] +// CHECK:STDOUT: %int.and: init i32 = call %And.ref(%.loc5_30.2, %.loc5_42) [template = constants.%.4] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %.loc5_51: type = array_type %int.and, i32 [template = constants.%.6] -// CHECK:STDOUT: %arr.var: ref %.6 = var arr -// CHECK:STDOUT: %arr: ref %.6 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc5_51: type = array_type %int.and, i32 [template = constants.%.5] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_18: i32 = int_value 15584169 [template = constants.%.5] +// CHECK:STDOUT: %.loc6_18: i32 = int_value 15584169 [template = constants.%.4] // CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_32.loc6, %.loc6_13.1 [template = i32] -// CHECK:STDOUT: %.loc6_26: type = array_type %.loc6_18, i32 [template = constants.%.6] -// CHECK:STDOUT: %.loc6_27: type = ptr_type %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc6_26: type = array_type %.loc6_18, i32 [template = constants.%.5] +// CHECK:STDOUT: %.loc6_27: type = ptr_type %.5 [template = constants.%.6] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -157,9 +157,9 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.6 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc6: %.7 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.7 = bind_name arr_p, %.loc6 +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc6: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 521c5ab7ae3e..b2f10d22d572 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -37,23 +37,23 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] // CHECK:STDOUT: %Eq: %Eq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: bool = bool_literal true [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal false [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: bool = bool_literal true [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -145,14 +145,14 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -168,11 +168,11 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Eq.ref.loc8: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc8_19: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_22: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_22) [template = constants.%.6] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %int.eq.loc8 [template = constants.%.6] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %int.eq.loc8, %.loc8_13.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc8_19: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_22: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_22) [template = constants.%.5] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %int.eq.loc8 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %int.eq.loc8, %.loc8_13.1 [template = constants.%.5] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -187,11 +187,11 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Eq.ref.loc9: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %.loc9_20: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.eq.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.eq.loc9, %.loc9_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_20: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_23: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.eq.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.eq.loc9, %.loc9_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -222,7 +222,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // 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: %WrongResult.type: type = fn_type @WrongResult [template] // CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 9fa86a6dc7bb..a74c5aee3858 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -32,7 +32,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -41,18 +41,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal false [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %.9: bool = bool_literal true [template] -// CHECK:STDOUT: %.10: i32 = int_value -1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: bool = bool_literal false [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.8: bool = bool_literal true [template] +// CHECK:STDOUT: %.9: i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -162,14 +162,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -187,11 +187,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc9: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc9_25: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_28: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_28) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater.loc9, %.loc9_14.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_25: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_28: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_28) [template = constants.%.6] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater.loc9 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater.loc9, %.loc9_14.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -206,11 +206,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc10: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc10_25: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_28: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_28) [template = constants.%.7] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.greater.loc10 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.greater.loc10, %.loc10_14.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_25: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_28: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_28) [template = constants.%.6] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.greater.loc10 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.greater.loc10, %.loc10_14.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -225,11 +225,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc11: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.9] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater.loc11 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater.loc11, %.loc11_13.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_27: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.8] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater.loc11 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater.loc11, %.loc11_13.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -245,14 +245,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc12: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_32: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_36: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_31.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_31.2: i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.10] -// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_36) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_32: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.9] +// CHECK:STDOUT: %.loc12_36: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_31.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.9] +// CHECK:STDOUT: %.loc12_31.2: i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.9] +// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_36) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -267,15 +267,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc13: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc13_24: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_24: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_34: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_33.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_33.2: i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.10] -// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_33.2) [template = constants.%.9] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_34: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_33.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_33.2: i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.9] +// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_33.2) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index bc91c01525d5..087cdcbfebc3 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -32,7 +32,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -41,18 +41,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal false [template] -// CHECK:STDOUT: %.8: bool = bool_literal true [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] -// CHECK:STDOUT: %.10: i32 = int_value -1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: bool = bool_literal false [template] +// CHECK:STDOUT: %.7: bool = bool_literal true [template] +// CHECK:STDOUT: %.8: i32 = int_value 0 [template] +// CHECK:STDOUT: %.9: i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -162,14 +162,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -187,11 +187,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc9: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc9_27: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_30: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_30) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater_eq.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater_eq.loc9, %.loc9_14.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_27: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_30: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_30) [template = constants.%.6] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater_eq.loc9 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater_eq.loc9, %.loc9_14.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -206,11 +206,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc10: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc10_26: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_29: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_29) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.greater_eq.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.greater_eq.loc10, %.loc10_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_26: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_29: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_29) [template = constants.%.7] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.greater_eq.loc10 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.greater_eq.loc10, %.loc10_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -225,11 +225,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc11: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_29: i32 = int_value 0 [template = constants.%.9] -// CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_29) [template = constants.%.8] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater_eq.loc11 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater_eq.loc11, %.loc11_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_29: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_29) [template = constants.%.7] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater_eq.loc11 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater_eq.loc11, %.loc11_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -245,14 +245,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc12: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_34: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_38: i32 = int_value 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_33.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_33.2: i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.10] -// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_38) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_34: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.9] +// CHECK:STDOUT: %.loc12_38: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_33.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.9] +// CHECK:STDOUT: %.loc12_33.2: i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.9] +// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_38) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -267,15 +267,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc13: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc13_26: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_26: i32 = int_value 0 [template = constants.%.8] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_36: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_35.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_35.2: i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.10] -// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_35.2) [template = constants.%.8] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_36: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_35.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_35.2: i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.9] +// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_35.2) [template = constants.%.7] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index 18000dc5e669..c23669b4976d 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -67,15 +67,15 @@ let negative: i32 = LeftShift(1, 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: %LeftShift.type: type = fn_type @LeftShift [template] // CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 5 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 20 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 20 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -124,20 +124,20 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc4_26: i32 = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_29: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.left_shift: init i32 = call %LeftShift.ref(%.loc4_26, %.loc4_29) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_26: i32 = int_value 5 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_29: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.left_shift: init i32 = call %LeftShift.ref(%.loc4_26, %.loc4_29) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_31: type = array_type %int.left_shift, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_31: type = array_type %int.left_shift, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 20 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 20 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_21: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_21: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -181,9 +181,9 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -191,20 +191,20 @@ let negative: i32 = LeftShift(1, 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: %LeftShift.type: type = fn_type @LeftShift [template] // CHECK:STDOUT: %LeftShift: %LeftShift.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 31 [template] -// CHECK:STDOUT: %.4: i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.5: i32 = int_value 32 [template] -// CHECK:STDOUT: %.6: i32 = int_value 33 [template] -// CHECK:STDOUT: %.7: i32 = int_value 1000 [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %.9: i32 = int_value -1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 31 [template] +// CHECK:STDOUT: %.3: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.4: i32 = int_value 32 [template] +// CHECK:STDOUT: %.5: i32 = int_value 33 [template] +// CHECK:STDOUT: %.6: i32 = int_value 1000 [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.8: i32 = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -307,61 +307,61 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %LeftShift.ref.loc8: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc8_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_32: i32 = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %int.left_shift.loc8: init i32 = call %LeftShift.ref.loc8(%.loc8_29, %.loc8_32) [template = constants.%.4] -// CHECK:STDOUT: %.loc8_35.1: i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%.4] -// CHECK:STDOUT: %.loc8_35.2: i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_32: i32 = int_value 31 [template = constants.%.2] +// CHECK:STDOUT: %int.left_shift.loc8: init i32 = call %LeftShift.ref.loc8(%.loc8_29, %.loc8_32) [template = constants.%.3] +// CHECK:STDOUT: %.loc8_35.1: i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_35.2: i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%.3] // CHECK:STDOUT: %size_1: i32 = bind_name size_1, %.loc8_35.2 // CHECK:STDOUT: %LeftShift.ref.loc13: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc13_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_32: i32 = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc13_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_32: i32 = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.left_shift.loc13: init i32 = call %LeftShift.ref.loc13(%.loc13_29, %.loc13_32) [template = ] // CHECK:STDOUT: %.loc13_35.1: i32 = value_of_initializer %int.left_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_35.2: i32 = converted %int.left_shift.loc13, %.loc13_35.1 [template = ] // CHECK:STDOUT: %size_2: i32 = bind_name size_2, %.loc13_35.2 // CHECK:STDOUT: %LeftShift.ref.loc18: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc18_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_32: i32 = int_value 33 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_32: i32 = int_value 33 [template = constants.%.5] // CHECK:STDOUT: %int.left_shift.loc18: init i32 = call %LeftShift.ref.loc18(%.loc18_29, %.loc18_32) [template = ] // CHECK:STDOUT: %.loc18_35.1: i32 = value_of_initializer %int.left_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_35.2: i32 = converted %int.left_shift.loc18, %.loc18_35.1 [template = ] // CHECK:STDOUT: %size_3: i32 = bind_name size_3, %.loc18_35.2 // CHECK:STDOUT: %LeftShift.ref.loc21: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc21_33: i32 = int_value 1000 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_39: i32 = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %int.left_shift.loc21: init i32 = call %LeftShift.ref.loc21(%.loc21_33, %.loc21_39) [template = constants.%.8] -// CHECK:STDOUT: %.loc21_42.1: i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%.8] -// CHECK:STDOUT: %.loc21_42.2: i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc21_33: i32 = int_value 1000 [template = constants.%.6] +// CHECK:STDOUT: %.loc21_39: i32 = int_value 31 [template = constants.%.2] +// CHECK:STDOUT: %int.left_shift.loc21: init i32 = call %LeftShift.ref.loc21(%.loc21_33, %.loc21_39) [template = constants.%.7] +// CHECK:STDOUT: %.loc21_42.1: i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%.7] +// CHECK:STDOUT: %.loc21_42.2: i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%.7] // CHECK:STDOUT: %overflow_1: i32 = bind_name overflow_1, %.loc21_42.2 // CHECK:STDOUT: %LeftShift.ref.loc26: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc26_33: i32 = int_value 1000 [template = constants.%.7] -// CHECK:STDOUT: %.loc26_39: i32 = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc26_33: i32 = int_value 1000 [template = constants.%.6] +// CHECK:STDOUT: %.loc26_39: i32 = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.left_shift.loc26: init i32 = call %LeftShift.ref.loc26(%.loc26_33, %.loc26_39) [template = ] // CHECK:STDOUT: %.loc26_42.1: i32 = value_of_initializer %int.left_shift.loc26 [template = ] // CHECK:STDOUT: %.loc26_42.2: i32 = converted %int.left_shift.loc26, %.loc26_42.1 [template = ] // CHECK:STDOUT: %overflow_2: i32 = bind_name overflow_2, %.loc26_42.2 // CHECK:STDOUT: %LeftShift.ref.loc29: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc29_36: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc29_39: i32 = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %int.left_shift.loc29: init i32 = call %LeftShift.ref.loc29(%.loc29_36, %.loc29_39) [template = constants.%.8] -// CHECK:STDOUT: %.loc29_42.1: i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%.8] -// CHECK:STDOUT: %.loc29_42.2: i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc29_36: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc29_39: i32 = int_value 31 [template = constants.%.2] +// CHECK:STDOUT: %int.left_shift.loc29: init i32 = call %LeftShift.ref.loc29(%.loc29_36, %.loc29_39) [template = constants.%.7] +// CHECK:STDOUT: %.loc29_42.1: i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%.7] +// CHECK:STDOUT: %.loc29_42.2: i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%.7] // CHECK:STDOUT: %no_overflow_1: i32 = bind_name no_overflow_1, %.loc29_42.2 // CHECK:STDOUT: %LeftShift.ref.loc34: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc34_36: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc34_39: i32 = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc34_36: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc34_39: i32 = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.left_shift.loc34: init i32 = call %LeftShift.ref.loc34(%.loc34_36, %.loc34_39) [template = ] // CHECK:STDOUT: %.loc34_42.1: i32 = value_of_initializer %int.left_shift.loc34 [template = ] // CHECK:STDOUT: %.loc34_42.2: i32 = converted %int.left_shift.loc34, %.loc34_42.1 [template = ] // CHECK:STDOUT: %no_overflow_2: i32 = bind_name no_overflow_2, %.loc34_42.2 // CHECK:STDOUT: %LeftShift.ref.loc40: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc40_31: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc40_31: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc40_41: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc40_41) [template = constants.%.9] -// CHECK:STDOUT: %.loc40_40.1: i32 = value_of_initializer %int.snegate [template = constants.%.9] -// CHECK:STDOUT: %.loc40_40.2: i32 = converted %int.snegate, %.loc40_40.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc40_41: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc40_41) [template = constants.%.8] +// CHECK:STDOUT: %.loc40_40.1: i32 = value_of_initializer %int.snegate [template = constants.%.8] +// CHECK:STDOUT: %.loc40_40.2: i32 = converted %int.snegate, %.loc40_40.1 [template = constants.%.8] // CHECK:STDOUT: %int.left_shift.loc40: init i32 = call %LeftShift.ref.loc40(%.loc40_31, %.loc40_40.2) [template = ] // CHECK:STDOUT: %.loc40_44.1: i32 = value_of_initializer %int.left_shift.loc40 [template = ] // CHECK:STDOUT: %.loc40_44.2: i32 = converted %int.left_shift.loc40, %.loc40_44.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index b50605750319..c1abee71677e 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -32,7 +32,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -41,18 +41,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal true [template] -// CHECK:STDOUT: %.8: bool = bool_literal false [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] -// CHECK:STDOUT: %.10: i32 = int_value -1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: bool = bool_literal true [template] +// CHECK:STDOUT: %.7: bool = bool_literal false [template] +// CHECK:STDOUT: %.8: i32 = int_value 0 [template] +// CHECK:STDOUT: %.9: i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -162,14 +162,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -187,11 +187,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc9: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc9_21: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_24: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_24) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less.loc9, %.loc9_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_21: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_24: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_24) [template = constants.%.6] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less.loc9 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less.loc9, %.loc9_13.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -206,11 +206,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc10: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc10: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc10_22: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_25: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_25) [template = constants.%.8] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.less.loc10 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.less.loc10, %.loc10_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_22: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_25: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_25) [template = constants.%.7] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.less.loc10 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.less.loc10, %.loc10_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -225,11 +225,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc11: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc11_22: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_25: i32 = int_value 0 [template = constants.%.9] -// CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_25) [template = constants.%.8] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less.loc11 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less.loc11, %.loc11_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_22: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_25: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_25) [template = constants.%.7] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less.loc11 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less.loc11, %.loc11_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -245,14 +245,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc12: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_28: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_32: i32 = int_value 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_27.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_27.2: i32 = converted %int.snegate.loc12, %.loc12_27.1 [template = constants.%.10] -// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_32) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_28: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.9] +// CHECK:STDOUT: %.loc12_32: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_27.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.9] +// CHECK:STDOUT: %.loc12_27.2: i32 = converted %int.snegate.loc12, %.loc12_27.1 [template = constants.%.9] +// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_32) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -267,15 +267,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc13: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc13_22: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_22: i32 = int_value 0 [template = constants.%.8] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_32: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_32) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_31.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_31.2: i32 = converted %int.snegate.loc13, %.loc13_31.1 [template = constants.%.10] -// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_31.2) [template = constants.%.8] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_32: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_32) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_31.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_31.2: i32 = converted %int.snegate.loc13, %.loc13_31.1 [template = constants.%.9] +// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_31.2) [template = constants.%.7] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 13e0193c0a17..7f958f455e93 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -32,7 +32,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] @@ -41,18 +41,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] // CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: bool = bool_literal true [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %.9: bool = bool_literal false [template] -// CHECK:STDOUT: %.10: i32 = int_value -1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: bool = bool_literal true [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.8: bool = bool_literal false [template] +// CHECK:STDOUT: %.9: i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -162,14 +162,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -187,11 +187,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc9: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc9_23: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_26: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_26) [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less_eq.loc9 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less_eq.loc9, %.loc9_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_23: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_26: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_26) [template = constants.%.6] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less_eq.loc9 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less_eq.loc9, %.loc9_13.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -206,11 +206,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc10: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc10: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc10_23: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_26: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_26) [template = constants.%.7] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.less_eq.loc10 [template = constants.%.7] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.less_eq.loc10, %.loc10_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_23: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_26: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_26) [template = constants.%.6] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.less_eq.loc10 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.less_eq.loc10, %.loc10_13.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -225,11 +225,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc11: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.9] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less_eq.loc11 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less_eq.loc11, %.loc11_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_27: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.8] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less_eq.loc11 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less_eq.loc11, %.loc11_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -245,14 +245,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc12: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_30: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.10] -// CHECK:STDOUT: %.loc12_34: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_29.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_29.2: i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.10] -// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_34) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_30: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.9] +// CHECK:STDOUT: %.loc12_34: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_29.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.9] +// CHECK:STDOUT: %.loc12_29.2: i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.9] +// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_34) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%.6] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -267,15 +267,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc13: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc13_24: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_24: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc13_34: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_33.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_33.2: i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.10] -// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_33.2) [template = constants.%.9] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_34: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_33.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_33.2: i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.9] +// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_33.2) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/make_type_32.carbon b/toolchain/check/testdata/builtins/int/make_type_32.carbon index e5fb31178821..e5c4e973cf3e 100644 --- a/toolchain/check/testdata/builtins/int/make_type_32.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_32.carbon @@ -26,7 +26,7 @@ var i: Int() = 0; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,9 +58,9 @@ var i: Int() = 0; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,7 +91,7 @@ var i: Int() = 0; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc6: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%i.var, %.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index 31233454ce7c..3b34f0460d30 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -92,7 +92,7 @@ var m: Int(1000000000); // 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: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] @@ -137,21 +137,21 @@ var m: Int(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 64 [template] -// CHECK:STDOUT: %.3: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 64 [template] +// CHECK:STDOUT: %.2: type = int_type signed, %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 13 [template] -// CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %.3: i32 = int_value 13 [template] +// CHECK:STDOUT: %.4: type = int_type signed, %.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [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: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %.6: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %.5: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] // CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] // CHECK:STDOUT: } @@ -177,88 +177,88 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %n.patt: %.3 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.3 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.2 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.2 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc6_13: i32 = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc6_12: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%.3] -// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_12 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_12, %.loc6_15.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_13: i32 = int_value 64 [template = constants.%.1] +// CHECK:STDOUT: %int.make_type_signed.loc6_12: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%.2] +// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_12 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_12, %.loc6_15.1 [template = constants.%.2] // CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc6_25: i32 = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc6_24: init type = call %Int.ref.loc6_21(%.loc6_25) [template = constants.%.3] -// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_24 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_24, %.loc6_27.1 [template = constants.%.3] -// CHECK:STDOUT: %n.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.3 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %.loc6_25: i32 = int_value 64 [template = constants.%.1] +// CHECK:STDOUT: %int.make_type_signed.loc6_24: init type = call %Int.ref.loc6_21(%.loc6_25) [template = constants.%.2] +// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_24 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_24, %.loc6_27.1 [template = constants.%.2] +// CHECK:STDOUT: %n.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.2 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %n.patt: %.5 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.5 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.4 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.4 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc10_13: i32 = int_value 13 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc10_12: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%.5] -// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_12 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_12, %.loc10_15.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_13: i32 = int_value 13 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_signed.loc10_12: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%.4] +// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_12 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_12, %.loc10_15.1 [template = constants.%.4] // CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc10_25: i32 = int_value 13 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc10_24: init type = call %Int.ref.loc10_21(%.loc10_25) [template = constants.%.5] -// CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_24 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_24, %.loc10_27.1 [template = constants.%.5] -// CHECK:STDOUT: %n.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.5 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %.loc10_25: i32 = int_value 13 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_signed.loc10_24: init type = call %Int.ref.loc10_21(%.loc10_25) [template = constants.%.4] +// CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_24 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_24, %.loc10_27.1 [template = constants.%.4] +// CHECK:STDOUT: %n.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.4 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Symbolic.decl: %Symbolic.type = fn_decl @Symbolic [template = constants.%Symbolic] { // CHECK:STDOUT: %N.patt.loc14_13.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc14_13.1, runtime_param [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %x.patt: @Symbolic.%.loc14_28 (%.6) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @Symbolic.%.loc14_28 (%.6) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @Symbolic.%.loc14_28 (%.6) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Symbolic.%.loc14_28 (%.6) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @Symbolic.%.loc14_28 (%.5) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @Symbolic.%.loc14_28 (%.5) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Symbolic.%.loc14_28 (%.5) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Symbolic.%.loc14_28 (%.5) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_32, %.loc14_17.1 [template = i32] // CHECK:STDOUT: %Int.ref.loc14_25: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_29: i32 = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed.loc14_28: init type = call %Int.ref.loc14_25(%N.ref.loc14_29) [symbolic = %.loc14_28 (constants.%.6)] -// CHECK:STDOUT: %.loc14_30.1: type = value_of_initializer %int.make_type_signed.loc14_28 [symbolic = %.loc14_28 (constants.%.6)] -// CHECK:STDOUT: %.loc14_30.2: type = converted %int.make_type_signed.loc14_28, %.loc14_30.1 [symbolic = %.loc14_28 (constants.%.6)] +// CHECK:STDOUT: %int.make_type_signed.loc14_28: init type = call %Int.ref.loc14_25(%N.ref.loc14_29) [symbolic = %.loc14_28 (constants.%.5)] +// CHECK:STDOUT: %.loc14_30.1: type = value_of_initializer %int.make_type_signed.loc14_28 [symbolic = %.loc14_28 (constants.%.5)] +// CHECK:STDOUT: %.loc14_30.2: type = converted %int.make_type_signed.loc14_28, %.loc14_30.1 [symbolic = %.loc14_28 (constants.%.5)] // CHECK:STDOUT: %Int.ref.loc14_36: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_40: i32 = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_36(%N.ref.loc14_40) [symbolic = %.loc14_28 (constants.%.6)] -// CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %.loc14_28 (constants.%.6)] -// CHECK:STDOUT: %.loc14_41.2: type = converted %int.make_type_signed.loc14_39, %.loc14_41.1 [symbolic = %.loc14_28 (constants.%.6)] +// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_36(%N.ref.loc14_40) [symbolic = %.loc14_28 (constants.%.5)] +// CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %.loc14_28 (constants.%.5)] +// CHECK:STDOUT: %.loc14_41.2: type = converted %int.make_type_signed.loc14_39, %.loc14_41.1 [symbolic = %.loc14_28 (constants.%.5)] // CHECK:STDOUT: %N.param: i32 = value_param runtime_param // CHECK:STDOUT: %N.loc14_13.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %x.param: @Symbolic.%.loc14_28 (%.6) = value_param runtime_param0 -// CHECK:STDOUT: %x: @Symbolic.%.loc14_28 (%.6) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @Symbolic.%.loc14_28 (%.6) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @Symbolic.%.loc14_28 (%.6) = return_slot %return.param +// CHECK:STDOUT: %x.param: @Symbolic.%.loc14_28 (%.5) = value_param runtime_param0 +// CHECK:STDOUT: %x: @Symbolic.%.loc14_28 (%.5) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @Symbolic.%.loc14_28 (%.5) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @Symbolic.%.loc14_28 (%.5) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%n.param_patt: i32) -> type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param_patt: %.3) -> %.3 { +// CHECK:STDOUT: fn @F(%n.param_patt: %.2) -> %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n.param_patt: %.5) -> %.5 { +// CHECK:STDOUT: fn @G(%n.param_patt: %.4) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.4 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,13 +267,13 @@ var m: Int(1000000000); // CHECK:STDOUT: generic fn @Symbolic(%N.loc14_13.1: i32) { // CHECK:STDOUT: %N.loc14_13.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc14_13.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %.loc14_28: type = int_type signed, %N.loc14_13.2 [symbolic = %.loc14_28 (constants.%.6)] +// CHECK:STDOUT: %.loc14_28: type = int_type signed, %N.loc14_13.2 [symbolic = %.loc14_28 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: i32, %x.param_patt: @Symbolic.%.loc14_28 (%.6)) -> @Symbolic.%.loc14_28 (%.6) { +// CHECK:STDOUT: fn(%N.param_patt: i32, %x.param_patt: @Symbolic.%.loc14_28 (%.5)) -> @Symbolic.%.loc14_28 (%.5) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Symbolic.%.loc14_28 (%.6) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Symbolic.%.loc14_28 (%.5) = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -281,37 +281,37 @@ var m: Int(1000000000); // CHECK:STDOUT: specific @Symbolic(constants.%N) { // CHECK:STDOUT: %N.loc14_13.2 => constants.%N // CHECK:STDOUT: %N.patt.loc14_13.2 => constants.%N -// CHECK:STDOUT: %.loc14_28 => constants.%.6 +// CHECK:STDOUT: %.loc14_28 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 64 [template] -// CHECK:STDOUT: %.3: type = int_type signed, %.2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 64 [template] +// CHECK:STDOUT: %.2: type = int_type signed, %.1 [template] // CHECK:STDOUT: %UseF.type: type = fn_type @UseF [template] // CHECK:STDOUT: %UseF: %UseF.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 13 [template] -// CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] +// CHECK:STDOUT: %.3: i32 = int_value 13 [template] +// CHECK:STDOUT: %.4: type = int_type signed, %.3 [template] // CHECK:STDOUT: %UseG.type: type = fn_type @UseG [template] // CHECK:STDOUT: %UseG: %UseG.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: i32 = int_value 24 [template] -// CHECK:STDOUT: %.7: type = int_type signed, %.6 [template] +// CHECK:STDOUT: %.5: i32 = int_value 24 [template] +// CHECK:STDOUT: %.6: type = int_type signed, %.5 [template] // CHECK:STDOUT: %UseSymbolic.type: type = fn_type @UseSymbolic [template] // CHECK:STDOUT: %UseSymbolic: %UseSymbolic.type = struct_value () [template] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] // CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %.8: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %.7: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %.9: = specific_function %Symbolic, @Symbolic(%.6) [template] +// CHECK:STDOUT: %.8: = specific_function %Symbolic, @Symbolic(%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -339,128 +339,128 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UseF.decl: %UseF.type = fn_decl @UseF [template = constants.%UseF] { -// CHECK:STDOUT: %n.patt: %.3 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.3 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.2 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.2 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc7_12: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc7_16: i32 = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc7_15: init type = call %Int.ref.loc7_12(%.loc7_16) [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_15 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_15, %.loc7_18.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc7_16: i32 = int_value 64 [template = constants.%.1] +// CHECK:STDOUT: %int.make_type_signed.loc7_15: init type = call %Int.ref.loc7_12(%.loc7_16) [template = constants.%.2] +// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_15 [template = constants.%.2] +// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_15, %.loc7_18.1 [template = constants.%.2] // CHECK:STDOUT: %Int.ref.loc7_24: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc7_28: i32 = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call %Int.ref.loc7_24(%.loc7_28) [template = constants.%.3] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_27, %.loc7_30.1 [template = constants.%.3] -// CHECK:STDOUT: %n.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.3 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %.loc7_28: i32 = int_value 64 [template = constants.%.1] +// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call %Int.ref.loc7_24(%.loc7_28) [template = constants.%.2] +// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%.2] +// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_27, %.loc7_30.1 [template = constants.%.2] +// CHECK:STDOUT: %n.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.2 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseG.decl: %UseG.type = fn_decl @UseG [template = constants.%UseG] { -// CHECK:STDOUT: %n.patt: %.5 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.5 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.4 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.4 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc11_12: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc11_16: i32 = int_value 13 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call %Int.ref.loc11_12(%.loc11_16) [template = constants.%.5] -// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_15, %.loc11_18.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_16: i32 = int_value 13 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call %Int.ref.loc11_12(%.loc11_16) [template = constants.%.4] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_15, %.loc11_18.1 [template = constants.%.4] // CHECK:STDOUT: %Int.ref.loc11_24: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc11_28: i32 = int_value 13 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call %Int.ref.loc11_24(%.loc11_28) [template = constants.%.5] -// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_27, %.loc11_30.1 [template = constants.%.5] -// CHECK:STDOUT: %n.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.5 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %.loc11_28: i32 = int_value 13 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call %Int.ref.loc11_24(%.loc11_28) [template = constants.%.4] +// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_27, %.loc11_30.1 [template = constants.%.4] +// CHECK:STDOUT: %n.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.4 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseSymbolic.decl: %UseSymbolic.type = fn_decl @UseSymbolic [template = constants.%UseSymbolic] { -// CHECK:STDOUT: %n.patt: %.7 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.7 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.7 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.7 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.6 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.6 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc15_19: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc15_23: i32 = int_value 24 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call %Int.ref.loc15_19(%.loc15_23) [template = constants.%.7] -// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_22, %.loc15_25.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc15_23: i32 = int_value 24 [template = constants.%.5] +// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call %Int.ref.loc15_19(%.loc15_23) [template = constants.%.6] +// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_22, %.loc15_25.1 [template = constants.%.6] // CHECK:STDOUT: %Int.ref.loc15_31: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %.loc15_35: i32 = int_value 24 [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_signed.loc15_34: init type = call %Int.ref.loc15_31(%.loc15_35) [template = constants.%.7] -// CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_34 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_34, %.loc15_37.1 [template = constants.%.7] -// CHECK:STDOUT: %n.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.7 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.7 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.7 = return_slot %return.param +// CHECK:STDOUT: %.loc15_35: i32 = int_value 24 [template = constants.%.5] +// CHECK:STDOUT: %int.make_type_signed.loc15_34: init type = call %Int.ref.loc15_31(%.loc15_35) [template = constants.%.6] +// CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_34 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_34, %.loc15_37.1 [template = constants.%.6] +// CHECK:STDOUT: %n.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.6 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%n.param_patt: i32) -> type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseF(%n.param_patt: %.3) -> %.3 { +// CHECK:STDOUT: fn @UseF(%n.param_patt: %.2) -> %.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.2 [template = constants.%F] -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, %n -// CHECK:STDOUT: %F.call: init %.3 = call %F.ref(%n.ref) -// CHECK:STDOUT: %.loc8_14.1: %.3 = value_of_initializer %F.call -// CHECK:STDOUT: %.loc8_14.2: %.3 = converted %F.call, %.loc8_14.1 +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, %n +// CHECK:STDOUT: %F.call: init %.2 = call %F.ref(%n.ref) +// CHECK:STDOUT: %.loc8_14.1: %.2 = value_of_initializer %F.call +// CHECK:STDOUT: %.loc8_14.2: %.2 = converted %F.call, %.loc8_14.1 // CHECK:STDOUT: return %.loc8_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param_patt: %.3) -> %.3; +// CHECK:STDOUT: fn @F(%n.param_patt: %.2) -> %.2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseG(%n.param_patt: %.5) -> %.5 { +// CHECK:STDOUT: fn @UseG(%n.param_patt: %.4) -> %.4 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.3 [template = constants.%G] -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, %n -// CHECK:STDOUT: %G.call: init %.5 = call %G.ref(%n.ref) -// CHECK:STDOUT: %.loc12_14.1: %.5 = value_of_initializer %G.call -// CHECK:STDOUT: %.loc12_14.2: %.5 = converted %G.call, %.loc12_14.1 +// CHECK:STDOUT: %n.ref: %.4 = name_ref n, %n +// CHECK:STDOUT: %G.call: init %.4 = call %G.ref(%n.ref) +// CHECK:STDOUT: %.loc12_14.1: %.4 = value_of_initializer %G.call +// CHECK:STDOUT: %.loc12_14.2: %.4 = converted %G.call, %.loc12_14.1 // CHECK:STDOUT: return %.loc12_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n.param_patt: %.5) -> %.5; +// CHECK:STDOUT: fn @G(%n.param_patt: %.4) -> %.4; // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseSymbolic(%n.param_patt: %.7) -> %.7 { +// CHECK:STDOUT: fn @UseSymbolic(%n.param_patt: %.6) -> %.6 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Symbolic.ref: %Symbolic.type = name_ref Symbolic, imports.%import_ref.4 [template = constants.%Symbolic] -// CHECK:STDOUT: %.loc16_19: i32 = int_value 24 [template = constants.%.6] -// CHECK:STDOUT: %n.ref: %.7 = name_ref n, %n -// CHECK:STDOUT: %.loc16_10: = specific_function %Symbolic.ref, @Symbolic(constants.%.6) [template = constants.%.9] -// CHECK:STDOUT: %Symbolic.call: init %.7 = call %.loc16_10(%n.ref) -// CHECK:STDOUT: %.loc16_25.1: %.7 = value_of_initializer %Symbolic.call -// CHECK:STDOUT: %.loc16_25.2: %.7 = converted %Symbolic.call, %.loc16_25.1 +// CHECK:STDOUT: %.loc16_19: i32 = int_value 24 [template = constants.%.5] +// CHECK:STDOUT: %n.ref: %.6 = name_ref n, %n +// CHECK:STDOUT: %.loc16_10: = specific_function %Symbolic.ref, @Symbolic(constants.%.5) [template = constants.%.8] +// CHECK:STDOUT: %Symbolic.call: init %.6 = call %.loc16_10(%n.ref) +// CHECK:STDOUT: %.loc16_25.1: %.6 = value_of_initializer %Symbolic.call +// CHECK:STDOUT: %.loc16_25.2: %.6 = converted %Symbolic.call, %.loc16_25.1 // CHECK:STDOUT: return %.loc16_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Symbolic(constants.%N: i32) { // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)] -// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: i32, %x.param_patt: @Symbolic.%.1 (%.8)) -> @Symbolic.%.1 (%.8); +// CHECK:STDOUT: fn(%N.param_patt: i32, %x.param_patt: @Symbolic.%.1 (%.7)) -> @Symbolic.%.1 (%.7); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Symbolic(constants.%N) { // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %N.patt => constants.%N -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Symbolic(constants.%.6) { -// CHECK:STDOUT: %N => constants.%.6 -// CHECK:STDOUT: %N.patt => constants.%.6 -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: specific @Symbolic(constants.%.5) { +// CHECK:STDOUT: %N => constants.%.5 +// CHECK:STDOUT: %N.patt => constants.%.5 +// CHECK:STDOUT: %.1 => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -469,9 +469,9 @@ var m: Int(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -491,7 +491,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref [template = constants.%Int] -// CHECK:STDOUT: %.loc10_12: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_12: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc10_12) [template = ] // CHECK:STDOUT: %.loc10_13.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc10_13.2: type = converted %int.make_type_signed, %.loc10_13.1 [template = ] @@ -505,14 +505,14 @@ var m: Int(1000000000); // 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: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.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 { @@ -553,10 +553,10 @@ var m: Int(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_19: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_19) [template = constants.%.3] -// CHECK:STDOUT: %.loc12_18.1: i32 = value_of_initializer %int.snegate [template = constants.%.3] -// CHECK:STDOUT: %.loc12_18.2: i32 = converted %int.snegate, %.loc12_18.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_19: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_19) [template = constants.%.2] +// CHECK:STDOUT: %.loc12_18.1: i32 = value_of_initializer %int.snegate [template = constants.%.2] +// CHECK:STDOUT: %.loc12_18.2: i32 = converted %int.snegate, %.loc12_18.1 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_18.2) [template = ] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = ] @@ -574,9 +574,9 @@ var m: Int(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1000000000 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -596,7 +596,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref [template = constants.%Int] -// CHECK:STDOUT: %.loc9_12: i32 = int_value 1000000000 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_12: i32 = int_value 1000000000 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc9_12) [template = ] // CHECK:STDOUT: %.loc9_22.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc9_22.2: type = converted %int.make_type_signed, %.loc9_22.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index aa08c6198812..ac987795e661 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -73,7 +73,7 @@ var m: UInt(1000000000); // 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: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] @@ -118,21 +118,21 @@ var m: UInt(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 64 [template] -// CHECK:STDOUT: %.3: type = int_type unsigned, %.2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 64 [template] +// CHECK:STDOUT: %.2: type = int_type unsigned, %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 13 [template] -// CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] +// CHECK:STDOUT: %.3: i32 = int_value 13 [template] +// CHECK:STDOUT: %.4: type = int_type unsigned, %.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [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: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %.6: type = int_type unsigned, %N [symbolic] +// CHECK:STDOUT: %.5: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] // CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] // CHECK:STDOUT: } @@ -158,88 +158,88 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %n.patt: %.3 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.3 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.2 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.2 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] -// CHECK:STDOUT: %.loc6_14: i32 = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_13: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%.3] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_13 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_13, %.loc6_16.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_14: i32 = int_value 64 [template = constants.%.1] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_13: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%.2] +// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_13 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_13, %.loc6_16.1 [template = constants.%.2] // CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] -// CHECK:STDOUT: %.loc6_27: i32 = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_26: init type = call %UInt.ref.loc6_22(%.loc6_27) [template = constants.%.3] -// CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_26 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_26, %.loc6_29.1 [template = constants.%.3] -// CHECK:STDOUT: %n.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.3 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %.loc6_27: i32 = int_value 64 [template = constants.%.1] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_26: init type = call %UInt.ref.loc6_22(%.loc6_27) [template = constants.%.2] +// CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_26 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_26, %.loc6_29.1 [template = constants.%.2] +// CHECK:STDOUT: %n.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.2 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %n.patt: %.5 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %.5 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %.4 = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %.4 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] -// CHECK:STDOUT: %.loc10_14: i32 = int_value 13 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_13: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%.5] -// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_13 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_13, %.loc10_16.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_14: i32 = int_value 13 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_13: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%.4] +// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_13 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_13, %.loc10_16.1 [template = constants.%.4] // CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] -// CHECK:STDOUT: %.loc10_27: i32 = int_value 13 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_26: init type = call %UInt.ref.loc10_22(%.loc10_27) [template = constants.%.5] -// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_26 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_26, %.loc10_29.1 [template = constants.%.5] -// CHECK:STDOUT: %n.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %n: %.5 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %.loc10_27: i32 = int_value 13 [template = constants.%.3] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_26: init type = call %UInt.ref.loc10_22(%.loc10_27) [template = constants.%.4] +// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_26 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_26, %.loc10_29.1 [template = constants.%.4] +// CHECK:STDOUT: %n.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %n: %.4 = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Symbolic.decl: %Symbolic.type = fn_decl @Symbolic [template = constants.%Symbolic] { // CHECK:STDOUT: %N.patt.loc14_13.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc14_13.1, runtime_param [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %x.patt: @Symbolic.%.loc14_29 (%.6) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @Symbolic.%.loc14_29 (%.6) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @Symbolic.%.loc14_29 (%.6) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Symbolic.%.loc14_29 (%.6) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @Symbolic.%.loc14_29 (%.5) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @Symbolic.%.loc14_29 (%.5) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Symbolic.%.loc14_29 (%.5) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Symbolic.%.loc14_29 (%.5) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_32, %.loc14_17.1 [template = i32] // CHECK:STDOUT: %UInt.ref.loc14_25: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_30: i32 = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_unsigned.loc14_29: init type = call %UInt.ref.loc14_25(%N.ref.loc14_30) [symbolic = %.loc14_29 (constants.%.6)] -// CHECK:STDOUT: %.loc14_31.1: type = value_of_initializer %int.make_type_unsigned.loc14_29 [symbolic = %.loc14_29 (constants.%.6)] -// CHECK:STDOUT: %.loc14_31.2: type = converted %int.make_type_unsigned.loc14_29, %.loc14_31.1 [symbolic = %.loc14_29 (constants.%.6)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_29: init type = call %UInt.ref.loc14_25(%N.ref.loc14_30) [symbolic = %.loc14_29 (constants.%.5)] +// CHECK:STDOUT: %.loc14_31.1: type = value_of_initializer %int.make_type_unsigned.loc14_29 [symbolic = %.loc14_29 (constants.%.5)] +// CHECK:STDOUT: %.loc14_31.2: type = converted %int.make_type_unsigned.loc14_29, %.loc14_31.1 [symbolic = %.loc14_29 (constants.%.5)] // CHECK:STDOUT: %UInt.ref.loc14_37: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_42: i32 = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_unsigned.loc14_41: init type = call %UInt.ref.loc14_37(%N.ref.loc14_42) [symbolic = %.loc14_29 (constants.%.6)] -// CHECK:STDOUT: %.loc14_43.1: type = value_of_initializer %int.make_type_unsigned.loc14_41 [symbolic = %.loc14_29 (constants.%.6)] -// CHECK:STDOUT: %.loc14_43.2: type = converted %int.make_type_unsigned.loc14_41, %.loc14_43.1 [symbolic = %.loc14_29 (constants.%.6)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_41: init type = call %UInt.ref.loc14_37(%N.ref.loc14_42) [symbolic = %.loc14_29 (constants.%.5)] +// CHECK:STDOUT: %.loc14_43.1: type = value_of_initializer %int.make_type_unsigned.loc14_41 [symbolic = %.loc14_29 (constants.%.5)] +// CHECK:STDOUT: %.loc14_43.2: type = converted %int.make_type_unsigned.loc14_41, %.loc14_43.1 [symbolic = %.loc14_29 (constants.%.5)] // CHECK:STDOUT: %N.param: i32 = value_param runtime_param // CHECK:STDOUT: %N.loc14_13.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %x.param: @Symbolic.%.loc14_29 (%.6) = value_param runtime_param0 -// CHECK:STDOUT: %x: @Symbolic.%.loc14_29 (%.6) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @Symbolic.%.loc14_29 (%.6) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @Symbolic.%.loc14_29 (%.6) = return_slot %return.param +// CHECK:STDOUT: %x.param: @Symbolic.%.loc14_29 (%.5) = value_param runtime_param0 +// CHECK:STDOUT: %x: @Symbolic.%.loc14_29 (%.5) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @Symbolic.%.loc14_29 (%.5) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @Symbolic.%.loc14_29 (%.5) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UInt(%n.param_patt: i32) -> type = "int.make_type_unsigned"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param_patt: %.3) -> %.3 { +// CHECK:STDOUT: fn @F(%n.param_patt: %.2) -> %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n.param_patt: %.5) -> %.5 { +// CHECK:STDOUT: fn @G(%n.param_patt: %.4) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.4 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -248,13 +248,13 @@ var m: UInt(1000000000); // CHECK:STDOUT: generic fn @Symbolic(%N.loc14_13.1: i32) { // CHECK:STDOUT: %N.loc14_13.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc14_13.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %.loc14_29: type = int_type unsigned, %N.loc14_13.2 [symbolic = %.loc14_29 (constants.%.6)] +// CHECK:STDOUT: %.loc14_29: type = int_type unsigned, %N.loc14_13.2 [symbolic = %.loc14_29 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: i32, %x.param_patt: @Symbolic.%.loc14_29 (%.6)) -> @Symbolic.%.loc14_29 (%.6) { +// CHECK:STDOUT: fn(%N.param_patt: i32, %x.param_patt: @Symbolic.%.loc14_29 (%.5)) -> @Symbolic.%.loc14_29 (%.5) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Symbolic.%.loc14_29 (%.6) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Symbolic.%.loc14_29 (%.5) = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -262,16 +262,16 @@ var m: UInt(1000000000); // CHECK:STDOUT: specific @Symbolic(constants.%N) { // CHECK:STDOUT: %N.loc14_13.2 => constants.%N // CHECK:STDOUT: %N.patt.loc14_13.2 => constants.%N -// CHECK:STDOUT: %.loc14_29 => constants.%.6 +// CHECK:STDOUT: %.loc14_29 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_zero_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -291,7 +291,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref [template = constants.%UInt] -// CHECK:STDOUT: %.loc10_13: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_13: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc10_13) [template = ] // CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc10_14.2: type = converted %int.make_type_unsigned, %.loc10_14.1 [template = ] @@ -305,14 +305,14 @@ var m: UInt(1000000000); // 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: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.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 { @@ -353,10 +353,10 @@ var m: UInt(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_20: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_20) [template = constants.%.3] -// CHECK:STDOUT: %.loc12_19.1: i32 = value_of_initializer %int.snegate [template = constants.%.3] -// CHECK:STDOUT: %.loc12_19.2: i32 = converted %int.snegate, %.loc12_19.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_20: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_20) [template = constants.%.2] +// CHECK:STDOUT: %.loc12_19.1: i32 = value_of_initializer %int.snegate [template = constants.%.2] +// CHECK:STDOUT: %.loc12_19.2: i32 = converted %int.snegate, %.loc12_19.1 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_19.2) [template = ] // CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_unsigned, %.loc12_22.1 [template = ] @@ -374,9 +374,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1000000000 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -396,7 +396,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref [template = constants.%UInt] -// CHECK:STDOUT: %.loc9_13: i32 = int_value 1000000000 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_13: i32 = int_value 1000000000 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc9_13) [template = ] // CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index 95c3ddd552c0..c065d696843b 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -28,23 +28,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // 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: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] // CHECK:STDOUT: %Neq: %Neq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: bool = bool_literal false [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %.8: bool = bool_literal true [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: bool = bool_literal false [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %.7: bool = bool_literal true [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -136,14 +136,14 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -159,11 +159,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Neq.ref.loc8: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc8_21: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_24: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21, %.loc8_24) [template = constants.%.6] -// CHECK:STDOUT: %.loc8_14.1: bool = value_of_initializer %int.neq.loc8 [template = constants.%.6] -// CHECK:STDOUT: %.loc8_14.2: bool = converted %int.neq.loc8, %.loc8_14.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc8_21: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_24: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21, %.loc8_24) [template = constants.%.5] +// CHECK:STDOUT: %.loc8_14.1: bool = value_of_initializer %int.neq.loc8 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_14.2: bool = converted %int.neq.loc8, %.loc8_14.1 [template = constants.%.5] // CHECK:STDOUT: if %.loc8_14.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -178,11 +178,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc8_14.3: type = block_arg !if.expr.result.loc8 [template = constants.%False] // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Neq.ref.loc9: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %.loc9_20: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.8] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.neq.loc9 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.neq.loc9, %.loc9_13.1 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_20: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_23: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.7] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.neq.loc9 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.neq.loc9, %.loc9_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index fc5cbf8c3cda..c3269efac132 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -23,15 +23,15 @@ fn RuntimeCall(a: i32, b: i32) -> 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: %Or.type: type = fn_type @Or [template] // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 12 [template] -// CHECK:STDOUT: %.3: i32 = int_value 10 [template] -// CHECK:STDOUT: %.4: i32 = int_value 14 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %.2: i32 = int_value 10 [template] +// CHECK:STDOUT: %.3: i32 = int_value 14 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,20 +80,20 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, %Or.decl [template = constants.%Or] -// CHECK:STDOUT: %.loc4_19: i32 = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %int.or: init i32 = call %Or.ref(%.loc4_19, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_19: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 10 [template = constants.%.2] +// CHECK:STDOUT: %int.or: init i32 = call %Or.ref(%.loc4_19, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_26: type = array_type %int.or, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_26: type = array_type %int.or, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 14 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 14 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_21: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_21: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -137,9 +137,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index b9aab91b1bab..21d367a89911 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -68,15 +68,15 @@ let negative: i32 = RightShift(1, 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: %RightShift.type: type = fn_type @RightShift [template] // CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 22 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 5 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 22 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 5 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -125,20 +125,20 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc4_27: i32 = int_value 22 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_31: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.right_shift: init i32 = call %RightShift.ref(%.loc4_27, %.loc4_31) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_27: i32 = int_value 22 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_31: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.right_shift: init i32 = call %RightShift.ref(%.loc4_27, %.loc4_31) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_33: type = array_type %int.right_shift, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_33: type = array_type %int.right_shift, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 5 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 5 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -182,9 +182,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -192,23 +192,23 @@ let negative: i32 = RightShift(1, 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: %RightShift.type: type = fn_type @RightShift [template] // CHECK:STDOUT: %RightShift: %RightShift.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: %.4: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_value 10 [template] -// CHECK:STDOUT: %.7: i32 = int_value -10 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %.9: i32 = int_value -3 [template] -// CHECK:STDOUT: %.10: i32 = int_value 3 [template] -// CHECK:STDOUT: %.11: type = array_type %.10, i32 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value -1 [template] +// CHECK:STDOUT: %.3: type = array_type %.1, i32 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: i32 = int_value 10 [template] +// CHECK:STDOUT: %.6: i32 = int_value -10 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.8: i32 = int_value -3 [template] +// CHECK:STDOUT: %.9: i32 = int_value 3 [template] +// CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -276,50 +276,50 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %Negate.ref.loc10_17: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %RightShift.ref.loc10: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %Negate.ref.loc10_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc10_42: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc10_41: init i32 = call %Negate.ref.loc10_35(%.loc10_42) [template = constants.%.3] -// CHECK:STDOUT: %.loc10_46: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_41.1: i32 = value_of_initializer %int.snegate.loc10_41 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_41.2: i32 = converted %int.snegate.loc10_41, %.loc10_41.1 [template = constants.%.3] -// CHECK:STDOUT: %int.right_shift.loc10: init i32 = call %RightShift.ref.loc10(%.loc10_41.2, %.loc10_46) [template = constants.%.3] -// CHECK:STDOUT: %.loc10_34.1: i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_34.2: i32 = converted %int.right_shift.loc10, %.loc10_34.1 [template = constants.%.3] -// CHECK:STDOUT: %int.snegate.loc10_23: init i32 = call %Negate.ref.loc10_17(%.loc10_34.2) [template = constants.%.2] +// CHECK:STDOUT: %.loc10_42: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc10_41: init i32 = call %Negate.ref.loc10_35(%.loc10_42) [template = constants.%.2] +// CHECK:STDOUT: %.loc10_46: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc10_41.1: i32 = value_of_initializer %int.snegate.loc10_41 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_41.2: i32 = converted %int.snegate.loc10_41, %.loc10_41.1 [template = constants.%.2] +// CHECK:STDOUT: %int.right_shift.loc10: init i32 = call %RightShift.ref.loc10(%.loc10_41.2, %.loc10_46) [template = constants.%.2] +// CHECK:STDOUT: %.loc10_34.1: i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_34.2: i32 = converted %int.right_shift.loc10, %.loc10_34.1 [template = constants.%.2] +// CHECK:STDOUT: %int.snegate.loc10_23: init i32 = call %Negate.ref.loc10_17(%.loc10_34.2) [template = constants.%.1] // CHECK:STDOUT: %.loc10_12.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_32.loc10, %.loc10_12.1 [template = i32] -// CHECK:STDOUT: %.loc10_49: type = array_type %int.snegate.loc10_23, i32 [template = constants.%.4] -// CHECK:STDOUT: %arr1.var: ref %.4 = var arr1 -// CHECK:STDOUT: %arr1: ref %.4 = bind_name arr1, %arr1.var +// CHECK:STDOUT: %.loc10_49: type = array_type %int.snegate.loc10_23, i32 [template = constants.%.3] +// CHECK:STDOUT: %arr1.var: ref %.3 = var arr1 +// CHECK:STDOUT: %arr1: ref %.3 = bind_name arr1, %arr1.var // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_19: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_19: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11, %.loc11_14.1 [template = i32] -// CHECK:STDOUT: %.loc11_20: type = array_type %.loc11_19, i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_21: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_20: type = array_type %.loc11_19, i32 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_21: type = ptr_type %.3 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Negate.ref.loc14_17: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %RightShift.ref.loc14: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %Negate.ref.loc14_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc14_42: i32 = int_value 10 [template = constants.%.6] -// CHECK:STDOUT: %int.snegate.loc14_41: init i32 = call %Negate.ref.loc14_35(%.loc14_42) [template = constants.%.7] -// CHECK:STDOUT: %.loc14_47: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc14_41.1: i32 = value_of_initializer %int.snegate.loc14_41 [template = constants.%.7] -// CHECK:STDOUT: %.loc14_41.2: i32 = converted %int.snegate.loc14_41, %.loc14_41.1 [template = constants.%.7] -// CHECK:STDOUT: %int.right_shift.loc14: init i32 = call %RightShift.ref.loc14(%.loc14_41.2, %.loc14_47) [template = constants.%.9] -// CHECK:STDOUT: %.loc14_34.1: i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.9] -// CHECK:STDOUT: %.loc14_34.2: i32 = converted %int.right_shift.loc14, %.loc14_34.1 [template = constants.%.9] -// CHECK:STDOUT: %int.snegate.loc14_23: init i32 = call %Negate.ref.loc14_17(%.loc14_34.2) [template = constants.%.10] +// CHECK:STDOUT: %.loc14_42: i32 = int_value 10 [template = constants.%.5] +// CHECK:STDOUT: %int.snegate.loc14_41: init i32 = call %Negate.ref.loc14_35(%.loc14_42) [template = constants.%.6] +// CHECK:STDOUT: %.loc14_47: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc14_41.1: i32 = value_of_initializer %int.snegate.loc14_41 [template = constants.%.6] +// CHECK:STDOUT: %.loc14_41.2: i32 = converted %int.snegate.loc14_41, %.loc14_41.1 [template = constants.%.6] +// CHECK:STDOUT: %int.right_shift.loc14: init i32 = call %RightShift.ref.loc14(%.loc14_41.2, %.loc14_47) [template = constants.%.8] +// CHECK:STDOUT: %.loc14_34.1: i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.8] +// CHECK:STDOUT: %.loc14_34.2: i32 = converted %int.right_shift.loc14, %.loc14_34.1 [template = constants.%.8] +// CHECK:STDOUT: %int.snegate.loc14_23: init i32 = call %Negate.ref.loc14_17(%.loc14_34.2) [template = constants.%.9] // CHECK:STDOUT: %.loc14_12.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_12.2: type = converted %int.make_type_32.loc14, %.loc14_12.1 [template = i32] -// CHECK:STDOUT: %.loc14_50: type = array_type %int.snegate.loc14_23, i32 [template = constants.%.11] -// CHECK:STDOUT: %arr2.var: ref %.11 = var arr2 -// CHECK:STDOUT: %arr2: ref %.11 = bind_name arr2, %arr2.var +// CHECK:STDOUT: %.loc14_50: type = array_type %int.snegate.loc14_23, i32 [template = constants.%.10] +// CHECK:STDOUT: %arr2.var: ref %.10 = var arr2 +// CHECK:STDOUT: %arr2: ref %.10 = bind_name arr2, %arr2.var // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_19: i32 = int_value 3 [template = constants.%.10] +// CHECK:STDOUT: %.loc15_19: i32 = int_value 3 [template = constants.%.9] // CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_32.loc15, %.loc15_14.1 [template = i32] -// CHECK:STDOUT: %.loc15_20: type = array_type %.loc15_19, i32 [template = constants.%.11] -// CHECK:STDOUT: %.loc15_21: type = ptr_type %.11 [template = constants.%.12] +// CHECK:STDOUT: %.loc15_20: type = array_type %.loc15_19, i32 [template = constants.%.10] +// CHECK:STDOUT: %.loc15_21: type = ptr_type %.10 [template = constants.%.11] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -330,12 +330,12 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr1.ref: ref %.4 = name_ref arr1, file.%arr1 -// CHECK:STDOUT: %.loc11: %.5 = addr_of %arr1.ref -// CHECK:STDOUT: %arr1_p: %.5 = bind_name arr1_p, %.loc11 -// CHECK:STDOUT: %arr2.ref: ref %.11 = name_ref arr2, file.%arr2 -// CHECK:STDOUT: %.loc15: %.12 = addr_of %arr2.ref -// CHECK:STDOUT: %arr2_p: %.12 = bind_name arr2_p, %.loc15 +// CHECK:STDOUT: %arr1.ref: ref %.3 = name_ref arr1, file.%arr1 +// CHECK:STDOUT: %.loc11: %.4 = addr_of %arr1.ref +// CHECK:STDOUT: %arr1_p: %.4 = bind_name arr1_p, %.loc11 +// CHECK:STDOUT: %arr2.ref: ref %.10 = name_ref arr2, file.%arr2 +// CHECK:STDOUT: %.loc15: %.11 = addr_of %arr2.ref +// CHECK:STDOUT: %arr2_p: %.11 = bind_name arr2_p, %.loc15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -343,18 +343,18 @@ let negative: i32 = RightShift(1, 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: %RightShift.type: type = fn_type @RightShift [template] // CHECK:STDOUT: %RightShift: %RightShift.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 31 [template] -// CHECK:STDOUT: %.4: i32 = int_value 0 [template] -// CHECK:STDOUT: %.5: i32 = int_value 32 [template] -// CHECK:STDOUT: %.6: i32 = int_value 33 [template] -// CHECK:STDOUT: %.7: i32 = int_value -1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 31 [template] +// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.4: i32 = int_value 32 [template] +// CHECK:STDOUT: %.5: i32 = int_value 33 [template] +// CHECK:STDOUT: %.6: i32 = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -441,33 +441,33 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %RightShift.ref.loc8: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc8_30: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_33: i32 = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %int.right_shift.loc8: init i32 = call %RightShift.ref.loc8(%.loc8_30, %.loc8_33) [template = constants.%.4] -// CHECK:STDOUT: %.loc8_36.1: i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%.4] -// CHECK:STDOUT: %.loc8_36.2: i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_30: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_33: i32 = int_value 31 [template = constants.%.2] +// CHECK:STDOUT: %int.right_shift.loc8: init i32 = call %RightShift.ref.loc8(%.loc8_30, %.loc8_33) [template = constants.%.3] +// CHECK:STDOUT: %.loc8_36.1: i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_36.2: i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%.3] // CHECK:STDOUT: %size_1: i32 = bind_name size_1, %.loc8_36.2 // CHECK:STDOUT: %RightShift.ref.loc13: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc13_30: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_33: i32 = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc13_30: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_33: i32 = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.right_shift.loc13: init i32 = call %RightShift.ref.loc13(%.loc13_30, %.loc13_33) [template = ] // CHECK:STDOUT: %.loc13_36.1: i32 = value_of_initializer %int.right_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_36.2: i32 = converted %int.right_shift.loc13, %.loc13_36.1 [template = ] // CHECK:STDOUT: %size_2: i32 = bind_name size_2, %.loc13_36.2 // CHECK:STDOUT: %RightShift.ref.loc18: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc18_30: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_33: i32 = int_value 33 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_30: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_33: i32 = int_value 33 [template = constants.%.5] // CHECK:STDOUT: %int.right_shift.loc18: init i32 = call %RightShift.ref.loc18(%.loc18_30, %.loc18_33) [template = ] // CHECK:STDOUT: %.loc18_36.1: i32 = value_of_initializer %int.right_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_36.2: i32 = converted %int.right_shift.loc18, %.loc18_36.1 [template = ] // CHECK:STDOUT: %size_3: i32 = bind_name size_3, %.loc18_36.2 // CHECK:STDOUT: %RightShift.ref.loc24: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %.loc24_32: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc24_32: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc24_42: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc24_42) [template = constants.%.7] -// CHECK:STDOUT: %.loc24_41.1: i32 = value_of_initializer %int.snegate [template = constants.%.7] -// CHECK:STDOUT: %.loc24_41.2: i32 = converted %int.snegate, %.loc24_41.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_42: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc24_42) [template = constants.%.6] +// CHECK:STDOUT: %.loc24_41.1: i32 = value_of_initializer %int.snegate [template = constants.%.6] +// CHECK:STDOUT: %.loc24_41.2: i32 = converted %int.snegate, %.loc24_41.1 [template = constants.%.6] // CHECK:STDOUT: %int.right_shift.loc24: init i32 = call %RightShift.ref.loc24(%.loc24_32, %.loc24_41.2) [template = ] // CHECK:STDOUT: %.loc24_45.1: i32 = value_of_initializer %int.right_shift.loc24 [template = ] // CHECK:STDOUT: %.loc24_45.2: i32 = converted %int.right_shift.loc24, %.loc24_45.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index d1b2df57e478..8801b4c44f1f 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -93,15 +93,15 @@ let b: i32 = Add(0x7FFFFFFF, 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: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 3 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -150,20 +150,20 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.sadd, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.sadd, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -207,9 +207,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -217,7 +217,7 @@ let b: i32 = Add(0x7FFFFFFF, 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: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] @@ -229,9 +229,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.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: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -365,30 +365,30 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %.loc25: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc25: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%.loc25) // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc30_35: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc30_35: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32, %.loc30_35) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35_42: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_45: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc35_42: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc35_45: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42, %.loc35_45) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc44_31: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_37: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc44_31: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc44_34: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc44_37: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_32.loc44 [template = i32] // CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_32.loc44, %.loc44_16.1 [template = i32] // CHECK:STDOUT: %.loc44_39: type = array_type , i32 [template = ] @@ -517,14 +517,14 @@ let b: i32 = Add(0x7FFFFFFF, 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: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -583,18 +583,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Add.ref.loc6: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc6_18: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_30: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %int.sadd.loc6: init i32 = call %Add.ref.loc6(%.loc6_18, %.loc6_30) [template = constants.%.2] -// CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.sadd.loc6 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_18: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_30: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int.sadd.loc6: init i32 = call %Add.ref.loc6(%.loc6_18, %.loc6_30) [template = constants.%.1] +// CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.sadd.loc6 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%.1] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Add.ref.loc10: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc10_18: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_30: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.sadd.loc10: init i32 = call %Add.ref.loc10(%.loc10_18, %.loc10_30) [template = constants.%.5] -// CHECK:STDOUT: %.loc10_32.1: i32 = value_of_initializer %int.sadd.loc10 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_32.2: i32 = converted %int.sadd.loc10, %.loc10_32.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_18: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %.loc10_30: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.sadd.loc10: init i32 = call %Add.ref.loc10(%.loc10_18, %.loc10_30) [template = constants.%.4] +// CHECK:STDOUT: %.loc10_32.1: i32 = value_of_initializer %int.sadd.loc10 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_32.2: i32 = converted %int.sadd.loc10, %.loc10_32.1 [template = constants.%.4] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc10_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index 466cee7138bd..a9aa02012f66 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -61,15 +61,15 @@ let b: i32 = Div(0, 0); // 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: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 3 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -118,20 +118,20 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.sdiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.sdiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.sdiv, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.sdiv, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -175,9 +175,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -185,7 +185,7 @@ let b: i32 = Div(0, 0); // 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: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] @@ -193,11 +193,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Sub: %Sub.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 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -1 [template] -// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -1 [template] +// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -308,54 +308,54 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.2] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.snegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] -// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.5] -// CHECK:STDOUT: %int.sdiv.loc9: init i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.2] -// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.snegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.4] +// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.4] +// CHECK:STDOUT: %int.sdiv.loc9: init i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.1] +// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.1] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.6] -// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.6] -// CHECK:STDOUT: %int.sdiv.loc12: init i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.6] -// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.5] +// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.5] +// CHECK:STDOUT: %int.sdiv.loc12: init i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.5] +// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.5] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Div.ref.loc19: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc19: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc19_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc19_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc19_28: init i32 = call %Negate.ref.loc19_22(%.loc19_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc19_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc19_28.1: i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.3] -// CHECK:STDOUT: %.loc19_28.2: i32 = converted %int.snegate.loc19_28, %.loc19_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc19: init i32 = call %Sub.ref.loc19(%.loc19_28.2, %.loc19_43) [template = constants.%.6] +// CHECK:STDOUT: %.loc19_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc19_28: init i32 = call %Negate.ref.loc19_22(%.loc19_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc19_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_28.1: i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.2] +// CHECK:STDOUT: %.loc19_28.2: i32 = converted %int.snegate.loc19_28, %.loc19_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc19: init i32 = call %Sub.ref.loc19(%.loc19_28.2, %.loc19_43) [template = constants.%.5] // CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc19_54: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.snegate.loc19_53: init i32 = call %Negate.ref.loc19_47(%.loc19_54) [template = constants.%.5] -// CHECK:STDOUT: %.loc19_21.1: i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_21.2: i32 = converted %int.ssub.loc19, %.loc19_21.1 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_53.1: i32 = value_of_initializer %int.snegate.loc19_53 [template = constants.%.5] -// CHECK:STDOUT: %.loc19_53.2: i32 = converted %int.snegate.loc19_53, %.loc19_53.1 [template = constants.%.5] -// CHECK:STDOUT: %int.sdiv.loc19: init i32 = call %Div.ref.loc19(%.loc19_21.2, %.loc19_53.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc19_57.1: i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_57.2: i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc19_54: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.snegate.loc19_53: init i32 = call %Negate.ref.loc19_47(%.loc19_54) [template = constants.%.4] +// CHECK:STDOUT: %.loc19_21.1: i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_21.2: i32 = converted %int.ssub.loc19, %.loc19_21.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_53.1: i32 = value_of_initializer %int.snegate.loc19_53 [template = constants.%.4] +// CHECK:STDOUT: %.loc19_53.2: i32 = converted %int.snegate.loc19_53, %.loc19_53.1 [template = constants.%.4] +// CHECK:STDOUT: %int.sdiv.loc19: init i32 = call %Div.ref.loc19(%.loc19_21.2, %.loc19_53.2) [template = constants.%.5] +// CHECK:STDOUT: %.loc19_57.1: i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_57.2: i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%.5] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc19_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -364,12 +364,12 @@ let b: i32 = Div(0, 0); // 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: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -428,15 +428,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc10_18: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_18: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc10_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.sdiv.loc10: init i32 = call %Div.ref.loc10(%.loc10_18, %.loc10_21) [template = ] // CHECK:STDOUT: %.loc10_23.1: i32 = value_of_initializer %int.sdiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: i32 = converted %int.sdiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc10_23.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc15_18: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_18: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.sdiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_18, %.loc15_21) [template = ] // CHECK:STDOUT: %.loc15_23.1: i32 = value_of_initializer %int.sdiv.loc15 [template = ] // CHECK:STDOUT: %.loc15_23.2: i32 = converted %int.sdiv.loc15, %.loc15_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index c5f0f35d61a7..29c533faef57 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -64,15 +64,15 @@ let b: i32 = Mod(0, 0); // 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: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 5 [template] -// CHECK:STDOUT: %.3: i32 = int_value 3 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] +// CHECK:STDOUT: %.2: i32 = int_value 3 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -121,20 +121,20 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %int.smod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 5 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %int.smod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.smod, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.smod, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -178,9 +178,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -188,7 +188,7 @@ let b: i32 = Mod(0, 0); // 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: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] @@ -196,12 +196,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Sub: %Sub.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 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 0 [template] -// CHECK:STDOUT: %.7: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -312,54 +312,54 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.2] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.snegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] -// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.5] -// CHECK:STDOUT: %int.smod.loc9: init i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.smod.loc9 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.snegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.4] +// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.4] +// CHECK:STDOUT: %int.smod.loc9: init i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.5] +// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.smod.loc9 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.5] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.7] -// CHECK:STDOUT: %int.smod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.6] -// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.smod.loc12 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.6] +// CHECK:STDOUT: %int.smod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.5] +// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.smod.loc12 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.5] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Mod.ref.loc20: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc20: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc20_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc20_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc20_28: init i32 = call %Negate.ref.loc20_22(%.loc20_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc20_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc20_28.1: i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_28.2: i32 = converted %int.snegate.loc20_28, %.loc20_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc20: init i32 = call %Sub.ref.loc20(%.loc20_28.2, %.loc20_43) [template = constants.%.7] +// CHECK:STDOUT: %.loc20_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc20_28: init i32 = call %Negate.ref.loc20_22(%.loc20_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc20_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc20_28.1: i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_28.2: i32 = converted %int.snegate.loc20_28, %.loc20_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc20: init i32 = call %Sub.ref.loc20(%.loc20_28.2, %.loc20_43) [template = constants.%.6] // CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc20_54: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.snegate.loc20_53: init i32 = call %Negate.ref.loc20_47(%.loc20_54) [template = constants.%.5] -// CHECK:STDOUT: %.loc20_21.1: i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.7] -// CHECK:STDOUT: %.loc20_21.2: i32 = converted %int.ssub.loc20, %.loc20_21.1 [template = constants.%.7] -// CHECK:STDOUT: %.loc20_53.1: i32 = value_of_initializer %int.snegate.loc20_53 [template = constants.%.5] -// CHECK:STDOUT: %.loc20_53.2: i32 = converted %int.snegate.loc20_53, %.loc20_53.1 [template = constants.%.5] -// CHECK:STDOUT: %int.smod.loc20: init i32 = call %Mod.ref.loc20(%.loc20_21.2, %.loc20_53.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc20_57.1: i32 = value_of_initializer %int.smod.loc20 [template = constants.%.6] -// CHECK:STDOUT: %.loc20_57.2: i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc20_54: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.snegate.loc20_53: init i32 = call %Negate.ref.loc20_47(%.loc20_54) [template = constants.%.4] +// CHECK:STDOUT: %.loc20_21.1: i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.6] +// CHECK:STDOUT: %.loc20_21.2: i32 = converted %int.ssub.loc20, %.loc20_21.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc20_53.1: i32 = value_of_initializer %int.snegate.loc20_53 [template = constants.%.4] +// CHECK:STDOUT: %.loc20_53.2: i32 = converted %int.snegate.loc20_53, %.loc20_53.1 [template = constants.%.4] +// CHECK:STDOUT: %int.smod.loc20: init i32 = call %Mod.ref.loc20(%.loc20_21.2, %.loc20_53.2) [template = constants.%.5] +// CHECK:STDOUT: %.loc20_57.1: i32 = value_of_initializer %int.smod.loc20 [template = constants.%.5] +// CHECK:STDOUT: %.loc20_57.2: i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%.5] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc20_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -368,12 +368,12 @@ let b: i32 = Mod(0, 0); // 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: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -432,15 +432,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc12_18: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_18: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.smod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_18, %.loc12_21) [template = ] // CHECK:STDOUT: %.loc12_23.1: i32 = value_of_initializer %int.smod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: i32 = converted %int.smod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc12_23.2 // CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc17_18: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc17_18: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc17_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.smod.loc17: init i32 = call %Mod.ref.loc17(%.loc17_18, %.loc17_21) [template = ] // CHECK:STDOUT: %.loc17_23.1: i32 = value_of_initializer %int.smod.loc17 [template = ] // CHECK:STDOUT: %.loc17_23.2: i32 = converted %int.smod.loc17, %.loc17_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index a8367c734a05..e4a7763efad8 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -35,15 +35,15 @@ let b: i32 = Mul(0x8000, 0x10000); // 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: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 3 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 6 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -92,20 +92,20 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.smul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.smul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.smul, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.smul, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 6 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 6 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -149,9 +149,9 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -159,15 +159,15 @@ let b: i32 = Mul(0x8000, 0x10000); // 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: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 32767 [template] -// CHECK:STDOUT: %.3: i32 = int_value 65536 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2147418112 [template] -// CHECK:STDOUT: %.5: i32 = int_value 32768 [template] -// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 32767 [template] +// CHECK:STDOUT: %.2: i32 = int_value 65536 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2147418112 [template] +// CHECK:STDOUT: %.4: i32 = int_value 32768 [template] +// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -226,18 +226,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc6_18: i32 = int_value 32767 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_26: i32 = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %int.smul.loc6: init i32 = call %Mul.ref.loc6(%.loc6_18, %.loc6_26) [template = constants.%.4] -// CHECK:STDOUT: %.loc6_34.1: i32 = value_of_initializer %int.smul.loc6 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_34.2: i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_18: i32 = int_value 32767 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_26: i32 = int_value 65536 [template = constants.%.2] +// CHECK:STDOUT: %int.smul.loc6: init i32 = call %Mul.ref.loc6(%.loc6_18, %.loc6_26) [template = constants.%.3] +// CHECK:STDOUT: %.loc6_34.1: i32 = value_of_initializer %int.smul.loc6 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_34.2: i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%.3] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc6_34.2 // CHECK:STDOUT: %Mul.ref.loc10: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc10_18: i32 = int_value 32768 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_26: i32 = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %int.smul.loc10: init i32 = call %Mul.ref.loc10(%.loc10_18, %.loc10_26) [template = constants.%.6] -// CHECK:STDOUT: %.loc10_34.1: i32 = value_of_initializer %int.smul.loc10 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_34.2: i32 = converted %int.smul.loc10, %.loc10_34.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc10_18: i32 = int_value 32768 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_26: i32 = int_value 65536 [template = constants.%.2] +// CHECK:STDOUT: %int.smul.loc10: init i32 = call %Mul.ref.loc10(%.loc10_18, %.loc10_26) [template = constants.%.5] +// CHECK:STDOUT: %.loc10_34.1: i32 = value_of_initializer %int.smul.loc10 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_34.2: i32 = converted %int.smul.loc10, %.loc10_34.1 [template = constants.%.5] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc10_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 683bd593a67f..a614af4076f4 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -120,16 +120,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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 123 [template] -// CHECK:STDOUT: %.3: i32 = int_value -123 [template] -// CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value -1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 123 [template] +// CHECK:STDOUT: %.2: i32 = int_value -123 [template] +// CHECK:STDOUT: %.3: type = array_type %.1, i32 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -173,22 +173,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc4_30: i32 = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc4_29: init i32 = call %Negate.ref.loc4_23(%.loc4_30) [template = constants.%.3] -// CHECK:STDOUT: %.loc4_29.1: i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_29.2: i32 = converted %int.snegate.loc4_29, %.loc4_29.1 [template = constants.%.3] -// CHECK:STDOUT: %int.snegate.loc4_22: init i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.2] +// CHECK:STDOUT: %.loc4_30: i32 = int_value 123 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc4_29: init i32 = call %Negate.ref.loc4_23(%.loc4_30) [template = constants.%.2] +// CHECK:STDOUT: %.loc4_29.1: i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_29.2: i32 = converted %int.snegate.loc4_29, %.loc4_29.1 [template = constants.%.2] +// CHECK:STDOUT: %int.snegate.loc4_22: init i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.1] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_35: type = array_type %int.snegate.loc4_22, i32 [template = constants.%.4] -// CHECK:STDOUT: %arr.var: ref %.4 = var arr -// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_35: type = array_type %int.snegate.loc4_22, i32 [template = constants.%.3] +// CHECK:STDOUT: %arr.var: ref %.3 = var arr +// CHECK:STDOUT: %arr: ref %.3 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 123 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 123 [template = constants.%.1] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc5_22: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, i32 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_22: type = ptr_type %.3 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] @@ -234,14 +234,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.3 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.4 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.4 = bind_name arr_p, %.loc5 // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc7_21: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc7_21) [template = constants.%.7] -// CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.snegate [template = constants.%.7] -// CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.snegate, %.loc7_23.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc7_21: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc7_21) [template = constants.%.6] +// CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.snegate [template = constants.%.6] +// CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.snegate, %.loc7_23.1 [template = constants.%.6] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc7_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -250,7 +250,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] @@ -262,8 +262,8 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -374,21 +374,21 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc35: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc44_31: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc44_31: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc44_34: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_32.loc44 [template = i32] // CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_32.loc44, %.loc44_16.1 [template = i32] // CHECK:STDOUT: %.loc44_36: type = array_type , i32 [template = ] @@ -508,16 +508,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -597,28 +597,28 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc8_28: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc8_27: init i32 = call %Negate.ref.loc8_21(%.loc8_28) [template = constants.%.3] -// CHECK:STDOUT: %.loc8_27.1: i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_27.2: i32 = converted %int.snegate.loc8_27, %.loc8_27.1 [template = constants.%.3] -// CHECK:STDOUT: %int.snegate.loc8_20: init i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.2] -// CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.snegate.loc8_20 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.snegate.loc8_20, %.loc8_40.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_28: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc8_27: init i32 = call %Negate.ref.loc8_21(%.loc8_28) [template = constants.%.2] +// CHECK:STDOUT: %.loc8_27.1: i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_27.2: i32 = converted %int.snegate.loc8_27, %.loc8_27.1 [template = constants.%.2] +// CHECK:STDOUT: %int.snegate.loc8_20: init i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.1] +// CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.snegate.loc8_20 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.snegate.loc8_20, %.loc8_40.1 [template = constants.%.1] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc14_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc14_32: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.snegate.loc14_31: init i32 = call %Negate.ref.loc14_25(%.loc14_32) [template = constants.%.3] -// CHECK:STDOUT: %.loc14_45: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_31.1: i32 = value_of_initializer %int.snegate.loc14_31 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_31.2: i32 = converted %int.snegate.loc14_31, %.loc14_31.1 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%.loc14_31.2, %.loc14_45) [template = constants.%.5] -// CHECK:STDOUT: %.loc14_24.1: i32 = value_of_initializer %int.ssub [template = constants.%.5] -// CHECK:STDOUT: %.loc14_24.2: i32 = converted %int.ssub, %.loc14_24.1 [template = constants.%.5] -// CHECK:STDOUT: %int.snegate.loc14_20: init i32 = call %Negate.ref.loc14_14(%.loc14_24.2) [template = constants.%.5] -// CHECK:STDOUT: %.loc14_48.1: i32 = value_of_initializer %int.snegate.loc14_20 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_48.2: i32 = converted %int.snegate.loc14_20, %.loc14_48.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_32: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.snegate.loc14_31: init i32 = call %Negate.ref.loc14_25(%.loc14_32) [template = constants.%.2] +// CHECK:STDOUT: %.loc14_45: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_31.1: i32 = value_of_initializer %int.snegate.loc14_31 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_31.2: i32 = converted %int.snegate.loc14_31, %.loc14_31.1 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%.loc14_31.2, %.loc14_45) [template = constants.%.4] +// CHECK:STDOUT: %.loc14_24.1: i32 = value_of_initializer %int.ssub [template = constants.%.4] +// CHECK:STDOUT: %.loc14_24.2: i32 = converted %int.ssub, %.loc14_24.1 [template = constants.%.4] +// CHECK:STDOUT: %int.snegate.loc14_20: init i32 = call %Negate.ref.loc14_14(%.loc14_24.2) [template = constants.%.4] +// CHECK:STDOUT: %.loc14_48.1: i32 = value_of_initializer %int.snegate.loc14_20 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_48.2: i32 = converted %int.snegate.loc14_20, %.loc14_48.1 [template = constants.%.4] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc14_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 5ad30b6d9759..7125456b2395 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -36,15 +36,15 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 3 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -93,20 +93,20 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.ssub, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.ssub, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -150,9 +150,9 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -160,16 +160,16 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -232,35 +232,35 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc6_18: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_21: i32 = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc6: init i32 = call %Sub.ref.loc6(%.loc6_18, %.loc6_21) [template = constants.%.4] -// CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.ssub.loc6 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_18: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_21: i32 = int_value 2147483647 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc6: init i32 = call %Sub.ref.loc6(%.loc6_18, %.loc6_21) [template = constants.%.3] +// CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.ssub.loc6 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%.3] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc7_22: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_25: i32 = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.4] -// CHECK:STDOUT: %.loc7_38: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc7_21.1: i32 = value_of_initializer %int.ssub.loc7_21 [template = constants.%.4] -// CHECK:STDOUT: %.loc7_21.2: i32 = converted %int.ssub.loc7_21, %.loc7_21.1 [template = constants.%.4] -// CHECK:STDOUT: %int.ssub.loc7_17: init i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38) [template = constants.%.6] -// CHECK:STDOUT: %.loc7_40.1: i32 = value_of_initializer %int.ssub.loc7_17 [template = constants.%.6] -// CHECK:STDOUT: %.loc7_40.2: i32 = converted %int.ssub.loc7_17, %.loc7_40.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc7_22: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_25: i32 = int_value 2147483647 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc7_38: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc7_21.1: i32 = value_of_initializer %int.ssub.loc7_21 [template = constants.%.3] +// CHECK:STDOUT: %.loc7_21.2: i32 = converted %int.ssub.loc7_21, %.loc7_21.1 [template = constants.%.3] +// CHECK:STDOUT: %int.ssub.loc7_17: init i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38) [template = constants.%.5] +// CHECK:STDOUT: %.loc7_40.1: i32 = value_of_initializer %int.ssub.loc7_17 [template = constants.%.5] +// CHECK:STDOUT: %.loc7_40.2: i32 = converted %int.ssub.loc7_17, %.loc7_40.1 [template = constants.%.5] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc11_22: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25: i32 = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %int.ssub.loc11_21: init i32 = call %Sub.ref.loc11_18(%.loc11_22, %.loc11_25) [template = constants.%.4] -// CHECK:STDOUT: %.loc11_38: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_21.1: i32 = value_of_initializer %int.ssub.loc11_21 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_21.2: i32 = converted %int.ssub.loc11_21, %.loc11_21.1 [template = constants.%.4] -// CHECK:STDOUT: %int.ssub.loc11_17: init i32 = call %Sub.ref.loc11_14(%.loc11_21.2, %.loc11_38) [template = constants.%.3] -// CHECK:STDOUT: %.loc11_40.1: i32 = value_of_initializer %int.ssub.loc11_17 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_40.2: i32 = converted %int.ssub.loc11_17, %.loc11_40.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_22: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_25: i32 = int_value 2147483647 [template = constants.%.2] +// CHECK:STDOUT: %int.ssub.loc11_21: init i32 = call %Sub.ref.loc11_18(%.loc11_22, %.loc11_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc11_38: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc11_21.1: i32 = value_of_initializer %int.ssub.loc11_21 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_21.2: i32 = converted %int.ssub.loc11_21, %.loc11_21.1 [template = constants.%.3] +// CHECK:STDOUT: %int.ssub.loc11_17: init i32 = call %Sub.ref.loc11_14(%.loc11_21.2, %.loc11_38) [template = constants.%.2] +// CHECK:STDOUT: %.loc11_40.1: i32 = value_of_initializer %int.ssub.loc11_17 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_40.2: i32 = converted %int.ssub.loc11_17, %.loc11_40.1 [template = constants.%.2] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc11_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index e5ec2b4ac2d7..f38d9ee15cf7 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -90,15 +90,15 @@ let b: i32 = Add(0x7FFFFFFF, 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: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 3 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -147,20 +147,20 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.uadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.uadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.uadd, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.uadd, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -204,9 +204,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,7 +214,7 @@ let b: i32 = Add(0x7FFFFFFF, 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: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] @@ -226,9 +226,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.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: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -362,30 +362,30 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %.loc25: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc25: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%.loc25) // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc30_35: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc30_35: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32, %.loc30_35) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35_42: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_45: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc35_42: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc35_45: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42, %.loc35_45) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc43_31: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc43_34: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc43_37: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc43_31: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc43_34: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc43_37: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %.loc43_16.1: type = value_of_initializer %int.make_type_32.loc43 [template = i32] // CHECK:STDOUT: %.loc43_16.2: type = converted %int.make_type_32.loc43, %.loc43_16.1 [template = i32] // CHECK:STDOUT: %.loc43_39: type = array_type , i32 [template = ] @@ -514,14 +514,14 @@ let b: i32 = Add(0x7FFFFFFF, 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: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -580,18 +580,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Add.ref.loc7: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc7_18: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_30: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %int.uadd.loc7: init i32 = call %Add.ref.loc7(%.loc7_18, %.loc7_30) [template = constants.%.2] -// CHECK:STDOUT: %.loc7_32.1: i32 = value_of_initializer %int.uadd.loc7 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_32.2: i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc7_18: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_30: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %int.uadd.loc7: init i32 = call %Add.ref.loc7(%.loc7_18, %.loc7_30) [template = constants.%.1] +// CHECK:STDOUT: %.loc7_32.1: i32 = value_of_initializer %int.uadd.loc7 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_32.2: i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%.1] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc7_32.2 // CHECK:STDOUT: %Add.ref.loc8: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc8_18: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_30: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.uadd.loc8: init i32 = call %Add.ref.loc8(%.loc8_18, %.loc8_30) [template = constants.%.5] -// CHECK:STDOUT: %.loc8_32.1: i32 = value_of_initializer %int.uadd.loc8 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_32.2: i32 = converted %int.uadd.loc8, %.loc8_32.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_18: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_30: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.uadd.loc8: init i32 = call %Add.ref.loc8(%.loc8_18, %.loc8_30) [template = constants.%.4] +// CHECK:STDOUT: %.loc8_32.1: i32 = value_of_initializer %int.uadd.loc8 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_32.2: i32 = converted %int.uadd.loc8, %.loc8_32.1 [template = constants.%.4] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc8_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index d1f7fa300c83..724806875494 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -57,15 +57,15 @@ let b: i32 = Div(0, 0); // 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: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 3 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -114,20 +114,20 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.udiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.udiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.udiv, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.udiv, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -171,9 +171,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -181,7 +181,7 @@ let b: i32 = Div(0, 0); // 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: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] @@ -189,12 +189,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Sub: %Sub.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 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 0 [template] -// CHECK:STDOUT: %.7: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -305,54 +305,54 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.2] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.unegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] -// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.5] -// CHECK:STDOUT: %int.udiv.loc9: init i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.unegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.4] +// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.4] +// CHECK:STDOUT: %int.udiv.loc9: init i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.5] +// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.5] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.usub.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.7] -// CHECK:STDOUT: %int.udiv.loc12: init i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.usub.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.6] +// CHECK:STDOUT: %int.udiv.loc12: init i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.6] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc15_28: init i32 = call %Negate.ref.loc15_22(%.loc15_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc15_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_28.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_28.2: i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43) [template = constants.%.7] +// CHECK:STDOUT: %.loc15_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc15_28: init i32 = call %Negate.ref.loc15_22(%.loc15_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc15_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_28.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_28.2: i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43) [template = constants.%.6] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_54: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.unegate.loc15_53: init i32 = call %Negate.ref.loc15_47(%.loc15_54) [template = constants.%.5] -// CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_53.1: i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_53.2: i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.5] -// CHECK:STDOUT: %int.udiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc15_57.1: i32 = value_of_initializer %int.udiv.loc15 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_57.2: i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_54: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.unegate.loc15_53: init i32 = call %Negate.ref.loc15_47(%.loc15_54) [template = constants.%.4] +// CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_53.1: i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_53.2: i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.4] +// CHECK:STDOUT: %int.udiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.5] +// CHECK:STDOUT: %.loc15_57.1: i32 = value_of_initializer %int.udiv.loc15 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_57.2: i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%.5] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc15_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -361,12 +361,12 @@ let b: i32 = Div(0, 0); // 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: %Div.type: type = fn_type @Div [template] // CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -425,15 +425,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc10_18: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_18: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc10_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.udiv.loc10: init i32 = call %Div.ref.loc10(%.loc10_18, %.loc10_21) [template = ] // CHECK:STDOUT: %.loc10_23.1: i32 = value_of_initializer %int.udiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: i32 = converted %int.udiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc10_23.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %.loc15_18: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_18: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.udiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_18, %.loc15_21) [template = ] // CHECK:STDOUT: %.loc15_23.1: i32 = value_of_initializer %int.udiv.loc15 [template = ] // CHECK:STDOUT: %.loc15_23.2: i32 = converted %int.udiv.loc15, %.loc15_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index b5d74985370c..8182d124ea3e 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -59,15 +59,15 @@ let b: i32 = Mod(0, 0); // 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: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 5 [template] -// CHECK:STDOUT: %.3: i32 = int_value 3 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] +// CHECK:STDOUT: %.2: i32 = int_value 3 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -116,20 +116,20 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %int.umod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 5 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %int.umod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.umod, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.umod, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -173,9 +173,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -183,7 +183,7 @@ let b: i32 = Mod(0, 0); // 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: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] @@ -191,12 +191,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Sub: %Sub.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 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -1 [template] -// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -1 [template] +// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -307,54 +307,54 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc9_25: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.2] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.unegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] -// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.5] -// CHECK:STDOUT: %int.umod.loc9: init i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.3] -// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.umod.loc9 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc9_46: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.unegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.4] +// CHECK:STDOUT: %.loc9_24.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_24.2: i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_45.1: i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_45.2: i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.4] +// CHECK:STDOUT: %int.umod.loc9: init i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.2] +// CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.umod.loc9 [template = constants.%.2] +// CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.2] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.6] -// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.usub.loc12 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.6] -// CHECK:STDOUT: %int.umod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.7] -// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.umod.loc12 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc12_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_28.1: i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_28.2: i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc12: init i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43) [template = constants.%.5] +// CHECK:STDOUT: %.loc12_47: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_21.1: i32 = value_of_initializer %int.usub.loc12 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_21.2: i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.5] +// CHECK:STDOUT: %int.umod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.umod.loc12 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.6] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Mod.ref.loc15: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_29: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc15_28: init i32 = call %Negate.ref.loc15_22(%.loc15_29) [template = constants.%.3] -// CHECK:STDOUT: %.loc15_43: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_28.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_28.2: i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43) [template = constants.%.6] +// CHECK:STDOUT: %.loc15_29: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc15_28: init i32 = call %Negate.ref.loc15_22(%.loc15_29) [template = constants.%.2] +// CHECK:STDOUT: %.loc15_43: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_28.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_28.2: i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43) [template = constants.%.5] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_54: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %int.unegate.loc15_53: init i32 = call %Negate.ref.loc15_47(%.loc15_54) [template = constants.%.5] -// CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_53.1: i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_53.2: i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.5] -// CHECK:STDOUT: %int.umod.loc15: init i32 = call %Mod.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc15_57.1: i32 = value_of_initializer %int.umod.loc15 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_57.2: i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_54: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %int.unegate.loc15_53: init i32 = call %Negate.ref.loc15_47(%.loc15_54) [template = constants.%.4] +// CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_53.1: i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_53.2: i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.4] +// CHECK:STDOUT: %int.umod.loc15: init i32 = call %Mod.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.5] +// CHECK:STDOUT: %.loc15_57.1: i32 = value_of_initializer %int.umod.loc15 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_57.2: i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%.5] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc15_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -363,12 +363,12 @@ let b: i32 = Mod(0, 0); // 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: %Mod.type: type = fn_type @Mod [template] // CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -427,15 +427,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc12_18: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_18: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.umod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_18, %.loc12_21) [template = ] // CHECK:STDOUT: %.loc12_23.1: i32 = value_of_initializer %int.umod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: i32 = converted %int.umod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc12_23.2 // CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %.loc17_18: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_21: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc17_18: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc17_21: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %int.umod.loc17: init i32 = call %Mod.ref.loc17(%.loc17_18, %.loc17_21) [template = ] // CHECK:STDOUT: %.loc17_23.1: i32 = value_of_initializer %int.umod.loc17 [template = ] // CHECK:STDOUT: %.loc17_23.2: i32 = converted %int.umod.loc17, %.loc17_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index d4686b395dbb..72b9447d283e 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -32,15 +32,15 @@ let b: i32 = Mul(0x8000, 0x10000); // 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: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 3 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 6 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -89,20 +89,20 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.umul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.umul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.umul, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.umul, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 6 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 6 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -146,9 +146,9 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -156,15 +156,15 @@ let b: i32 = Mul(0x8000, 0x10000); // 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: %Mul.type: type = fn_type @Mul [template] // CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 32767 [template] -// CHECK:STDOUT: %.3: i32 = int_value 65536 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2147418112 [template] -// CHECK:STDOUT: %.5: i32 = int_value 32768 [template] -// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 32767 [template] +// CHECK:STDOUT: %.2: i32 = int_value 65536 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2147418112 [template] +// CHECK:STDOUT: %.4: i32 = int_value 32768 [template] +// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -223,18 +223,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc6_18: i32 = int_value 32767 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_26: i32 = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %int.umul.loc6: init i32 = call %Mul.ref.loc6(%.loc6_18, %.loc6_26) [template = constants.%.4] -// CHECK:STDOUT: %.loc6_34.1: i32 = value_of_initializer %int.umul.loc6 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_34.2: i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_18: i32 = int_value 32767 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_26: i32 = int_value 65536 [template = constants.%.2] +// CHECK:STDOUT: %int.umul.loc6: init i32 = call %Mul.ref.loc6(%.loc6_18, %.loc6_26) [template = constants.%.3] +// CHECK:STDOUT: %.loc6_34.1: i32 = value_of_initializer %int.umul.loc6 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_34.2: i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%.3] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc6_34.2 // CHECK:STDOUT: %Mul.ref.loc7: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc7_18: i32 = int_value 32768 [template = constants.%.5] -// CHECK:STDOUT: %.loc7_26: i32 = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %int.umul.loc7: init i32 = call %Mul.ref.loc7(%.loc7_18, %.loc7_26) [template = constants.%.6] -// CHECK:STDOUT: %.loc7_34.1: i32 = value_of_initializer %int.umul.loc7 [template = constants.%.6] -// CHECK:STDOUT: %.loc7_34.2: i32 = converted %int.umul.loc7, %.loc7_34.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc7_18: i32 = int_value 32768 [template = constants.%.4] +// CHECK:STDOUT: %.loc7_26: i32 = int_value 65536 [template = constants.%.2] +// CHECK:STDOUT: %int.umul.loc7: init i32 = call %Mul.ref.loc7(%.loc7_18, %.loc7_26) [template = constants.%.5] +// CHECK:STDOUT: %.loc7_34.1: i32 = value_of_initializer %int.umul.loc7 [template = constants.%.5] +// CHECK:STDOUT: %.loc7_34.2: i32 = converted %int.umul.loc7, %.loc7_34.1 [template = constants.%.5] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc7_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 4e5438e304c6..20849dcbaf67 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -116,16 +116,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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 123 [template] -// CHECK:STDOUT: %.3: i32 = int_value -123 [template] -// CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value -1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 123 [template] +// CHECK:STDOUT: %.2: i32 = int_value -123 [template] +// CHECK:STDOUT: %.3: type = array_type %.1, i32 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -169,22 +169,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc4_30: i32 = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc4_29: init i32 = call %Negate.ref.loc4_23(%.loc4_30) [template = constants.%.3] -// CHECK:STDOUT: %.loc4_29.1: i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_29.2: i32 = converted %int.unegate.loc4_29, %.loc4_29.1 [template = constants.%.3] -// CHECK:STDOUT: %int.unegate.loc4_22: init i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.2] +// CHECK:STDOUT: %.loc4_30: i32 = int_value 123 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc4_29: init i32 = call %Negate.ref.loc4_23(%.loc4_30) [template = constants.%.2] +// CHECK:STDOUT: %.loc4_29.1: i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_29.2: i32 = converted %int.unegate.loc4_29, %.loc4_29.1 [template = constants.%.2] +// CHECK:STDOUT: %int.unegate.loc4_22: init i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.1] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_35: type = array_type %int.unegate.loc4_22, i32 [template = constants.%.4] -// CHECK:STDOUT: %arr.var: ref %.4 = var arr -// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_35: type = array_type %int.unegate.loc4_22, i32 [template = constants.%.3] +// CHECK:STDOUT: %arr.var: ref %.3 = var arr +// CHECK:STDOUT: %arr: ref %.3 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 123 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 123 [template = constants.%.1] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc5_22: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, i32 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_22: type = ptr_type %.3 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] @@ -230,14 +230,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.3 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.4 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.4 = bind_name arr_p, %.loc5 // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc7_21: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %int.unegate: init i32 = call %Negate.ref(%.loc7_21) [template = constants.%.7] -// CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.unegate [template = constants.%.7] -// CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.unegate, %.loc7_23.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc7_21: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %int.unegate: init i32 = call %Negate.ref(%.loc7_21) [template = constants.%.6] +// CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.unegate [template = constants.%.6] +// CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.unegate, %.loc7_23.1 [template = constants.%.6] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc7_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -246,7 +246,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] @@ -258,8 +258,8 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -370,21 +370,21 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc30_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc30_32: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %.loc35: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc35: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %.loc44_31: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc44_31: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc44_34: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_32.loc44 [template = i32] // CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_32.loc44, %.loc44_16.1 [template = i32] // CHECK:STDOUT: %.loc44_36: type = array_type , i32 [template = ] @@ -504,16 +504,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.2: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -593,28 +593,28 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc8_28: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc8_27: init i32 = call %Negate.ref.loc8_21(%.loc8_28) [template = constants.%.3] -// CHECK:STDOUT: %.loc8_27.1: i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_27.2: i32 = converted %int.unegate.loc8_27, %.loc8_27.1 [template = constants.%.3] -// CHECK:STDOUT: %int.unegate.loc8_20: init i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.2] -// CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.unegate.loc8_20 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.unegate.loc8_20, %.loc8_40.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_28: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc8_27: init i32 = call %Negate.ref.loc8_21(%.loc8_28) [template = constants.%.2] +// CHECK:STDOUT: %.loc8_27.1: i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_27.2: i32 = converted %int.unegate.loc8_27, %.loc8_27.1 [template = constants.%.2] +// CHECK:STDOUT: %int.unegate.loc8_20: init i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.1] +// CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.unegate.loc8_20 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.unegate.loc8_20, %.loc8_40.1 [template = constants.%.1] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc11_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc11_32: i32 = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %int.unegate.loc11_31: init i32 = call %Negate.ref.loc11_25(%.loc11_32) [template = constants.%.3] -// CHECK:STDOUT: %.loc11_45: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_31.1: i32 = value_of_initializer %int.unegate.loc11_31 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_31.2: i32 = converted %int.unegate.loc11_31, %.loc11_31.1 [template = constants.%.3] -// CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%.loc11_31.2, %.loc11_45) [template = constants.%.5] -// CHECK:STDOUT: %.loc11_24.1: i32 = value_of_initializer %int.usub [template = constants.%.5] -// CHECK:STDOUT: %.loc11_24.2: i32 = converted %int.usub, %.loc11_24.1 [template = constants.%.5] -// CHECK:STDOUT: %int.unegate.loc11_20: init i32 = call %Negate.ref.loc11_14(%.loc11_24.2) [template = constants.%.5] -// CHECK:STDOUT: %.loc11_48.1: i32 = value_of_initializer %int.unegate.loc11_20 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_48.2: i32 = converted %int.unegate.loc11_20, %.loc11_48.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_32: i32 = int_value 2147483647 [template = constants.%.1] +// CHECK:STDOUT: %int.unegate.loc11_31: init i32 = call %Negate.ref.loc11_25(%.loc11_32) [template = constants.%.2] +// CHECK:STDOUT: %.loc11_45: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_31.1: i32 = value_of_initializer %int.unegate.loc11_31 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_31.2: i32 = converted %int.unegate.loc11_31, %.loc11_31.1 [template = constants.%.2] +// CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%.loc11_31.2, %.loc11_45) [template = constants.%.4] +// CHECK:STDOUT: %.loc11_24.1: i32 = value_of_initializer %int.usub [template = constants.%.4] +// CHECK:STDOUT: %.loc11_24.2: i32 = converted %int.usub, %.loc11_24.1 [template = constants.%.4] +// CHECK:STDOUT: %int.unegate.loc11_20: init i32 = call %Negate.ref.loc11_14(%.loc11_24.2) [template = constants.%.4] +// CHECK:STDOUT: %.loc11_48.1: i32 = value_of_initializer %int.unegate.loc11_20 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_48.2: i32 = converted %int.unegate.loc11_20, %.loc11_48.1 [template = constants.%.4] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc11_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index cb6e4b8bd527..de8ce3cd35a0 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -33,15 +33,15 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 3 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -90,20 +90,20 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_25: type = array_type %int.usub, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25: type = array_type %int.usub, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -147,9 +147,9 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -157,16 +157,16 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] // CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.4: i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.3: i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -229,35 +229,35 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc6_18: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_21: i32 = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc6: init i32 = call %Sub.ref.loc6(%.loc6_18, %.loc6_21) [template = constants.%.4] -// CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.usub.loc6 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_18: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_21: i32 = int_value 2147483647 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc6: init i32 = call %Sub.ref.loc6(%.loc6_18, %.loc6_21) [template = constants.%.3] +// CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.usub.loc6 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%.3] // CHECK:STDOUT: %a: i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc7_22: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_25: i32 = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.4] -// CHECK:STDOUT: %.loc7_38: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc7_21.1: i32 = value_of_initializer %int.usub.loc7_21 [template = constants.%.4] -// CHECK:STDOUT: %.loc7_21.2: i32 = converted %int.usub.loc7_21, %.loc7_21.1 [template = constants.%.4] -// CHECK:STDOUT: %int.usub.loc7_17: init i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38) [template = constants.%.6] -// CHECK:STDOUT: %.loc7_40.1: i32 = value_of_initializer %int.usub.loc7_17 [template = constants.%.6] -// CHECK:STDOUT: %.loc7_40.2: i32 = converted %int.usub.loc7_17, %.loc7_40.1 [template = constants.%.6] +// CHECK:STDOUT: %.loc7_22: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_25: i32 = int_value 2147483647 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc7_38: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc7_21.1: i32 = value_of_initializer %int.usub.loc7_21 [template = constants.%.3] +// CHECK:STDOUT: %.loc7_21.2: i32 = converted %int.usub.loc7_21, %.loc7_21.1 [template = constants.%.3] +// CHECK:STDOUT: %int.usub.loc7_17: init i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38) [template = constants.%.5] +// CHECK:STDOUT: %.loc7_40.1: i32 = value_of_initializer %int.usub.loc7_17 [template = constants.%.5] +// CHECK:STDOUT: %.loc7_40.2: i32 = converted %int.usub.loc7_17, %.loc7_40.1 [template = constants.%.5] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %.loc8_22: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25: i32 = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %int.usub.loc8_21: init i32 = call %Sub.ref.loc8_18(%.loc8_22, %.loc8_25) [template = constants.%.4] -// CHECK:STDOUT: %.loc8_38: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc8_21.1: i32 = value_of_initializer %int.usub.loc8_21 [template = constants.%.4] -// CHECK:STDOUT: %.loc8_21.2: i32 = converted %int.usub.loc8_21, %.loc8_21.1 [template = constants.%.4] -// CHECK:STDOUT: %int.usub.loc8_17: init i32 = call %Sub.ref.loc8_14(%.loc8_21.2, %.loc8_38) [template = constants.%.3] -// CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.usub.loc8_17 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.usub.loc8_17, %.loc8_40.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_22: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_25: i32 = int_value 2147483647 [template = constants.%.2] +// CHECK:STDOUT: %int.usub.loc8_21: init i32 = call %Sub.ref.loc8_18(%.loc8_22, %.loc8_25) [template = constants.%.3] +// CHECK:STDOUT: %.loc8_38: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc8_21.1: i32 = value_of_initializer %int.usub.loc8_21 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_21.2: i32 = converted %int.usub.loc8_21, %.loc8_21.1 [template = constants.%.3] +// CHECK:STDOUT: %int.usub.loc8_17: init i32 = call %Sub.ref.loc8_14(%.loc8_21.2, %.loc8_38) [template = constants.%.2] +// CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.usub.loc8_17 [template = constants.%.2] +// CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.usub.loc8_17, %.loc8_40.1 [template = constants.%.2] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc8_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 4b38af47a702..7a4523157c78 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -23,15 +23,15 @@ fn RuntimeCall(a: i32, b: i32) -> 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: %Xor.type: type = fn_type @Xor [template] // CHECK:STDOUT: %Xor: %Xor.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 12 [template] -// CHECK:STDOUT: %.3: i32 = int_value 10 [template] -// CHECK:STDOUT: %.4: i32 = int_value 6 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %.2: i32 = int_value 10 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -80,20 +80,20 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, %Xor.decl [template = constants.%Xor] -// CHECK:STDOUT: %.loc4_20: i32 = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_24: i32 = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %int.xor: init i32 = call %Xor.ref(%.loc4_20, %.loc4_24) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_20: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_24: i32 = int_value 10 [template = constants.%.2] +// CHECK:STDOUT: %int.xor: init i32 = call %Xor.ref(%.loc4_20, %.loc4_24) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_27: type = array_type %int.xor, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_27: type = array_type %int.xor, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_18: i32 = int_value 6 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: i32 = int_value 6 [template = constants.%.3] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -137,9 +137,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.6 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int_literal/make_type.carbon b/toolchain/check/testdata/builtins/int_literal/make_type.carbon index b6b8dace5fd1..6f8c96dc48bc 100644 --- a/toolchain/check/testdata/builtins/int_literal/make_type.carbon +++ b/toolchain/check/testdata/builtins/int_literal/make_type.carbon @@ -26,7 +26,7 @@ var i: IntLiteral(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,7 +58,7 @@ var i: IntLiteral(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/print.carbon b/toolchain/check/testdata/builtins/print.carbon index 132378e95e09..6ebe9e3ea03a 100644 --- a/toolchain/check/testdata/builtins/print.carbon +++ b/toolchain/check/testdata/builtins/print.carbon @@ -20,16 +20,16 @@ fn Main() { // 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: %Print.type.1: type = fn_type @Print.1 [template] // CHECK:STDOUT: %Print.1: %Print.type.1 = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: %Print.type.2: type = fn_type @Print.2 [template] // CHECK:STDOUT: %Print.2: %Print.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,12 +70,12 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc14: %Print.type.1 = name_ref Print, file.%Print.decl [template = constants.%Print.1] -// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %print.int.loc14: init %.1 = call %Print.ref.loc14(%.loc14) +// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %print.int.loc14: init %empty_tuple.type = call %Print.ref.loc14(%.loc14) // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Print.ref.loc16: %Print.type.2 = name_ref Print, imports.%import_ref.2 [template = constants.%Print.2] -// CHECK:STDOUT: %.loc16: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %print.int.loc16: init %.1 = call %Print.ref.loc16(%.loc16) +// CHECK:STDOUT: %.loc16: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %print.int.loc16: init %empty_tuple.type = call %Print.ref.loc16(%.loc16) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index a5a971551a4b..8e550961b561 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -150,19 +150,19 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Circle: type = class_type @Circle [template] // 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 = unbound_element_type %Circle, i32 [template] -// CHECK:STDOUT: %.3: i32 = int_value 5 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Circle, i32 [template] +// CHECK:STDOUT: %.2: i32 = int_value 5 [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] // CHECK:STDOUT: %SomeInternalFunction: %SomeInternalFunction.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {.radius: i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_value 0 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %struct: %Circle = struct_value (%.3) [template] +// CHECK:STDOUT: %.3: type = struct_type {.radius: i32} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] +// CHECK:STDOUT: %struct: %Circle = struct_value (%.2) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -191,11 +191,11 @@ class A { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_32.loc5, %.loc5_23.1 [template = i32] -// CHECK:STDOUT: %.loc5_21: %.2 = field_decl radius, element0 [template] +// CHECK:STDOUT: %.loc5_21: %.1 = field_decl radius, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_39.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_39.2: type = converted %int.make_type_32.loc6, %.loc6_39.1 [template = i32] -// CHECK:STDOUT: %.loc6_45: i32 = int_value 5 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_45: i32 = int_value 5 [template = constants.%.2] // CHECK:STDOUT: %SOME_INTERNAL_CONSTANT: i32 = bind_name SOME_INTERNAL_CONSTANT, %.loc6_45 // CHECK:STDOUT: %SomeInternalFunction.decl: %SomeInternalFunction.type = fn_decl @SomeInternalFunction [template = constants.%SomeInternalFunction] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern @@ -215,7 +215,7 @@ class A { // CHECK:STDOUT: %return.param: ref %Circle = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Circle = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -229,16 +229,16 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeInternalFunction() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: i32 = int_value 0 [template = constants.%.6] +// CHECK:STDOUT: %.loc9: i32 = int_value 0 [template = constants.%.5] // CHECK:STDOUT: return %.loc9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Circle { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_23: i32 = int_value 5 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_24.1: %.4 = struct_literal (%.loc13_23) +// CHECK:STDOUT: %.loc13_23: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_24.1: %.3 = struct_literal (%.loc13_23) // CHECK:STDOUT: %.loc13_24.2: ref i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc13_24.3: init i32 = initialize_from %.loc13_23 to %.loc13_24.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_24.3: init i32 = initialize_from %.loc13_23 to %.loc13_24.2 [template = constants.%.2] // CHECK:STDOUT: %.loc13_24.4: init %Circle = class_init (%.loc13_24.3), %return [template = constants.%struct] // CHECK:STDOUT: %.loc13_25: init %Circle = converted %.loc13_24.1, %.loc13_24.4 [template = constants.%struct] // CHECK:STDOUT: return %.loc13_25 to %return @@ -262,7 +262,7 @@ class A { // CHECK:STDOUT: %radius: i32 = bind_name radius, // CHECK:STDOUT: %circle.ref.loc34: %Circle = name_ref circle, %circle // CHECK:STDOUT: %radius.ref.loc34: = name_ref radius, [template = ] -// CHECK:STDOUT: %.loc34: i32 = int_value 5 [template = constants.%.3] +// CHECK:STDOUT: %.loc34: i32 = int_value 5 [template = constants.%.2] // CHECK:STDOUT: assign %radius.ref.loc34, // CHECK:STDOUT: %circle.ref.loc42: %Circle = name_ref circle, %circle // CHECK:STDOUT: %SOME_INTERNAL_CONSTANT.ref: = name_ref SOME_INTERNAL_CONSTANT, [template = ] @@ -276,14 +276,14 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -310,8 +310,8 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_32, %.loc5_20.1 [template = i32] -// CHECK:STDOUT: %.loc5_18: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -336,19 +336,19 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Circle: type = class_type @Circle [template] // 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 = unbound_element_type %Circle, i32 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Circle, i32 [template] // CHECK:STDOUT: %GetRadius.type: type = fn_type @GetRadius [template] // CHECK:STDOUT: %GetRadius: %GetRadius.type = struct_value () [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] // CHECK:STDOUT: %SomeInternalFunction: %SomeInternalFunction.type = struct_value () [template] // CHECK:STDOUT: %Compute.type: type = fn_type @Compute [template] // CHECK:STDOUT: %Compute: %Compute.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.radius: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: type = struct_type {.radius: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -373,7 +373,7 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_32, %.loc5_23.1 [template = i32] -// CHECK:STDOUT: %.loc5_21: %.2 = field_decl radius, element0 [template] +// CHECK:STDOUT: %.loc5_21: %.1 = field_decl radius, element0 [template] // CHECK:STDOUT: %GetRadius.decl: %GetRadius.type = fn_decl @GetRadius [template = constants.%GetRadius] { // CHECK:STDOUT: %self.patt: %Circle = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Circle = value_param_pattern %self.patt, runtime_param0 @@ -414,7 +414,7 @@ class A { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -429,7 +429,7 @@ class A { // CHECK:STDOUT: fn @GetRadius[%self.param_patt: %Circle]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Circle = name_ref self, %self -// CHECK:STDOUT: %radius.ref: %.2 = name_ref radius, @Circle.%.loc5_21 [template = @Circle.%.loc5_21] +// CHECK:STDOUT: %radius.ref: %.1 = name_ref radius, @Circle.%.loc5_21 [template = @Circle.%.loc5_21] // CHECK:STDOUT: %.loc8_16.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc8_16.2: i32 = bind_value %.loc8_16.1 // CHECK:STDOUT: return %.loc8_16.2 @@ -437,7 +437,7 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeInternalFunction() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.6] +// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.5] // CHECK:STDOUT: return %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -456,12 +456,12 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 5 [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -490,9 +490,9 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_16: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_16: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %x: i32 = bind_name x, %.loc5_16 -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -514,12 +514,12 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 5 [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -552,14 +552,14 @@ class A { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_32.loc5, %.loc5_20.1 [template = i32] -// CHECK:STDOUT: %.loc5_26: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_26: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %x: i32 = bind_name x, %.loc5_26 // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_32.loc6, %.loc6_18.1 [template = i32] -// CHECK:STDOUT: %.loc6_24: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_24: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %y: i32 = bind_name y, %.loc6_24 -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -585,13 +585,13 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -613,7 +613,7 @@ class A { // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -630,7 +630,7 @@ class A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [template = constants.%A] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @A.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/adapt.carbon b/toolchain/check/testdata/class/adapt.carbon index 4f88561e1798..e031a3d61855 100644 --- a/toolchain/check/testdata/class/adapt.carbon +++ b/toolchain/check/testdata/class/adapt.carbon @@ -50,14 +50,14 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] // 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 = unbound_element_type %SomeClass, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %SomeClass, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %SomeClass [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %SomeClass [template] // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,12 +87,12 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass @@ -103,7 +103,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass -// CHECK:STDOUT: %.loc11: = complete_type_witness %SomeClass [template = constants.%.6] +// CHECK:STDOUT: %.loc11: = complete_type_witness %SomeClass [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -116,9 +116,9 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: %int.make_type_32.loc14_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %int.make_type_32.loc14_23 [template = i32] // CHECK:STDOUT: %.loc14_23.2: type = converted %int.make_type_32.loc14_23, %.loc14_23.1 [template = i32] -// CHECK:STDOUT: %.loc14_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.3] -// CHECK:STDOUT: adapt_decl %.3 -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] +// CHECK:STDOUT: adapt_decl %.2 +// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter @@ -131,13 +131,13 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Adapted: type = class_type @Adapted [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %AdaptNotExtend: type = class_type @AdaptNotExtend [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: = complete_type_witness %Adapted [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = complete_type_witness %Adapted [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: class @Adapted { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapted @@ -181,7 +181,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: class @AdaptNotExtend { // CHECK:STDOUT: %Adapted.ref: type = name_ref Adapted, file.%Adapted.decl [template = constants.%Adapted] // CHECK:STDOUT: adapt_decl %Adapted -// CHECK:STDOUT: %.loc10: = complete_type_witness %Adapted [template = constants.%.5] +// CHECK:STDOUT: %.loc10: = complete_type_witness %Adapted [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptNotExtend diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index f95f06fb0250..13456e5a98db 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -31,32 +31,32 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // 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 = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base, .d: i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, i32 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %Base, .d: i32} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: %.5, .d: i32} [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.13: i32 = int_value 4 [template] -// CHECK:STDOUT: %.14: i32 = int_value 7 [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: %.3, .d: i32} [template] -// CHECK:STDOUT: %struct.1: %Base = struct_value (%.13) [template] -// CHECK:STDOUT: %struct.2: %Derived = struct_value (%struct.1, %.14) [template] -// CHECK:STDOUT: %.16: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.17: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %.4, .d: i32} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.12: i32 = int_value 4 [template] +// CHECK:STDOUT: %.13: i32 = int_value 7 [template] +// CHECK:STDOUT: %.14: type = struct_type {.base: %.2, .d: i32} [template] +// CHECK:STDOUT: %struct.1: %Base = struct_value (%.12) [template] +// CHECK:STDOUT: %struct.2: %Derived = struct_value (%struct.1, %.13) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] -// CHECK:STDOUT: %.18: type = ptr_type %.17 [template] +// CHECK:STDOUT: %.15: type = ptr_type %tuple.type.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,22 +90,22 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %d.patt: %Derived = binding_pattern d // CHECK:STDOUT: %d.param_patt: %Derived = value_param_pattern %d.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.17 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.17 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %int.make_type_32.loc25_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc25_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc25_35.1: %.16 = tuple_literal (%int.make_type_32.loc25_27, %int.make_type_32.loc25_32) +// CHECK:STDOUT: %.loc25_35.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc25_27, %int.make_type_32.loc25_32) // CHECK:STDOUT: %.loc25_35.2: type = value_of_initializer %int.make_type_32.loc25_27 [template = i32] // CHECK:STDOUT: %.loc25_35.3: type = converted %int.make_type_32.loc25_27, %.loc25_35.2 [template = i32] // CHECK:STDOUT: %.loc25_35.4: type = value_of_initializer %int.make_type_32.loc25_32 [template = i32] // CHECK:STDOUT: %.loc25_35.5: type = converted %int.make_type_32.loc25_32, %.loc25_35.4 [template = i32] -// CHECK:STDOUT: %.loc25_35.6: type = converted %.loc25_35.1, constants.%.17 [template = constants.%.17] +// CHECK:STDOUT: %.loc25_35.6: type = converted %.loc25_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param -// CHECK:STDOUT: %return.param: ref %.17 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.17 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,8 +113,8 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -123,12 +123,12 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16: %.6 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc16: %.5 = base_decl %Base, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_32, %.loc18_10.1 [template = i32] -// CHECK:STDOUT: %.loc18_8: %.7 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc18_8: %.6 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -141,42 +141,42 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Derived { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_25: i32 = int_value 4 [template = constants.%.13] -// CHECK:STDOUT: %.loc22_26.1: %.3 = struct_literal (%.loc22_25) -// CHECK:STDOUT: %.loc22_34: i32 = int_value 7 [template = constants.%.14] -// CHECK:STDOUT: %.loc22_35.1: %.15 = struct_literal (%.loc22_26.1, %.loc22_34) +// CHECK:STDOUT: %.loc22_25: i32 = int_value 4 [template = constants.%.12] +// CHECK:STDOUT: %.loc22_26.1: %.2 = struct_literal (%.loc22_25) +// CHECK:STDOUT: %.loc22_34: i32 = int_value 7 [template = constants.%.13] +// CHECK:STDOUT: %.loc22_35.1: %.14 = struct_literal (%.loc22_26.1, %.loc22_34) // CHECK:STDOUT: %.loc22_35.2: ref %Base = class_element_access %return, element0 // CHECK:STDOUT: %.loc22_26.2: ref i32 = class_element_access %.loc22_35.2, element0 -// CHECK:STDOUT: %.loc22_26.3: init i32 = initialize_from %.loc22_25 to %.loc22_26.2 [template = constants.%.13] +// CHECK:STDOUT: %.loc22_26.3: init i32 = initialize_from %.loc22_25 to %.loc22_26.2 [template = constants.%.12] // CHECK:STDOUT: %.loc22_26.4: init %Base = class_init (%.loc22_26.3), %.loc22_35.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc22_35.3: init %Base = converted %.loc22_26.1, %.loc22_26.4 [template = constants.%struct.1] // CHECK:STDOUT: %.loc22_35.4: ref i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc22_35.5: init i32 = initialize_from %.loc22_34 to %.loc22_35.4 [template = constants.%.14] +// CHECK:STDOUT: %.loc22_35.5: init i32 = initialize_from %.loc22_34 to %.loc22_35.4 [template = constants.%.13] // CHECK:STDOUT: %.loc22_35.6: init %Derived = class_init (%.loc22_35.3, %.loc22_35.5), %return [template = constants.%struct.2] // CHECK:STDOUT: %.loc22_36: init %Derived = converted %.loc22_35.1, %.loc22_35.6 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc22_36 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Access(%d.param_patt: %Derived) -> %return: %.17 { +// CHECK:STDOUT: fn @Access(%d.param_patt: %Derived) -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref.loc26_11: %Derived = name_ref d, %d -// CHECK:STDOUT: %d.ref.loc26_12: %.7 = name_ref d, @Derived.%.loc18_8 [template = @Derived.%.loc18_8] +// CHECK:STDOUT: %d.ref.loc26_12: %.6 = name_ref d, @Derived.%.loc18_8 [template = @Derived.%.loc18_8] // CHECK:STDOUT: %.loc26_12.1: ref i32 = class_element_access %d.ref.loc26_11, element1 // CHECK:STDOUT: %.loc26_12.2: i32 = bind_value %.loc26_12.1 // CHECK:STDOUT: %d.ref.loc26_16: %Derived = name_ref d, %d -// CHECK:STDOUT: %base.ref: %.6 = name_ref base, @Derived.%.loc16 [template = @Derived.%.loc16] +// CHECK:STDOUT: %base.ref: %.5 = name_ref base, @Derived.%.loc16 [template = @Derived.%.loc16] // CHECK:STDOUT: %.loc26_17.1: ref %Base = class_element_access %d.ref.loc26_16, element0 // CHECK:STDOUT: %.loc26_17.2: %Base = bind_value %.loc26_17.1 -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %b.ref: %.1 = name_ref b, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc26_22.1: ref i32 = class_element_access %.loc26_17.2, element0 // CHECK:STDOUT: %.loc26_22.2: i32 = bind_value %.loc26_22.1 -// CHECK:STDOUT: %.loc26_24.1: %.17 = tuple_literal (%.loc26_12.2, %.loc26_22.2) +// CHECK:STDOUT: %.loc26_24.1: %tuple.type.2 = tuple_literal (%.loc26_12.2, %.loc26_22.2) // CHECK:STDOUT: %.loc26_24.2: ref i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc26_24.3: init i32 = initialize_from %.loc26_12.2 to %.loc26_24.2 // CHECK:STDOUT: %.loc26_24.4: ref i32 = tuple_access %return, element1 // CHECK:STDOUT: %.loc26_24.5: init i32 = initialize_from %.loc26_22.2 to %.loc26_24.4 -// CHECK:STDOUT: %.loc26_24.6: init %.17 = tuple_init (%.loc26_24.3, %.loc26_24.5) to %return -// CHECK:STDOUT: %.loc26_25: init %.17 = converted %.loc26_24.1, %.loc26_24.6 +// CHECK:STDOUT: %.loc26_24.6: init %tuple.type.2 = tuple_init (%.loc26_24.3, %.loc26_24.5) to %return +// CHECK:STDOUT: %.loc26_25: init %tuple.type.2 = converted %.loc26_24.1, %.loc26_24.6 // CHECK:STDOUT: return %.loc26_25 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index 762160b69d81..d5029b011048 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -30,24 +30,24 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // 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 = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32, .c: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32, .c: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] -// CHECK:STDOUT: %.10: type = ptr_type %Derived [template] -// CHECK:STDOUT: %.11: type = ptr_type i32 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, i32 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %Base, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.9: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.10: type = ptr_type i32 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: %.5, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] -// CHECK:STDOUT: %.14: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.11: type = struct_type {.base: %.4, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] +// CHECK:STDOUT: %.13: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,21 +70,21 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {} // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { -// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.11 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.11 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.10 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.10 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc24_21: type = ptr_type %Derived [template = constants.%.10] +// CHECK:STDOUT: %.loc24_21: type = ptr_type %Derived [template = constants.%.9] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_30.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_30.2: type = converted %int.make_type_32, %.loc24_30.1 [template = i32] -// CHECK:STDOUT: %.loc24_30.3: type = ptr_type i32 [template = constants.%.11] -// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.11 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.11 = return_slot %return.param +// CHECK:STDOUT: %.loc24_30.3: type = ptr_type i32 [template = constants.%.10] +// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.10 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.10 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -92,16 +92,16 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14, %.loc14_10.1 [template = i32] -// CHECK:STDOUT: %.loc14_8: %.2 = field_decl c, element2 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_8: %.1 = field_decl c, element2 [template] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -112,16 +112,16 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc18: %.6 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc18: %.5 = base_decl %Base, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_32.loc20, %.loc20_10.1 [template = i32] -// CHECK:STDOUT: %.loc20_8: %.7 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc20_8: %.6 = field_decl d, element1 [template] // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32.loc21, %.loc21_10.1 [template = i32] -// CHECK:STDOUT: %.loc21_8: %.7 = field_decl e, element2 [template] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc21_8: %.6 = field_decl e, element2 [template] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -133,15 +133,15 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Access(%p.param_patt: %.10) -> %.11 { +// CHECK:STDOUT: fn @Access(%p.param_patt: %.9) -> %.10 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p // CHECK:STDOUT: %.loc25_12: ref %Derived = deref %p.ref -// CHECK:STDOUT: %c.ref: %.2 = name_ref c, @Base.%.loc14_8 [template = @Base.%.loc14_8] +// CHECK:STDOUT: %c.ref: %.1 = name_ref c, @Base.%.loc14_8 [template = @Base.%.loc14_8] // CHECK:STDOUT: %.loc25_15.1: ref %Base = class_element_access %.loc25_12, element0 // CHECK:STDOUT: %.loc25_15.2: ref %Base = converted %.loc25_12, %.loc25_15.1 // CHECK:STDOUT: %.loc25_15.3: ref i32 = class_element_access %.loc25_15.2, element2 -// CHECK:STDOUT: %.loc25_10: %.11 = addr_of %.loc25_15.3 +// CHECK:STDOUT: %.loc25_10: %.10 = addr_of %.loc25_15.3 // CHECK:STDOUT: return %.loc25_10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_function_unqualified.carbon b/toolchain/check/testdata/class/base_function_unqualified.carbon index 46d8f61b928f..1024815d1855 100644 --- a/toolchain/check/testdata/class/base_function_unqualified.carbon +++ b/toolchain/check/testdata/class/base_function_unqualified.carbon @@ -28,19 +28,19 @@ fn Derived.H() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,7 +64,7 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -73,10 +73,10 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc16: %.4 = base_decl %Base, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} -// CHECK:STDOUT: %.loc20: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -91,14 +91,14 @@ fn Derived.H() { // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Base.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Base.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index a1a622b49b9d..54a62d528836 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -31,25 +31,25 @@ fn Call(p: Derived*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // 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 = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Base [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: %.6} [template] -// CHECK:STDOUT: %.13: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: type = struct_type {.base: %.5} [template] +// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,24 +71,24 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc17_26: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.param.loc17: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc17: %.3 = bind_name self, %self.param.loc17 +// CHECK:STDOUT: %.loc17_26: type = ptr_type %Base [template = constants.%.2] +// CHECK:STDOUT: %self.param.loc17: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc17: %.2 = bind_name self, %self.param.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {} // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %p.patt: %.11 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.11 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.11] -// CHECK:STDOUT: %p.param: %.11 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.11 = bind_name p, %p.param +// CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.10] +// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -96,18 +96,18 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc14: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.param.loc14: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc14: %.3 = bind_name self, %self.param.loc14 +// CHECK:STDOUT: %.loc14: type = ptr_type %Base [template = constants.%.2] +// CHECK:STDOUT: %self.param.loc14: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc14: %.2 = bind_name self, %self.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -117,8 +117,8 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc22: %.8 = base_decl %Base, element0 [template] -// CHECK:STDOUT: %.loc23: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc22: %.7 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -128,29 +128,29 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.param_patt: %.3]() { +// CHECK:STDOUT: fn @F[addr %self.param_patt: %.2]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.3 = name_ref self, %self.loc17 +// CHECK:STDOUT: %self.ref: %.2 = name_ref self, %self.loc17 // CHECK:STDOUT: %.loc18_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc18_10: ref i32 = class_element_access %.loc18_4, element0 -// CHECK:STDOUT: %.loc18_15: i32 = int_value 1 [template = constants.%.7] +// CHECK:STDOUT: %.loc18_15: i32 = int_value 1 [template = constants.%.6] // CHECK:STDOUT: assign %.loc18_10, %.loc18_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p.param_patt: %.11) { +// CHECK:STDOUT: fn @Call(%p.param_patt: %.10) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p // CHECK:STDOUT: %.loc26_4.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Base.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc26_7: = bound_method %.loc26_4.1, %F.ref -// CHECK:STDOUT: %.loc26_4.2: %.11 = addr_of %.loc26_4.1 +// CHECK:STDOUT: %.loc26_4.2: %.10 = addr_of %.loc26_4.1 // CHECK:STDOUT: %.loc26_4.3: ref %Derived = deref %.loc26_4.2 // CHECK:STDOUT: %.loc26_4.4: ref %Base = class_element_access %.loc26_4.3, element0 -// CHECK:STDOUT: %.loc26_4.5: %.3 = addr_of %.loc26_4.4 -// CHECK:STDOUT: %.loc26_4.6: %.3 = converted %.loc26_4.2, %.loc26_4.5 -// CHECK:STDOUT: %F.call: init %.1 = call %.loc26_7(%.loc26_4.6) +// CHECK:STDOUT: %.loc26_4.5: %.2 = addr_of %.loc26_4.4 +// CHECK:STDOUT: %.loc26_4.6: %.2 = converted %.loc26_4.2, %.loc26_4.5 +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc26_7(%.loc26_4.6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_method_qualified.carbon b/toolchain/check/testdata/class/base_method_qualified.carbon index f049cefa83dd..99c240832c44 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -44,27 +44,27 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] // 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: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.10: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %.3} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.9: type = ptr_type %Derived [template] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [template] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [template] // CHECK:STDOUT: %PassDerivedToBase.type: type = fn_type @PassDerivedToBase [template] @@ -112,18 +112,18 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [template = constants.%CallIndirect] { -// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc29_27: type = ptr_type %Derived [template = constants.%.10] +// CHECK:STDOUT: %.loc29_27: type = ptr_type %Derived [template = constants.%.9] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_33.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc29_33.2: type = converted %int.make_type_32, %.loc29_33.1 [template = i32] -// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -143,18 +143,18 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: %PassDerivedToBaseIndirect.type = fn_decl @PassDerivedToBaseIndirect [template = constants.%PassDerivedToBaseIndirect] { -// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc37_40: type = ptr_type %Derived [template = constants.%.10] +// CHECK:STDOUT: %.loc37_40: type = ptr_type %Derived [template = constants.%.9] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc37_46.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc37_46.2: type = converted %int.make_type_32, %.loc37_46.1 [template = i32] -// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -162,7 +162,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc19: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc19: %.4 = base_decl %Base, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %self.patt: %Derived = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Derived = value_param_pattern %self.patt, runtime_param0 @@ -179,7 +179,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -220,7 +220,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -253,9 +253,9 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: return %.loc26_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallIndirect(%p.param_patt: %.10) -> i32 { +// CHECK:STDOUT: fn @CallIndirect(%p.param_patt: %.9) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @Base.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc30_11.1: ref %Derived = deref %p.ref @@ -281,9 +281,9 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: return %.loc34_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p.param_patt: %.10) -> i32 { +// CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p.param_patt: %.9) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %G.ref: %G.type.1 = name_ref G, @Base.%G.decl [template = constants.%G.1] // CHECK:STDOUT: %.loc38_11.1: ref %Derived = deref %p.ref diff --git a/toolchain/check/testdata/class/base_method_shadow.carbon b/toolchain/check/testdata/class/base_method_shadow.carbon index d5b3f5605cc4..e8f1af759078 100644 --- a/toolchain/check/testdata/class/base_method_shadow.carbon +++ b/toolchain/check/testdata/class/base_method_shadow.carbon @@ -39,34 +39,34 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = ptr_type %A [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.7: type = ptr_type %B [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.6: type = ptr_type %B [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.11: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.12: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.13: type = ptr_type %C [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.11: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.12: type = ptr_type %C [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.14: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.15: = complete_type_witness %.14 [template] +// CHECK:STDOUT: %.13: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.14: = complete_type_witness %.13 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.16: type = unbound_element_type %D, %B [template] -// CHECK:STDOUT: %.17: type = ptr_type %D [template] +// CHECK:STDOUT: %.15: type = unbound_element_type %D, %B [template] +// CHECK:STDOUT: %.16: type = ptr_type %D [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.18: type = struct_type {.base: %.11} [template] -// CHECK:STDOUT: %.19: type = ptr_type %.14 [template] +// CHECK:STDOUT: %.17: type = struct_type {.base: %.10} [template] +// CHECK:STDOUT: %.18: type = ptr_type %.13 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -93,29 +93,29 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %a.patt: %.1 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %.1 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %b.patt: %.7 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.7 = value_param_pattern %b.patt, runtime_param1 -// CHECK:STDOUT: %c.patt: %.13 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.13 = value_param_pattern %c.patt, runtime_param2 -// CHECK:STDOUT: %d.patt: %.17 = binding_pattern d -// CHECK:STDOUT: %d.param_patt: %.17 = value_param_pattern %d.patt, runtime_param3 +// CHECK:STDOUT: %b.patt: %.6 = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %.6 = value_param_pattern %b.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %.12 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %.12 = value_param_pattern %c.patt, runtime_param2 +// CHECK:STDOUT: %d.patt: %.16 = binding_pattern d +// CHECK:STDOUT: %d.param_patt: %.16 = value_param_pattern %d.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc29_13: type = ptr_type %A [template = constants.%.1] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc29_20: type = ptr_type %B [template = constants.%.7] +// CHECK:STDOUT: %.loc29_20: type = ptr_type %B [template = constants.%.6] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc29_27: type = ptr_type %C [template = constants.%.13] +// CHECK:STDOUT: %.loc29_27: type = ptr_type %C [template = constants.%.12] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc29_34: type = ptr_type %D [template = constants.%.17] +// CHECK:STDOUT: %.loc29_34: type = ptr_type %D [template = constants.%.16] // CHECK:STDOUT: %a.param: %.1 = value_param runtime_param0 // CHECK:STDOUT: %a: %.1 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %.7 = value_param runtime_param1 -// CHECK:STDOUT: %b: %.7 = bind_name b, %b.param -// CHECK:STDOUT: %c.param: %.13 = value_param runtime_param2 -// CHECK:STDOUT: %c: %.13 = bind_name c, %c.param -// CHECK:STDOUT: %d.param: %.17 = value_param runtime_param3 -// CHECK:STDOUT: %d: %.17 = bind_name d, %d.param +// CHECK:STDOUT: %b.param: %.6 = value_param runtime_param1 +// CHECK:STDOUT: %b: %.6 = bind_name b, %b.param +// CHECK:STDOUT: %c.param: %.12 = value_param runtime_param2 +// CHECK:STDOUT: %c: %.12 = bind_name c, %c.param +// CHECK:STDOUT: %d.param: %.16 = value_param runtime_param3 +// CHECK:STDOUT: %d: %.16 = bind_name d, %d.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -130,7 +130,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 // CHECK:STDOUT: %self: %.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -139,18 +139,18 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.6 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc16: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc17_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %.loc17_23: type = ptr_type %B [template = constants.%.7] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %.loc17_23: type = ptr_type %B [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -161,18 +161,18 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21: %.12 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc21: %.11 = base_decl %B, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { -// CHECK:STDOUT: %self.patt: %.13 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.13 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.12 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.12 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc22_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc22_23: type = ptr_type %C [template = constants.%.13] -// CHECK:STDOUT: %self.param: %.13 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.13 = bind_name self, %self.param +// CHECK:STDOUT: %.loc22_23: type = ptr_type %C [template = constants.%.12] +// CHECK:STDOUT: %self.param: %.12 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.12 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.14 [template = constants.%.15] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.13 [template = constants.%.14] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -183,8 +183,8 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc26: %.16 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc27: = complete_type_witness %.14 [template = constants.%.15] +// CHECK:STDOUT: %.loc26: %.15 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc27: = complete_type_witness %.13 [template = constants.%.14] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -194,40 +194,40 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1[addr %self.param_patt: %.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[addr %self.param_patt: %.7](); +// CHECK:STDOUT: fn @F.2[addr %self.param_patt: %.6](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3[addr %self.param_patt: %.13](); +// CHECK:STDOUT: fn @F.3[addr %self.param_patt: %.12](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%a.param_patt: %.1, %b.param_patt: %.7, %c.param_patt: %.13, %d.param_patt: %.17) { +// CHECK:STDOUT: fn @Call(%a.param_patt: %.1, %b.param_patt: %.6, %c.param_patt: %.12, %d.param_patt: %.16) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a // CHECK:STDOUT: %.loc30_4.1: ref %A = deref %a.ref // CHECK:STDOUT: %F.ref.loc30: %F.type.1 = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc30_7: = bound_method %.loc30_4.1, %F.ref.loc30 // CHECK:STDOUT: %.loc30_4.2: %.1 = addr_of %.loc30_4.1 -// CHECK:STDOUT: %F.call.loc30: init %.2 = call %.loc30_7(%.loc30_4.2) -// CHECK:STDOUT: %b.ref: %.7 = name_ref b, %b +// CHECK:STDOUT: %F.call.loc30: init %empty_tuple.type = call %.loc30_7(%.loc30_4.2) +// CHECK:STDOUT: %b.ref: %.6 = name_ref b, %b // CHECK:STDOUT: %.loc31_4.1: ref %B = deref %b.ref // CHECK:STDOUT: %F.ref.loc31: %F.type.2 = name_ref F, @B.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc31_7: = bound_method %.loc31_4.1, %F.ref.loc31 -// CHECK:STDOUT: %.loc31_4.2: %.7 = addr_of %.loc31_4.1 -// CHECK:STDOUT: %F.call.loc31: init %.2 = call %.loc31_7(%.loc31_4.2) -// CHECK:STDOUT: %c.ref: %.13 = name_ref c, %c +// CHECK:STDOUT: %.loc31_4.2: %.6 = addr_of %.loc31_4.1 +// CHECK:STDOUT: %F.call.loc31: init %empty_tuple.type = call %.loc31_7(%.loc31_4.2) +// CHECK:STDOUT: %c.ref: %.12 = name_ref c, %c // CHECK:STDOUT: %.loc32_4.1: ref %C = deref %c.ref // CHECK:STDOUT: %F.ref.loc32: %F.type.3 = name_ref F, @C.%F.decl [template = constants.%F.3] // CHECK:STDOUT: %.loc32_7: = bound_method %.loc32_4.1, %F.ref.loc32 -// CHECK:STDOUT: %.loc32_4.2: %.13 = addr_of %.loc32_4.1 -// CHECK:STDOUT: %F.call.loc32: init %.2 = call %.loc32_7(%.loc32_4.2) -// CHECK:STDOUT: %d.ref: %.17 = name_ref d, %d +// CHECK:STDOUT: %.loc32_4.2: %.12 = addr_of %.loc32_4.1 +// CHECK:STDOUT: %F.call.loc32: init %empty_tuple.type = call %.loc32_7(%.loc32_4.2) +// CHECK:STDOUT: %d.ref: %.16 = name_ref d, %d // CHECK:STDOUT: %.loc33_4.1: ref %D = deref %d.ref // CHECK:STDOUT: %F.ref.loc33: %F.type.2 = name_ref F, @B.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc33_7: = bound_method %.loc33_4.1, %F.ref.loc33 -// CHECK:STDOUT: %.loc33_4.2: %.17 = addr_of %.loc33_4.1 +// CHECK:STDOUT: %.loc33_4.2: %.16 = addr_of %.loc33_4.1 // CHECK:STDOUT: %.loc33_4.3: ref %D = deref %.loc33_4.2 // CHECK:STDOUT: %.loc33_4.4: ref %B = class_element_access %.loc33_4.3, element0 -// CHECK:STDOUT: %.loc33_4.5: %.7 = addr_of %.loc33_4.4 -// CHECK:STDOUT: %.loc33_4.6: %.7 = converted %.loc33_4.2, %.loc33_4.5 -// CHECK:STDOUT: %F.call.loc33: init %.2 = call %.loc33_7(%.loc33_4.6) +// CHECK:STDOUT: %.loc33_4.5: %.6 = addr_of %.loc33_4.4 +// CHECK:STDOUT: %.loc33_4.6: %.6 = converted %.loc33_4.2, %.loc33_4.5 +// CHECK:STDOUT: %F.call.loc33: init %empty_tuple.type = call %.loc33_7(%.loc33_4.6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 102f47b387d0..601a6136b9f8 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -31,19 +31,19 @@ fn Run() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %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: %.2: type = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.k: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.k: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 4 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -130,8 +130,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_32, %.loc18_10.1 [template = i32] -// CHECK:STDOUT: %.loc18_8: %.2 = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc18_8: %.1 = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -158,7 +158,7 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc26_18: i32 = int_value 4 [template = constants.%.6] +// CHECK:STDOUT: %.loc26_18: i32 = int_value 4 [template = constants.%.5] // CHECK:STDOUT: %F.call: init i32 = call %F.ref(%.loc26_18) // CHECK:STDOUT: %.loc26_20.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc26_20.2: i32 = converted %F.call, %.loc26_20.1 diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index cba578cfa424..f612593b198d 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -19,14 +19,14 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,8 +66,8 @@ class C { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32, %.loc14_10.1 [template = i32] -// CHECK:STDOUT: %.loc14_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -80,7 +80,7 @@ class C { // CHECK:STDOUT: fn @F(%c.param_patt: %C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @C.%.loc14_8 [template = @C.%.loc14_8] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @C.%.loc14_8 [template = @C.%.loc14_8] // CHECK:STDOUT: %.loc12_31.1: ref i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc12_31.2: i32 = bind_value %.loc12_31.1 // CHECK:STDOUT: return %.loc12_31.2 diff --git a/toolchain/check/testdata/class/compound_field.carbon b/toolchain/check/testdata/class/compound_field.carbon index 01084b9a3ce6..ce8cb7ab0d5b 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -42,26 +42,26 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // 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 = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32, .c: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32, .c: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, i32 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %Base, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %AccessDerived.type: type = fn_type @AccessDerived [template] // CHECK:STDOUT: %AccessDerived: %AccessDerived.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: %.5, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %.4, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] // CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [template] // CHECK:STDOUT: %AccessBase: %AccessBase.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = ptr_type %Derived [template] -// CHECK:STDOUT: %.14: type = ptr_type i32 [template] +// CHECK:STDOUT: %.12: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.13: type = ptr_type i32 [template] // CHECK:STDOUT: %AccessDerivedIndirect.type: type = fn_type @AccessDerivedIndirect [template] // CHECK:STDOUT: %AccessDerivedIndirect: %AccessDerivedIndirect.type = struct_value () [template] // CHECK:STDOUT: %AccessBaseIndirect.type: type = fn_type @AccessBaseIndirect [template] @@ -121,38 +121,38 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessDerivedIndirect.decl: %AccessDerivedIndirect.type = fn_decl @AccessDerivedIndirect [template = constants.%AccessDerivedIndirect] { -// CHECK:STDOUT: %p.patt: %.13 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.13 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.14 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.14 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.12 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.12 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.13 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.13 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc32_36: type = ptr_type %Derived [template = constants.%.13] +// CHECK:STDOUT: %.loc32_36: type = ptr_type %Derived [template = constants.%.12] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_45.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc32_45.2: type = converted %int.make_type_32, %.loc32_45.1 [template = i32] -// CHECK:STDOUT: %.loc32_45.3: type = ptr_type i32 [template = constants.%.14] -// CHECK:STDOUT: %p.param: %.13 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.13 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.14 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.14 = return_slot %return.param +// CHECK:STDOUT: %.loc32_45.3: type = ptr_type i32 [template = constants.%.13] +// CHECK:STDOUT: %p.param: %.12 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.12 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.13 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.13 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessBaseIndirect.decl: %AccessBaseIndirect.type = fn_decl @AccessBaseIndirect [template = constants.%AccessBaseIndirect] { -// CHECK:STDOUT: %p.patt: %.13 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.13 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.14 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.14 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.12 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.12 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.13 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.13 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc36_33: type = ptr_type %Derived [template = constants.%.13] +// CHECK:STDOUT: %.loc36_33: type = ptr_type %Derived [template = constants.%.12] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_42.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc36_42.2: type = converted %int.make_type_32, %.loc36_42.1 [template = i32] -// CHECK:STDOUT: %.loc36_42.3: type = ptr_type i32 [template = constants.%.14] -// CHECK:STDOUT: %p.param: %.13 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.13 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.14 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.14 = return_slot %return.param +// CHECK:STDOUT: %.loc36_42.3: type = ptr_type i32 [template = constants.%.13] +// CHECK:STDOUT: %p.param: %.12 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.12 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.13 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.13 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -160,16 +160,16 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14, %.loc14_10.1 [template = i32] -// CHECK:STDOUT: %.loc14_8: %.2 = field_decl c, element2 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_8: %.1 = field_decl c, element2 [template] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -180,16 +180,16 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc18: %.6 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc18: %.5 = base_decl %Base, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_32.loc20, %.loc20_10.1 [template = i32] -// CHECK:STDOUT: %.loc20_8: %.7 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc20_8: %.6 = field_decl d, element1 [template] // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32.loc21, %.loc21_10.1 [template = i32] -// CHECK:STDOUT: %.loc21_8: %.7 = field_decl e, element2 [template] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc21_8: %.6 = field_decl e, element2 [template] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -205,7 +205,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref.loc25_10: %Derived = name_ref d, %d // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref.loc25_20: %.7 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] +// CHECK:STDOUT: %d.ref.loc25_20: %.6 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] // CHECK:STDOUT: %.loc25_11.1: ref i32 = class_element_access %d.ref.loc25_10, element1 // CHECK:STDOUT: %.loc25_11.2: i32 = bind_value %.loc25_11.1 // CHECK:STDOUT: return %.loc25_11.2 @@ -215,7 +215,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] +// CHECK:STDOUT: %b.ref: %.1 = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] // CHECK:STDOUT: %.loc29_11.1: ref %Base = class_element_access %d.ref, element0 // CHECK:STDOUT: %.loc29_11.2: ref %Base = converted %d.ref, %.loc29_11.1 // CHECK:STDOUT: %.loc29_11.3: ref i32 = class_element_access %.loc29_11.2, element1 @@ -223,27 +223,27 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: return %.loc29_11.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessDerivedIndirect(%p.param_patt: %.13) -> %.14 { +// CHECK:STDOUT: fn @AccessDerivedIndirect(%p.param_patt: %.12) -> %.13 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.13 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.12 = name_ref p, %p // CHECK:STDOUT: %Derived.ref.loc33: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref: %.7 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] +// CHECK:STDOUT: %d.ref: %.6 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] // CHECK:STDOUT: %.loc33_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc33_12.2: ref i32 = class_element_access %.loc33_12.1, element1 -// CHECK:STDOUT: %.loc33_10: %.14 = addr_of %.loc33_12.2 +// CHECK:STDOUT: %.loc33_10: %.13 = addr_of %.loc33_12.2 // CHECK:STDOUT: return %.loc33_10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessBaseIndirect(%p.param_patt: %.13) -> %.14 { +// CHECK:STDOUT: fn @AccessBaseIndirect(%p.param_patt: %.12) -> %.13 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.13 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.12 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] +// CHECK:STDOUT: %b.ref: %.1 = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] // CHECK:STDOUT: %.loc37_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc37_12.2: ref %Base = class_element_access %.loc37_12.1, element0 // CHECK:STDOUT: %.loc37_12.3: ref %Base = converted %.loc37_12.1, %.loc37_12.2 // CHECK:STDOUT: %.loc37_12.4: ref i32 = class_element_access %.loc37_12.3, element1 -// CHECK:STDOUT: %.loc37_10: %.14 = addr_of %.loc37_12.4 +// CHECK:STDOUT: %.loc37_10: %.13 = addr_of %.loc37_12.4 // CHECK:STDOUT: return %.loc37_10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/cross_package_import.carbon b/toolchain/check/testdata/class/cross_package_import.carbon index 7e5bfd507307..e164ef8e5135 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -158,7 +158,7 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -189,8 +189,8 @@ var c: Other.C = {}; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -283,8 +283,8 @@ var c: Other.C = {}; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -337,8 +337,8 @@ var c: Other.C = {}; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 3465925c7dc9..0efbf70c3401 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -43,33 +43,33 @@ fn ConvertInit() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %B, i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %A, .b: i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %B, i32 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %A, .b: i32} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: %.5, .b: i32} [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.13: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.14: type = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: %B, .c: i32} [template] -// CHECK:STDOUT: %.16: = complete_type_witness %.15 [template] -// CHECK:STDOUT: %.17: type = ptr_type %C [template] -// CHECK:STDOUT: %.18: type = ptr_type %B [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %.4, .b: i32} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.12: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.13: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.14: type = struct_type {.base: %B, .c: i32} [template] +// CHECK:STDOUT: %.15: = complete_type_witness %.14 [template] +// CHECK:STDOUT: %.16: type = ptr_type %C [template] +// CHECK:STDOUT: %.17: type = ptr_type %B [template] // CHECK:STDOUT: %ConvertCToB.type: type = fn_type @ConvertCToB [template] // CHECK:STDOUT: %ConvertCToB: %ConvertCToB.type = struct_value () [template] -// CHECK:STDOUT: %.19: type = struct_type {.base: %.12, .c: i32} [template] -// CHECK:STDOUT: %.20: type = ptr_type %.19 [template] -// CHECK:STDOUT: %.21: type = ptr_type %.15 [template] -// CHECK:STDOUT: %.22: type = ptr_type %A [template] +// CHECK:STDOUT: %.18: type = struct_type {.base: %.11, .c: i32} [template] +// CHECK:STDOUT: %.19: type = ptr_type %.18 [template] +// CHECK:STDOUT: %.20: type = ptr_type %.14 [template] +// CHECK:STDOUT: %.21: type = ptr_type %A [template] // CHECK:STDOUT: %ConvertBToA.type: type = fn_type @ConvertBToA [template] // CHECK:STDOUT: %ConvertBToA: %ConvertBToA.type = struct_value () [template] // CHECK:STDOUT: %ConvertCToA.type: type = fn_type @ConvertCToA [template] @@ -80,14 +80,14 @@ fn ConvertInit() { // CHECK:STDOUT: %ConvertRef: %ConvertRef.type = struct_value () [template] // CHECK:STDOUT: %ConvertInit.type: type = fn_type @ConvertInit [template] // CHECK:STDOUT: %ConvertInit: %ConvertInit.type = struct_value () [template] -// CHECK:STDOUT: %.23: i32 = int_value 1 [template] -// CHECK:STDOUT: %.24: i32 = int_value 2 [template] -// CHECK:STDOUT: %.25: type = struct_type {.base: %.3, .b: i32} [template] -// CHECK:STDOUT: %.26: i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: type = struct_type {.base: %.25, .c: i32} [template] -// CHECK:STDOUT: %struct.1: %A = struct_value (%.23) [template] -// CHECK:STDOUT: %struct.2: %B = struct_value (%struct.1, %.24) [template] -// CHECK:STDOUT: %struct.3: %C = struct_value (%struct.2, %.26) [template] +// CHECK:STDOUT: %.22: i32 = int_value 1 [template] +// CHECK:STDOUT: %.23: i32 = int_value 2 [template] +// CHECK:STDOUT: %.24: type = struct_type {.base: %.2, .b: i32} [template] +// CHECK:STDOUT: %.25: i32 = int_value 3 [template] +// CHECK:STDOUT: %.26: type = struct_type {.base: %.24, .c: i32} [template] +// CHECK:STDOUT: %struct.1: %A = struct_value (%.22) [template] +// CHECK:STDOUT: %struct.2: %B = struct_value (%struct.1, %.23) [template] +// CHECK:STDOUT: %struct.3: %C = struct_value (%struct.2, %.25) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -117,49 +117,49 @@ fn ConvertInit() { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %ConvertCToB.decl: %ConvertCToB.type = fn_decl @ConvertCToB [template = constants.%ConvertCToB] { -// CHECK:STDOUT: %p.patt: %.17 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.17 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.18 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.18 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.16 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.16 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.17 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.17 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc25_20: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %.loc25_20: type = ptr_type %C [template = constants.%.16] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc25_27: type = ptr_type %B [template = constants.%.18] -// CHECK:STDOUT: %p.param: %.17 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.17 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.18 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.18 = return_slot %return.param +// CHECK:STDOUT: %.loc25_27: type = ptr_type %B [template = constants.%.17] +// CHECK:STDOUT: %p.param: %.16 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.16 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.17 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.17 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertBToA.decl: %ConvertBToA.type = fn_decl @ConvertBToA [template = constants.%ConvertBToA] { -// CHECK:STDOUT: %p.patt: %.18 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.18 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc26_20: type = ptr_type %B [template = constants.%.18] -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc26_27: type = ptr_type %A [template = constants.%.22] -// CHECK:STDOUT: %p.param: %.18 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.18 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertCToA.decl: %ConvertCToA.type = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { // CHECK:STDOUT: %p.patt: %.17 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %.17 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.21 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.21 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc27_20: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %.loc26_20: type = ptr_type %B [template = constants.%.17] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc27_27: type = ptr_type %A [template = constants.%.22] +// CHECK:STDOUT: %.loc26_27: type = ptr_type %A [template = constants.%.21] // CHECK:STDOUT: %p.param: %.17 = value_param runtime_param0 // CHECK:STDOUT: %p: %.17 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.21 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.21 = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %ConvertCToA.decl: %ConvertCToA.type = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { +// CHECK:STDOUT: %p.patt: %.16 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.16 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.21 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.21 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %.loc27_20: type = ptr_type %C [template = constants.%.16] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %.loc27_27: type = ptr_type %A [template = constants.%.21] +// CHECK:STDOUT: %p.param: %.16 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.16 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.21 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.21 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertValue.decl: %ConvertValue.type = fn_decl @ConvertValue [template = constants.%ConvertValue] { // CHECK:STDOUT: %c.patt: %C = binding_pattern c @@ -170,19 +170,19 @@ fn ConvertInit() { // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertRef.decl: %ConvertRef.type = fn_decl @ConvertRef [template = constants.%ConvertRef] { -// CHECK:STDOUT: %c.patt: %.17 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.17 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %.16 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %.16 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.21 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.21 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc33_19: type = ptr_type %C [template = constants.%.17] +// CHECK:STDOUT: %.loc33_19: type = ptr_type %C [template = constants.%.16] // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc33_26: type = ptr_type %A [template = constants.%.22] -// CHECK:STDOUT: %c.param: %.17 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.17 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %.loc33_26: type = ptr_type %A [template = constants.%.21] +// CHECK:STDOUT: %c.param: %.16 = value_param runtime_param0 +// CHECK:STDOUT: %c: %.16 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %.21 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.21 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertInit.decl: %ConvertInit.type = fn_decl @ConvertInit [template = constants.%ConvertInit] {} {} // CHECK:STDOUT: } @@ -191,8 +191,8 @@ fn ConvertInit() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -201,12 +201,12 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.6 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc16: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32, %.loc17_10.1 [template = i32] -// CHECK:STDOUT: %.loc17_8: %.7 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc18: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc17_8: %.6 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -217,12 +217,12 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21: %.13 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc21: %.12 = base_decl %B, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_10.2: type = converted %int.make_type_32, %.loc22_10.1 [template = i32] -// CHECK:STDOUT: %.loc22_8: %.14 = field_decl c, element1 [template] -// CHECK:STDOUT: %.loc23: = complete_type_witness %.15 [template = constants.%.16] +// CHECK:STDOUT: %.loc22_8: %.13 = field_decl c, element1 [template] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.14 [template = constants.%.15] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -233,34 +233,34 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertCToB(%p.param_patt: %.17) -> %.18 { +// CHECK:STDOUT: fn @ConvertCToB(%p.param_patt: %.16) -> %.17 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.16 = name_ref p, %p // CHECK:STDOUT: %.loc25_39.1: ref %C = deref %p.ref // CHECK:STDOUT: %.loc25_39.2: ref %B = class_element_access %.loc25_39.1, element0 -// CHECK:STDOUT: %.loc25_39.3: %.18 = addr_of %.loc25_39.2 -// CHECK:STDOUT: %.loc25_39.4: %.18 = converted %p.ref, %.loc25_39.3 +// CHECK:STDOUT: %.loc25_39.3: %.17 = addr_of %.loc25_39.2 +// CHECK:STDOUT: %.loc25_39.4: %.17 = converted %p.ref, %.loc25_39.3 // CHECK:STDOUT: return %.loc25_39.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertBToA(%p.param_patt: %.18) -> %.22 { +// CHECK:STDOUT: fn @ConvertBToA(%p.param_patt: %.17) -> %.21 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.18 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p // CHECK:STDOUT: %.loc26_39.1: ref %B = deref %p.ref // CHECK:STDOUT: %.loc26_39.2: ref %A = class_element_access %.loc26_39.1, element0 -// CHECK:STDOUT: %.loc26_39.3: %.22 = addr_of %.loc26_39.2 -// CHECK:STDOUT: %.loc26_39.4: %.22 = converted %p.ref, %.loc26_39.3 +// CHECK:STDOUT: %.loc26_39.3: %.21 = addr_of %.loc26_39.2 +// CHECK:STDOUT: %.loc26_39.4: %.21 = converted %p.ref, %.loc26_39.3 // CHECK:STDOUT: return %.loc26_39.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertCToA(%p.param_patt: %.17) -> %.22 { +// CHECK:STDOUT: fn @ConvertCToA(%p.param_patt: %.16) -> %.21 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.17 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.16 = name_ref p, %p // CHECK:STDOUT: %.loc27_39.1: ref %C = deref %p.ref // CHECK:STDOUT: %.loc27_39.2: ref %B = class_element_access %.loc27_39.1, element0 // CHECK:STDOUT: %.loc27_39.3: ref %A = class_element_access %.loc27_39.2, element0 -// CHECK:STDOUT: %.loc27_39.4: %.22 = addr_of %.loc27_39.3 -// CHECK:STDOUT: %.loc27_39.5: %.22 = converted %p.ref, %.loc27_39.4 +// CHECK:STDOUT: %.loc27_39.4: %.21 = addr_of %.loc27_39.3 +// CHECK:STDOUT: %.loc27_39.5: %.21 = converted %p.ref, %.loc27_39.4 // CHECK:STDOUT: return %.loc27_39.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -276,41 +276,41 @@ fn ConvertInit() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertRef(%c.param_patt: %.17) -> %.22 { +// CHECK:STDOUT: fn @ConvertRef(%c.param_patt: %.16) -> %.21 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %.17 = name_ref c, %c +// CHECK:STDOUT: %c.ref: %.16 = name_ref c, %c // CHECK:STDOUT: %.loc34_12: ref %C = deref %c.ref // CHECK:STDOUT: %A.ref.loc34: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc34_15.1: ref %B = class_element_access %.loc34_12, element0 // CHECK:STDOUT: %.loc34_15.2: ref %A = class_element_access %.loc34_15.1, element0 // CHECK:STDOUT: %.loc34_15.3: ref %A = converted %.loc34_12, %.loc34_15.2 -// CHECK:STDOUT: %.loc34_10: %.22 = addr_of %.loc34_15.3 +// CHECK:STDOUT: %.loc34_10: %.21 = addr_of %.loc34_15.3 // CHECK:STDOUT: return %.loc34_10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertInit() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc38_38: i32 = int_value 1 [template = constants.%.23] -// CHECK:STDOUT: %.loc38_39.1: %.3 = struct_literal (%.loc38_38) -// CHECK:STDOUT: %.loc38_47: i32 = int_value 2 [template = constants.%.24] -// CHECK:STDOUT: %.loc38_48.1: %.25 = struct_literal (%.loc38_39.1, %.loc38_47) -// CHECK:STDOUT: %.loc38_56: i32 = int_value 3 [template = constants.%.26] -// CHECK:STDOUT: %.loc38_57.1: %.27 = struct_literal (%.loc38_48.1, %.loc38_56) +// CHECK:STDOUT: %.loc38_38: i32 = int_value 1 [template = constants.%.22] +// CHECK:STDOUT: %.loc38_39.1: %.2 = struct_literal (%.loc38_38) +// CHECK:STDOUT: %.loc38_47: i32 = int_value 2 [template = constants.%.23] +// CHECK:STDOUT: %.loc38_48.1: %.24 = struct_literal (%.loc38_39.1, %.loc38_47) +// CHECK:STDOUT: %.loc38_56: i32 = int_value 3 [template = constants.%.25] +// CHECK:STDOUT: %.loc38_57.1: %.26 = struct_literal (%.loc38_48.1, %.loc38_56) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc38_57.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc38_57.3: ref %B = class_element_access %.loc38_57.2, element0 // CHECK:STDOUT: %.loc38_48.2: ref %A = class_element_access %.loc38_57.3, element0 // CHECK:STDOUT: %.loc38_39.2: ref i32 = class_element_access %.loc38_48.2, element0 -// CHECK:STDOUT: %.loc38_39.3: init i32 = initialize_from %.loc38_38 to %.loc38_39.2 [template = constants.%.23] +// CHECK:STDOUT: %.loc38_39.3: init i32 = initialize_from %.loc38_38 to %.loc38_39.2 [template = constants.%.22] // CHECK:STDOUT: %.loc38_39.4: init %A = class_init (%.loc38_39.3), %.loc38_48.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.4 [template = constants.%struct.1] // CHECK:STDOUT: %.loc38_48.4: ref i32 = class_element_access %.loc38_57.3, element1 -// CHECK:STDOUT: %.loc38_48.5: init i32 = initialize_from %.loc38_47 to %.loc38_48.4 [template = constants.%.24] +// CHECK:STDOUT: %.loc38_48.5: init i32 = initialize_from %.loc38_47 to %.loc38_48.4 [template = constants.%.23] // CHECK:STDOUT: %.loc38_48.6: init %B = class_init (%.loc38_48.3, %.loc38_48.5), %.loc38_57.3 [template = constants.%struct.2] // CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.6 [template = constants.%struct.2] // CHECK:STDOUT: %.loc38_57.5: ref i32 = class_element_access %.loc38_57.2, element1 -// CHECK:STDOUT: %.loc38_57.6: init i32 = initialize_from %.loc38_56 to %.loc38_57.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc38_57.6: init i32 = initialize_from %.loc38_56 to %.loc38_57.5 [template = constants.%.25] // CHECK:STDOUT: %.loc38_57.7: init %C = class_init (%.loc38_57.4, %.loc38_57.6), %.loc38_57.2 [template = constants.%struct.3] // CHECK:STDOUT: %.loc38_57.8: ref %C = temporary %.loc38_57.2, %.loc38_57.7 // CHECK:STDOUT: %.loc38_59: ref %C = converted %.loc38_57.1, %.loc38_57.8 diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index 9761ebf3a1a3..3e319be80d76 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -102,17 +102,17 @@ class StructAdapter { // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] // 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 = unbound_element_type %SomeClass, i32 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %SomeClass, i32 [template] // CHECK:STDOUT: %StaticMemberFunction.type: type = fn_type @StaticMemberFunction [template] // CHECK:STDOUT: %StaticMemberFunction: %StaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %AdapterMethod.type: type = fn_type @AdapterMethod [template] // CHECK:STDOUT: %AdapterMethod: %AdapterMethod.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %SomeClass [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %SomeClass [template] // CHECK:STDOUT: %TestStaticMemberFunction.type: type = fn_type @TestStaticMemberFunction [template] // CHECK:STDOUT: %TestStaticMemberFunction: %TestStaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %TestAdapterMethod.type: type = fn_type @TestAdapterMethod [template] @@ -161,7 +161,7 @@ class StructAdapter { // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass -// CHECK:STDOUT: %.loc17: = complete_type_witness %SomeClass [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = complete_type_witness %SomeClass [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -172,11 +172,11 @@ class StructAdapter { // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32.loc7, %.loc7_10.1 [template = i32] -// CHECK:STDOUT: %.loc7_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc7_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32.loc8, %.loc8_10.1 [template = i32] -// CHECK:STDOUT: %.loc8_8: %.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc8_8: %.1 = field_decl b, element1 [template] // CHECK:STDOUT: %StaticMemberFunction.decl: %StaticMemberFunction.type = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} {} // CHECK:STDOUT: %AdapterMethod.decl: %AdapterMethod.type = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { // CHECK:STDOUT: %self.patt: %SomeClassAdapter = binding_pattern self @@ -186,7 +186,7 @@ class StructAdapter { // CHECK:STDOUT: %self.param: %SomeClassAdapter = value_param runtime_param0 // CHECK:STDOUT: %self: %SomeClassAdapter = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass @@ -206,7 +206,7 @@ class StructAdapter { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a // CHECK:STDOUT: %StaticMemberFunction.ref: %StaticMemberFunction.type = name_ref StaticMemberFunction, @SomeClass.%StaticMemberFunction.decl [template = constants.%StaticMemberFunction] -// CHECK:STDOUT: %StaticMemberFunction.call: init %.1 = call %StaticMemberFunction.ref() +// CHECK:STDOUT: %StaticMemberFunction.call: init %empty_tuple.type = call %StaticMemberFunction.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -215,7 +215,7 @@ class StructAdapter { // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a // CHECK:STDOUT: %AdapterMethod.ref: %AdapterMethod.type = name_ref AdapterMethod, @SomeClass.%AdapterMethod.decl [template = constants.%AdapterMethod] // CHECK:STDOUT: %.loc24: = bound_method %a.ref, %AdapterMethod.ref -// CHECK:STDOUT: %AdapterMethod.call: init %.1 = call %.loc24(%a.ref) +// CHECK:STDOUT: %AdapterMethod.call: init %empty_tuple.type = call %.loc24(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -224,13 +224,13 @@ class StructAdapter { // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: = complete_type_witness %SomeClass [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = complete_type_witness %SomeClass [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -242,14 +242,14 @@ class StructAdapter { // 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: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%SomeClass) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -260,7 +260,7 @@ class StructAdapter { // 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 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // 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 @@ -295,8 +295,8 @@ class StructAdapter { // 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.%.6)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -315,7 +315,7 @@ class StructAdapter { // CHECK:STDOUT: %self.param: %SomeClass = value_param runtime_param0 // CHECK:STDOUT: %self: %SomeClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass @@ -325,7 +325,7 @@ class StructAdapter { // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass -// CHECK:STDOUT: %.loc10: = complete_type_witness %SomeClass [template = constants.%.5] +// CHECK:STDOUT: %.loc10: = complete_type_witness %SomeClass [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -340,7 +340,7 @@ class StructAdapter { // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @SomeClass.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc23_4: = bound_method %a.ref, %F.ref // CHECK:STDOUT: %.loc23_3: %SomeClass = converted %a.ref, [template = ] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc23_4() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc23_4() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -382,197 +382,197 @@ class StructAdapter { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- fail_todo_field_access.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %SomeClass, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %SomeClass [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [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] +// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic] +// 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: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%SomeClass) [template] +// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: .Int32 = %import_ref.1 +// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// 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 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] +// 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 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .SomeClass = %SomeClass.decl +// CHECK:STDOUT: .SomeClassAdapter = %SomeClassAdapter.decl +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} {} +// CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %a.patt: %SomeClassAdapter = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %SomeClassAdapter = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_32 [template = i32] +// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_32, %.loc13_30.1 [template = i32] +// CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 +// CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param +// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref i32 = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { +// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// 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.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: +// CHECK:STDOUT: interface { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = imports.%import_ref.3 +// CHECK:STDOUT: .Convert = imports.%import_ref.4 +// CHECK:STDOUT: witness = (imports.%import_ref.5) +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @SomeClass { +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] +// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] +// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] +// CHECK:STDOUT: %.loc6_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%SomeClass +// CHECK:STDOUT: .a = %.loc5_8 +// CHECK:STDOUT: .b = %.loc6_8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @SomeClassAdapter { +// CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] +// CHECK:STDOUT: adapt_decl %SomeClass +// CHECK:STDOUT: %.loc11: = complete_type_witness %SomeClass [template = constants.%.5] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%SomeClassAdapter +// CHECK:STDOUT: extend name_scope2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; +// CHECK:STDOUT: +// CHECK:STDOUT: fn @F(%a.param_patt: %SomeClassAdapter) -> i32 { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a +// CHECK:STDOUT: %b.ref: %.1 = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] +// CHECK:STDOUT: %.loc21_11.1: %SomeClass = converted %a.ref, [template = ] +// CHECK:STDOUT: %.loc21_11.2: i32 = class_element_access , element1 [template = ] +// CHECK:STDOUT: return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { +// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] +// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { +// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: %Dest.patt => constants.%Dest +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(@ImplicitAs.%Dest) { +// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: %Dest.patt => constants.%Dest +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) { +// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: %Dest.patt => constants.%Dest +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { +// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 +// CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%SomeClass) { +// CHECK:STDOUT: %Dest => constants.%SomeClass +// CHECK:STDOUT: %Dest.patt => constants.%SomeClass +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 +// CHECK:STDOUT: %Self => constants.%Self.2 +// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 +// CHECK:STDOUT: %Convert => constants.%Convert.2 // CHECK:STDOUT: %.1 => constants.%.8 // CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_field_access.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %SomeClass, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %SomeClass [template] -// CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: %F.type = struct_value () [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] -// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic] -// 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: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%SomeClass) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%SomeClass) [template] -// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int32 = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// 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 (%.7) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] -// 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 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [template] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .SomeClass = %SomeClass.decl -// CHECK:STDOUT: .SomeClassAdapter = %SomeClassAdapter.decl -// CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} {} -// CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} {} -// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %a.patt: %SomeClassAdapter = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %SomeClassAdapter = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_32 [template = i32] -// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_32, %.loc13_30.1 [template = i32] -// CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 -// CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] -// 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.%.7)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.3 -// CHECK:STDOUT: .Convert = imports.%import_ref.4 -// CHECK:STDOUT: witness = (imports.%import_ref.5) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%SomeClass -// CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: .b = %.loc6_8 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @SomeClassAdapter { -// CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] -// CHECK:STDOUT: adapt_decl %SomeClass -// CHECK:STDOUT: %.loc11: = complete_type_witness %SomeClass [template = constants.%.6] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%SomeClassAdapter -// CHECK:STDOUT: extend name_scope2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%a.param_patt: %SomeClassAdapter) -> i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] -// CHECK:STDOUT: %.loc21_11.1: %SomeClass = converted %a.ref, [template = ] -// CHECK:STDOUT: %.loc21_11.2: i32 = class_element_access , element1 [template = ] -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] -// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %Dest.patt => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@ImplicitAs.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %Dest.patt => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %Dest.patt => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 -// CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%SomeClass) { -// CHECK:STDOUT: %Dest => constants.%SomeClass -// CHECK:STDOUT: %Dest.patt => constants.%SomeClass -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 -// CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 -// CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.9 -// CHECK:STDOUT: %.2 => constants.%.10 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_adapt_non_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] // 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 = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -600,9 +600,9 @@ class StructAdapter { // CHECK:STDOUT: %int.make_type_32.loc8_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %int.make_type_32.loc8_30 [template = i32] // CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_32.loc8_30, %.loc8_30.1 [template = i32] -// CHECK:STDOUT: %.loc8_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: adapt_decl %.2 -// CHECK:STDOUT: %.loc9: = complete_type_witness %.2 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: adapt_decl %.1 +// CHECK:STDOUT: %.loc9: = complete_type_witness %.1 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 3edfb6f352ea..3887052219c4 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -195,8 +195,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Contains: type = class_type @Contains [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -241,9 +241,9 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Var.type: type = fn_type @Var [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Var: %Var.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -286,9 +286,9 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -338,8 +338,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -383,11 +383,11 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Param.type: type = fn_type @Param [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Param: %Param.type = struct_value () [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -437,7 +437,7 @@ fn CallReturnAbstract() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Param.ref: %Param.type = name_ref Param, file.%Param.decl [template = constants.%Param] // CHECK:STDOUT: %p.ref: %Abstract = name_ref p, %p -// CHECK:STDOUT: %Param.call: init %.3 = call %Param.ref() +// CHECK:STDOUT: %Param.call: init %empty_tuple.type = call %Param.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -448,23 +448,23 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Abstract [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Abstract [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Abstract, .d: i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, i32 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Abstract, .d: i32} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %.4, .d: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] -// CHECK:STDOUT: %.12: i32 = int_value 1 [template] -// CHECK:STDOUT: %.13: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.14: i32 = int_value 7 [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: %.13, .d: i32} [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.3, .d: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.11: i32 = int_value 1 [template] +// CHECK:STDOUT: %.12: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.13: i32 = int_value 7 [template] +// CHECK:STDOUT: %.14: type = struct_type {.base: %.12, .d: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -505,12 +505,12 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc8: %.5 = base_decl %Abstract, element0 [template] +// CHECK:STDOUT: %.loc8: %.4 = base_decl %Abstract, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_32, %.loc10_10.1 [template = i32] -// CHECK:STDOUT: %.loc10_8: %.6 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_8: %.5 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -523,10 +523,10 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Derived { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_25: i32 = int_value 1 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_26: %.13 = struct_literal (%.loc22_25) -// CHECK:STDOUT: %.loc22_34: i32 = int_value 7 [template = constants.%.14] -// CHECK:STDOUT: %.loc22_35: %.15 = struct_literal (%.loc22_26, %.loc22_34) +// CHECK:STDOUT: %.loc22_25: i32 = int_value 1 [template = constants.%.11] +// CHECK:STDOUT: %.loc22_26: %.12 = struct_literal (%.loc22_25) +// CHECK:STDOUT: %.loc22_34: i32 = int_value 7 [template = constants.%.13] +// CHECK:STDOUT: %.loc22_35: %.14 = struct_literal (%.loc22_26, %.loc22_34) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -537,14 +537,14 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Abstract [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Abstract [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Abstract, .d: i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, i32 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Abstract, .d: i32} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: %Return.type: type = fn_type @Return [template] // CHECK:STDOUT: %Return: %Return.type = struct_value () [template] // CHECK:STDOUT: } @@ -592,12 +592,12 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc8: %.5 = base_decl %Abstract, element0 [template] +// CHECK:STDOUT: %.loc8: %.4 = base_decl %Abstract, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_32, %.loc10_10.1 [template = i32] -// CHECK:STDOUT: %.loc10_8: %.6 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_8: %.5 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -619,22 +619,22 @@ fn CallReturnAbstract() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] // 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 = unbound_element_type %Abstract, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Abstract, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Abstract [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Derived, i32 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Abstract, .d: i32} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Abstract [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, i32 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %Abstract, .d: i32} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: %.5, .d: i32} [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %.4, .d: i32} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -677,8 +677,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract @@ -687,12 +687,12 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %Abstract, element0 [template] +// CHECK:STDOUT: %.loc9: %.5 = base_decl %Abstract, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_10.2: type = converted %int.make_type_32, %.loc11_10.1 [template = i32] -// CHECK:STDOUT: %.loc11_8: %.7 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_8: %.6 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -706,7 +706,7 @@ fn CallReturnAbstract() { // CHECK:STDOUT: fn @Access(%d.param_patt: %Derived) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d -// CHECK:STDOUT: %base.ref: %.6 = name_ref base, @Derived.%.loc9 [template = @Derived.%.loc9] +// CHECK:STDOUT: %base.ref: %.5 = name_ref base, @Derived.%.loc9 [template = @Derived.%.loc9] // CHECK:STDOUT: %.loc15: ref %Abstract = class_element_access %d.ref, element0 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -718,9 +718,9 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -763,11 +763,11 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %ReturnAbstract.type: type = fn_type @ReturnAbstract [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ReturnAbstract: %ReturnAbstract.type = struct_value () [template] // CHECK:STDOUT: %CallReturnAbstract.type: type = fn_type @CallReturnAbstract [template] // CHECK:STDOUT: %CallReturnAbstract: %CallReturnAbstract.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index dfc3bf1ac60e..77371d6278e0 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -108,7 +108,7 @@ class C { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] // CHECK:STDOUT: %.1: i32 = int_value 100 [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] @@ -117,14 +117,14 @@ class C { // 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: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } @@ -137,7 +137,7 @@ class C { // 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 @@ -170,8 +170,8 @@ class C { // 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: @@ -236,8 +236,8 @@ class C { // 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: // CHECK:STDOUT: --- fail_extend_not_type.carbon @@ -246,7 +246,7 @@ class C { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] // CHECK:STDOUT: %.1: i32 = int_value 100 [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] @@ -255,14 +255,14 @@ class C { // 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: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } @@ -275,7 +275,7 @@ class C { // 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 @@ -308,8 +308,8 @@ class C { // 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: @@ -375,17 +375,17 @@ class C { // 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: // CHECK:STDOUT: --- fail_repeated.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %MultipleAdapts: type = class_type @MultipleAdapts [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %empty_tuple.type [template] // CHECK:STDOUT: %MultipleAdaptsSameType: type = class_type @MultipleAdaptsSameType [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -408,22 +408,22 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @MultipleAdapts { -// CHECK:STDOUT: %.loc5_10: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11: type = converted %.loc5_10, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: adapt_decl %.1 -// CHECK:STDOUT: %.loc13: %.2 = struct_literal () -// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_10: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11: type = converted %.loc5_10, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: adapt_decl %empty_tuple.type +// CHECK:STDOUT: %.loc13: %.1 = struct_literal () +// CHECK:STDOUT: %.loc14: = complete_type_witness %empty_tuple.type [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MultipleAdapts // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @MultipleAdaptsSameType { -// CHECK:STDOUT: %.loc17_10: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc17_11: type = converted %.loc17_10, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: adapt_decl %.1 -// CHECK:STDOUT: %.loc25: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc26: = complete_type_witness %.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc17_10: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc17_11: type = converted %.loc17_10, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: adapt_decl %empty_tuple.type +// CHECK:STDOUT: %.loc25: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc26: = complete_type_witness %empty_tuple.type [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MultipleAdaptsSameType diff --git a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon index bf4f1e194dc0..3f2056accc4b 100644 --- a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon @@ -62,9 +62,9 @@ class C5 { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C1: type = class_type @C1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: = complete_type_witness %B [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = complete_type_witness %B [template] // CHECK:STDOUT: %C2: type = class_type @C2 [template] // CHECK:STDOUT: %C3: type = class_type @C3 [template] // CHECK:STDOUT: %C4: type = class_type @C4 [template] @@ -107,7 +107,7 @@ class C5 { // CHECK:STDOUT: class @C1 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: adapt_decl %B -// CHECK:STDOUT: %.loc19: = complete_type_witness %B [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = complete_type_witness %B [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 @@ -116,7 +116,7 @@ class C5 { // CHECK:STDOUT: class @C2 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: adapt_decl %B -// CHECK:STDOUT: %.loc27: = complete_type_witness %B [template = constants.%.5] +// CHECK:STDOUT: %.loc27: = complete_type_witness %B [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 @@ -125,7 +125,7 @@ class C5 { // CHECK:STDOUT: class @C3 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: adapt_decl %B -// CHECK:STDOUT: %.loc35: = complete_type_witness %B [template = constants.%.5] +// CHECK:STDOUT: %.loc35: = complete_type_witness %B [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C3 @@ -134,7 +134,7 @@ class C5 { // CHECK:STDOUT: class @C4 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: adapt_decl %B -// CHECK:STDOUT: %.loc46: = complete_type_witness %B [template = constants.%.5] +// CHECK:STDOUT: %.loc46: = complete_type_witness %B [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C4 @@ -144,7 +144,7 @@ class C5 { // CHECK:STDOUT: class @C5 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: adapt_decl %B -// CHECK:STDOUT: %.loc56: = complete_type_witness %B [template = constants.%.5] +// CHECK:STDOUT: %.loc56: = complete_type_witness %B [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C5 diff --git a/toolchain/check/testdata/class/fail_adapt_with_base.carbon b/toolchain/check/testdata/class/fail_adapt_with_base.carbon index 4955c9aa3f0d..0ab3224676c6 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_base.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_base.carbon @@ -27,9 +27,9 @@ base class AdaptWithVirtual { // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %AdaptWithVirtual: type = class_type @AdaptWithVirtual [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon index d4b00b1e9377..491d06c1bf3d 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon @@ -82,10 +82,10 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %AdaptWithBase: type = class_type @AdaptWithBase [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %AdaptWithBase, %Base [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %AdaptWithBase, %Base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -121,7 +121,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_32, %.loc10_12.1 [template = i32] // CHECK:STDOUT: adapt_decl i32 // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc15: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc15: %.4 = base_decl %Base, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithBase @@ -136,11 +136,11 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: constants { // CHECK:STDOUT: %AdaptWithField: type = class_type @AdaptWithField [template] // 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 = unbound_element_type %AdaptWithField, i32 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %AdaptWithField, i32 [template] // CHECK:STDOUT: %AdaptWithFields: type = class_type @AdaptWithFields [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %AdaptWithFields, i32 [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %AdaptWithFields, i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -171,7 +171,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithField @@ -186,15 +186,15 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_10.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_10.2: type = converted %int.make_type_32.loc25, %.loc25_10.1 [template = i32] -// CHECK:STDOUT: %.loc25_8: %.3 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc25_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_32.loc26, %.loc26_10.1 [template = i32] -// CHECK:STDOUT: %.loc26_8: %.3 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc26_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_32.loc27, %.loc27_10.1 [template = i32] -// CHECK:STDOUT: %.loc27_8: %.3 = field_decl c, element2 [template] +// CHECK:STDOUT: %.loc27_8: %.2 = field_decl c, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithFields @@ -212,12 +212,12 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %AdaptWithBaseAndFields: type = class_type @AdaptWithBaseAndFields [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %AdaptWithBaseAndFields, %Base [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %AdaptWithBaseAndFields, %Base [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %AdaptWithBaseAndFields, i32 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %AdaptWithBaseAndFields, i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -249,11 +249,11 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithBaseAndFields { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc7: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc7: %.4 = base_decl %Base, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32, %.loc8_10.1 [template = i32] -// CHECK:STDOUT: %.loc8_8: %.6 = field_decl n, element1 [template] +// CHECK:STDOUT: %.loc8_8: %.5 = field_decl n, element1 [template] // CHECK:STDOUT: %.loc15_10: %.1 = struct_literal () // CHECK:STDOUT: %.loc15_11: type = converted %.loc15_10, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: adapt_decl %.1 diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index b04f1d86a314..9dc6a693d579 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -29,12 +29,12 @@ class Class { // CHECK:STDOUT: %a: %.1 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %.1 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,7 +72,7 @@ class Class { // CHECK:STDOUT: %b.param: %.1 = value_param runtime_param0 // CHECK:STDOUT: %b: %.1 = bind_name b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index 844b68da7321..ee555e4f7cfe 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -40,15 +40,15 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type %Class [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,7 +101,7 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -118,23 +118,23 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %c.ref.loc27: %Class = name_ref c, %c // CHECK:STDOUT: %F.ref.loc27: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc27: = bound_method %c.ref.loc27, %F.ref.loc27 -// CHECK:STDOUT: %F.call.loc27: init %.2 = call %.loc27() +// CHECK:STDOUT: %F.call.loc27: init %empty_tuple.type = call %.loc27() // CHECK:STDOUT: %c.ref.loc29: %Class = name_ref c, %c // CHECK:STDOUT: %G.ref.loc29: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc29: = bound_method %c.ref.loc29, %G.ref.loc29 -// CHECK:STDOUT: %G.call.loc29: init %.2 = call %.loc29(%c.ref.loc29) +// CHECK:STDOUT: %G.call.loc29: init %empty_tuple.type = call %.loc29(%c.ref.loc29) // CHECK:STDOUT: %p.ref.loc32: %.1 = name_ref p, %p // CHECK:STDOUT: %.loc32_4.1: ref %Class = deref %p.ref.loc32 // CHECK:STDOUT: %F.ref.loc32: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc32_7: = bound_method %.loc32_4.1, %F.ref.loc32 // CHECK:STDOUT: %.loc32_4.2: %.1 = addr_of %.loc32_4.1 -// CHECK:STDOUT: %F.call.loc32: init %.2 = call %.loc32_7(%.loc32_4.2) +// CHECK:STDOUT: %F.call.loc32: init %empty_tuple.type = call %.loc32_7(%.loc32_4.2) // CHECK:STDOUT: %p.ref.loc34: %.1 = name_ref p, %p // CHECK:STDOUT: %.loc34_4.1: ref %Class = deref %p.ref.loc34 // CHECK:STDOUT: %G.ref.loc34: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc34_7: = bound_method %.loc34_4.1, %G.ref.loc34 // CHECK:STDOUT: %.loc34_4.2: %Class = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call.loc34: init %.2 = call %.loc34_7(%.loc34_4.2) +// CHECK:STDOUT: %G.call.loc34: init %empty_tuple.type = call %.loc34_7(%.loc34_4.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index f55e8d2c830f..c78a6d93bd84 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -184,7 +184,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromError: type = class_type @DeriveFromError [template] // CHECK:STDOUT: %.1: type = ptr_type %DeriveFromError [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError.type: type = fn_type @AccessMemberWithInvalidBaseError [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError: %AccessMemberWithInvalidBaseError.type = struct_value () [template] @@ -252,7 +252,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] // CHECK:STDOUT: %.1: i32 = int_value 32 [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] @@ -261,15 +261,15 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: %.8: type = ptr_type %DeriveFromNonType [template] +// 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: %.7: type = ptr_type %DeriveFromNonType [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.type: type = fn_type @AccessMemberWithInvalidBasNonType [template] @@ -285,7 +285,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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 @@ -301,18 +301,18 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromNonType.decl: type = class_decl @DeriveFromNonType [template = constants.%DeriveFromNonType] {} {} // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: %AccessMemberWithInvalidBasNonType.type = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { -// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] -// CHECK:STDOUT: %.loc15_58: type = ptr_type %DeriveFromNonType [template = constants.%.8] +// CHECK:STDOUT: %.loc15_58: type = ptr_type %DeriveFromNonType [template = constants.%.7] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_64.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_64.2: type = converted %int.make_type_32, %.loc15_64.1 [template = i32] -// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -327,8 +327,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: @@ -360,9 +360,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %.8) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %.7) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p // CHECK:STDOUT: %.loc15_78: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -398,8 +398,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: // CHECK:STDOUT: --- fail_derive_from_i32.carbon @@ -407,10 +407,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromi32: type = class_type @DeriveFromi32 [template] // 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 = ptr_type %DeriveFromi32 [template] -// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: type = ptr_type %DeriveFromi32 [template] +// CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: %ConvertToBadBasei32.type: type = fn_type @ConvertToBadBasei32 [template] // CHECK:STDOUT: %ConvertToBadBasei32: %ConvertToBadBasei32.type = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -422,14 +422,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.3) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.3) [template] +// 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: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.2) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// 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: %AccessMemberWithInvalidBasei32.type: type = fn_type @AccessMemberWithInvalidBasei32 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasei32: %AccessMemberWithInvalidBasei32.type = struct_value () [template] // CHECK:STDOUT: } @@ -444,7 +444,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -460,35 +460,35 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromi32.decl: type = class_decl @DeriveFromi32 [template = constants.%DeriveFromi32] {} {} // CHECK:STDOUT: %ConvertToBadBasei32.decl: %ConvertToBadBasei32.type = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc21_40: type = ptr_type %DeriveFromi32 [template = constants.%.2] +// CHECK:STDOUT: %.loc21_40: type = ptr_type %DeriveFromi32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_49.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_49.2: type = converted %int.make_type_32, %.loc21_49.1 [template = i32] -// CHECK:STDOUT: %.loc21_49.3: type = ptr_type i32 [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %.loc21_49.3: type = ptr_type i32 [template = constants.%.2] +// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: %AccessMemberWithInvalidBasei32.type = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc23_51: type = ptr_type %DeriveFromi32 [template = constants.%.2] +// CHECK:STDOUT: %.loc23_51: type = ptr_type %DeriveFromi32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_57.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc23_57.2: type = converted %int.make_type_32, %.loc23_57.1 [template = i32] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -503,8 +503,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -529,10 +529,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBasei32(%p.param_patt: %.2) -> %.3 { +// CHECK:STDOUT: fn @ConvertToBadBasei32(%p.param_patt: %.1) -> %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p -// CHECK:STDOUT: %.loc21_61: %.3 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p +// CHECK:STDOUT: %.loc21_61: %.2 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -544,9 +544,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p.param_patt: %.2) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p.param_patt: %.1) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p // CHECK:STDOUT: %.loc23_71: ref %DeriveFromi32 = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -573,17 +573,17 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.3) { -// CHECK:STDOUT: %Dest => constants.%.3 -// CHECK:STDOUT: %Dest.patt => constants.%.3 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.2) { +// CHECK:STDOUT: %Dest => constants.%.2 +// CHECK:STDOUT: %Dest.patt => constants.%.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_derive_from_tuple.carbon @@ -593,13 +593,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %DeriveFromTuple: type = class_type @DeriveFromTuple [template] -// CHECK:STDOUT: %.3: type = tuple_type (type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (%Base) [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.6) [template] -// CHECK:STDOUT: %.8: type = ptr_type %DeriveFromTuple [template] -// CHECK:STDOUT: %.9: type = ptr_type %.4 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%Base) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.3) [template] +// CHECK:STDOUT: %.4: type = ptr_type %DeriveFromTuple [template] +// CHECK:STDOUT: %.5: type = ptr_type %tuple.type.2 [template] // CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] // CHECK:STDOUT: %ConvertToBadBaseTuple: %ConvertToBadBaseTuple.type = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -611,14 +611,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.9) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.9) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.5) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] @@ -634,7 +634,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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 (%.10) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] // 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 @@ -653,35 +653,35 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} // CHECK:STDOUT: %DeriveFromTuple.decl: type = class_decl @DeriveFromTuple [template = constants.%DeriveFromTuple] {} {} // CHECK:STDOUT: %ConvertToBadBaseTuple.decl: %ConvertToBadBaseTuple.type = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { -// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.9 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.9 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc21_44: type = ptr_type %DeriveFromTuple [template = constants.%.8] +// CHECK:STDOUT: %.loc21_44: type = ptr_type %DeriveFromTuple [template = constants.%.4] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc21_56: %.3 = tuple_literal (%Base.ref) -// CHECK:STDOUT: %.loc21_57.1: type = converted %.loc21_56, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %.loc21_57.2: type = ptr_type %.4 [template = constants.%.9] -// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.9 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.9 = return_slot %return.param +// CHECK:STDOUT: %.loc21_56: %tuple.type.1 = tuple_literal (%Base.ref) +// CHECK:STDOUT: %.loc21_57.1: type = converted %.loc21_56, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc21_57.2: type = ptr_type %tuple.type.2 [template = constants.%.5] +// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: %AccessMemberWithInvalidBaseTuple.type = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { -// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc23_55: type = ptr_type %DeriveFromTuple [template = constants.%.8] +// CHECK:STDOUT: %.loc23_55: type = ptr_type %DeriveFromTuple [template = constants.%.4] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_61.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc23_61.2: type = converted %int.make_type_32, %.loc23_61.1 [template = i32] -// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -696,8 +696,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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.%.10)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -716,8 +716,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromTuple { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc9_22.1: %.3 = tuple_literal (%Base.ref) -// CHECK:STDOUT: %.loc9_22.2: type = converted %.loc9_22.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_22.1: %tuple.type.1 = tuple_literal (%Base.ref) +// CHECK:STDOUT: %.loc9_22.2: type = converted %.loc9_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc9_23: = base_decl , element0 [template] // CHECK:STDOUT: %.loc10: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -727,10 +727,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p.param_patt: %.8) -> %.9 { +// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p.param_patt: %.4) -> %.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p -// CHECK:STDOUT: %.loc21_69: %.9 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %.loc21_69: %.5 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -744,9 +744,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p.param_patt: %.8) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p.param_patt: %.4) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p // CHECK:STDOUT: %.loc23_75: ref %DeriveFromTuple = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -773,17 +773,17 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.9) { -// CHECK:STDOUT: %Dest => constants.%.9 -// CHECK:STDOUT: %Dest.patt => constants.%.9 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) { +// CHECK:STDOUT: %Dest => constants.%.5 +// CHECK:STDOUT: %Dest.patt => constants.%.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.12 -// CHECK:STDOUT: %.2 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_derive_from_struct.carbon @@ -791,11 +791,11 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromStruct: type = class_type @DeriveFromStruct [template] // 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 = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %DeriveFromStruct [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %DeriveFromStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct.type: type = fn_type @ConvertToBadBaseStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct: %ConvertToBadBaseStruct.type = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -807,14 +807,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.3) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.3) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.2) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.type: type = fn_type @AccessMemberWithInvalidBaseStruct [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct: %AccessMemberWithInvalidBaseStruct.type = struct_value () [template] // CHECK:STDOUT: } @@ -829,7 +829,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // 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 @@ -845,39 +845,39 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromStruct.decl: type = class_decl @DeriveFromStruct [template = constants.%DeriveFromStruct] {} {} // CHECK:STDOUT: %ConvertToBadBaseStruct.decl: %ConvertToBadBaseStruct.type = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%.4] +// CHECK:STDOUT: %.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32.loc21_57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_57.1: type = value_of_initializer %int.make_type_32.loc21_57 [template = i32] // CHECK:STDOUT: %.loc21_57.2: type = converted %int.make_type_32.loc21_57, %.loc21_57.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc21_66: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_66.1: type = value_of_initializer %int.make_type_32.loc21_66 [template = i32] // CHECK:STDOUT: %.loc21_66.2: type = converted %int.make_type_32.loc21_66, %.loc21_66.1 [template = i32] -// CHECK:STDOUT: %.loc21_69: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc21_70: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %.loc21_69: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %.loc21_70: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: %AccessMemberWithInvalidBaseStruct.type = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc24_57: type = ptr_type %DeriveFromStruct [template = constants.%.4] +// CHECK:STDOUT: %.loc24_57: type = ptr_type %DeriveFromStruct [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_63.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_63.2: type = converted %int.make_type_32, %.loc24_63.1 [template = i32] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -892,8 +892,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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.%.5)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -910,7 +910,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc9_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_30.1: type = value_of_initializer %int.make_type_32.loc9_30 [template = i32] // CHECK:STDOUT: %.loc9_30.2: type = converted %int.make_type_32.loc9_30, %.loc9_30.1 [template = i32] -// CHECK:STDOUT: %.loc9_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] +// CHECK:STDOUT: %.loc9_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] // CHECK:STDOUT: %.loc9_34: = base_decl , element0 [template] // CHECK:STDOUT: %.loc10: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -922,10 +922,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p.param_patt: %.4) -> %.3 { +// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p.param_patt: %.3) -> %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc21_82: %.3 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %.loc21_82: %.2 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -937,9 +937,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p.param_patt: %.4) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p.param_patt: %.3) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: %.loc24_77: ref %DeriveFromStruct = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -966,17 +966,17 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.3) { -// CHECK:STDOUT: %Dest => constants.%.3 -// CHECK:STDOUT: %Dest.patt => constants.%.3 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.2) { +// CHECK:STDOUT: %Dest => constants.%.2 +// CHECK:STDOUT: %Dest.patt => constants.%.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_derive_from_incomplete.carbon @@ -987,7 +987,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.1: type = ptr_type %DeriveFromIncomplete [template] // CHECK:STDOUT: %.2: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete: %ConvertToBadBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] @@ -998,14 +998,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [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: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.2) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// 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: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] @@ -1021,7 +1021,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -1081,8 +1081,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1160,8 +1160,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_derive_from_final.carbon @@ -1169,22 +1169,22 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Final: type = class_type @Final [template] // 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 = unbound_element_type %Final, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Final, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %DeriveFromFinal: type = class_type @DeriveFromFinal [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %DeriveFromFinal, %Final [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Final} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = ptr_type %DeriveFromFinal [template] -// CHECK:STDOUT: %.10: type = ptr_type %Final [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %DeriveFromFinal, %Final [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Final} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = ptr_type %DeriveFromFinal [template] +// CHECK:STDOUT: %.9: type = ptr_type %Final [template] // CHECK:STDOUT: %ConvertToBadBaseFinal.type: type = fn_type @ConvertToBadBaseFinal [template] // CHECK:STDOUT: %ConvertToBadBaseFinal: %ConvertToBadBaseFinal.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.12: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.11: type = ptr_type %.6 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_WithMember [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember: %AccessMemberWithInvalidBaseFinal_WithMember.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_NoMember [template] @@ -1213,49 +1213,49 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Final.decl: type = class_decl @Final [template = constants.%Final] {} {} // CHECK:STDOUT: %DeriveFromFinal.decl: type = class_decl @DeriveFromFinal [template = constants.%DeriveFromFinal] {} {} // CHECK:STDOUT: %ConvertToBadBaseFinal.decl: %ConvertToBadBaseFinal.type = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.10 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.10 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.9 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.9 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc15_44: type = ptr_type %DeriveFromFinal [template = constants.%.9] +// CHECK:STDOUT: %.loc15_44: type = ptr_type %DeriveFromFinal [template = constants.%.8] // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc15_55: type = ptr_type %Final [template = constants.%.10] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.10 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.10 = return_slot %return.param +// CHECK:STDOUT: %.loc15_55: type = ptr_type %Final [template = constants.%.9] +// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.9 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.9 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: %AccessMemberWithInvalidBaseFinal_WithMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc19_66: type = ptr_type %DeriveFromFinal [template = constants.%.9] +// CHECK:STDOUT: %.loc19_66: type = ptr_type %DeriveFromFinal [template = constants.%.8] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_72.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_72.2: type = converted %int.make_type_32, %.loc19_72.1 [template = i32] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: %AccessMemberWithInvalidBaseFinal_NoMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { -// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc23_64: type = ptr_type %DeriveFromFinal [template = constants.%.9] +// CHECK:STDOUT: %.loc23_64: type = ptr_type %DeriveFromFinal [template = constants.%.8] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_70.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc23_70.2: type = converted %int.make_type_32, %.loc23_70.1 [template = i32] -// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1265,8 +1265,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc3_10.2: type = converted %int.make_type_32, %.loc3_10.1 [template = i32] -// CHECK:STDOUT: %.loc3_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc4: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc3_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Final @@ -1275,8 +1275,8 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromFinal { // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc11: %.6 = base_decl %Final, element0 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc11: %.5 = base_decl %Final, element0 [template] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromFinal @@ -1286,21 +1286,21 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p.param_patt: %.9) -> %.10 { +// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p.param_patt: %.8) -> %.9 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %.loc16_11.1: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %.loc16_11.2: ref %Final = class_element_access %.loc16_11.1, element0 -// CHECK:STDOUT: %.loc16_11.3: %.10 = addr_of %.loc16_11.2 -// CHECK:STDOUT: %.loc16_11.4: %.10 = converted %p.ref, %.loc16_11.3 +// CHECK:STDOUT: %.loc16_11.3: %.9 = addr_of %.loc16_11.2 +// CHECK:STDOUT: %.loc16_11.4: %.9 = converted %p.ref, %.loc16_11.3 // CHECK:STDOUT: return %.loc16_11.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p.param_patt: %.9) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p.param_patt: %.8) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %.loc20_11: ref %DeriveFromFinal = deref %p.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Final.%.loc3_8 [template = @Final.%.loc3_8] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Final.%.loc3_8 [template = @Final.%.loc3_8] // CHECK:STDOUT: %.loc20_14.1: ref %Final = class_element_access %.loc20_11, element0 // CHECK:STDOUT: %.loc20_14.2: ref %Final = converted %.loc20_11, %.loc20_14.1 // CHECK:STDOUT: %.loc20_14.3: ref i32 = class_element_access %.loc20_14.2, element0 @@ -1308,9 +1308,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: return %.loc20_14.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p.param_patt: %.9) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p.param_patt: %.8) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %.loc27: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %b.ref: = name_ref b, [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_base_method_define.carbon b/toolchain/check/testdata/class/fail_base_method_define.carbon index 5f6858048d54..99c7fbaaf8f9 100644 --- a/toolchain/check/testdata/class/fail_base_method_define.carbon +++ b/toolchain/check/testdata/class/fail_base_method_define.carbon @@ -36,22 +36,22 @@ fn D.C.F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %D, %B [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %D, %B [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.8: %.type = struct_value () [template] +// CHECK:STDOUT: %.7: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,13 +71,13 @@ fn D.C.F() {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.8] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.7] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -87,7 +87,7 @@ fn D.C.F() {} // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -96,8 +96,8 @@ fn D.C.F() {} // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc20: %.5 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc21: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc20: %.4 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D diff --git a/toolchain/check/testdata/class/fail_base_misplaced.carbon b/toolchain/check/testdata/class/fail_base_misplaced.carbon index 35495155f1ee..c397157f97e0 100644 --- a/toolchain/check/testdata/class/fail_base_misplaced.carbon +++ b/toolchain/check/testdata/class/fail_base_misplaced.carbon @@ -34,7 +34,7 @@ fn F() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_modifiers.carbon b/toolchain/check/testdata/class/fail_base_modifiers.carbon index f4e5b10c6b86..4d966e1120b2 100644 --- a/toolchain/check/testdata/class/fail_base_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_base_modifiers.carbon @@ -58,17 +58,17 @@ class C4 { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C1: type = class_type @C1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C1, %B [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C1, %B [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %C2: type = class_type @C2 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C2, %B [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %C2, %B [template] // CHECK:STDOUT: %C3: type = class_type @C3 [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %C3, %B [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %C3, %B [template] // CHECK:STDOUT: %C4: type = class_type @C4 [template] -// CHECK:STDOUT: %.10: type = unbound_element_type %C4, %B [template] +// CHECK:STDOUT: %.9: type = unbound_element_type %C4, %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,8 +104,8 @@ class C4 { // CHECK:STDOUT: // CHECK:STDOUT: class @C1 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc18: %.5 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc18: %.4 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 @@ -115,8 +115,8 @@ class C4 { // CHECK:STDOUT: // CHECK:STDOUT: class @C2 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc30: %.8 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc31: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc30: %.7 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc31: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 @@ -125,8 +125,8 @@ class C4 { // CHECK:STDOUT: // CHECK:STDOUT: class @C3 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc41: %.9 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc42: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc41: %.8 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc42: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C3 @@ -136,8 +136,8 @@ class C4 { // CHECK:STDOUT: // CHECK:STDOUT: class @C4 { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc51: %.10 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc52: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc51: %.9 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc52: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C4 diff --git a/toolchain/check/testdata/class/fail_base_no_extend.carbon b/toolchain/check/testdata/class/fail_base_no_extend.carbon index 0ff711bc94e7..415192a223b2 100644 --- a/toolchain/check/testdata/class/fail_base_no_extend.carbon +++ b/toolchain/check/testdata/class/fail_base_no_extend.carbon @@ -24,11 +24,11 @@ class C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,8 +58,8 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc17: %.5 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc18: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc17: %.4 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/class/fail_base_repeated.carbon b/toolchain/check/testdata/class/fail_base_repeated.carbon index feb6a5b590ce..6ef9eb0c305c 100644 --- a/toolchain/check/testdata/class/fail_base_repeated.carbon +++ b/toolchain/check/testdata/class/fail_base_repeated.carbon @@ -43,13 +43,13 @@ class D { // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %B2: type = class_type @B2 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C, %B1 [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B1} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B1 [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B1} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %D, %B1 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %D, %B1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,9 +90,9 @@ class D { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B1.ref: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc15: %.5 = base_decl %B1, element0 [template] +// CHECK:STDOUT: %.loc15: %.4 = base_decl %B1, element0 [template] // CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] -// CHECK:STDOUT: %.loc24: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc24: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -102,9 +102,9 @@ class D { // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %B1.ref.loc28: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc28: %.8 = base_decl %B1, element0 [template] +// CHECK:STDOUT: %.loc28: %.7 = base_decl %B1, element0 [template] // CHECK:STDOUT: %B1.ref.loc35: type = name_ref B1, file.%B1.decl [template = constants.%B1] -// CHECK:STDOUT: %.loc36: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc36: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D diff --git a/toolchain/check/testdata/class/fail_base_unbound.carbon b/toolchain/check/testdata/class/fail_base_unbound.carbon index cddf67b0c2b9..bc8d0f7cd293 100644 --- a/toolchain/check/testdata/class/fail_base_unbound.carbon +++ b/toolchain/check/testdata/class/fail_base_unbound.carbon @@ -26,13 +26,13 @@ let b: B = C.base; // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C, %B [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %.3} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,8 +64,8 @@ let b: B = C.base; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc14: %.5 = base_decl %B, element0 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc14: %.4 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -76,7 +76,7 @@ let b: B = C.base; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %base.ref: %.5 = name_ref base, @C.%.loc14 [template = @C.%.loc14] +// CHECK:STDOUT: %base.ref: %.4 = name_ref base, @C.%.loc14 [template = @C.%.loc14] // CHECK:STDOUT: %b: %B = bind_name b, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index b3ebf4ab6bfa..1d48e4832844 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -31,19 +31,19 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B, i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.b: i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %B, i32 [template] +// CHECK:STDOUT: %.5: type = struct_type {.b: i32} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %AccessBInA.type: type = fn_type @AccessBInA [template] // CHECK:STDOUT: %AccessBInA: %AccessBInA.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [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] @@ -53,14 +53,14 @@ fn AccessBInA(a: A) -> i32 { // 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: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = 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(%B) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%B) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,7 +73,7 @@ fn AccessBInA(a: A) -> i32 { // 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 (%.10) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] +// 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 @@ -115,8 +115,8 @@ fn AccessBInA(a: A) -> i32 { // 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.%.10)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.11)] +// 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: @@ -130,8 +130,8 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -142,8 +142,8 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32] -// CHECK:STDOUT: %.loc16_8: %.5 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc16_8: %.4 = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -156,7 +156,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %b.ref: %.5 = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] +// CHECK:STDOUT: %b.ref: %.4 = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] // CHECK:STDOUT: %.loc26_11.1: %B = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc26_11.2: i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return @@ -200,7 +200,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.12 -// CHECK:STDOUT: %.2 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon index f10d2a1c176f..c20e26d7d6f9 100644 --- a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon +++ b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon @@ -24,10 +24,10 @@ fn Make() -> C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 123 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.1: i32 = int_value 123 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,8 +67,8 @@ fn Make() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_16: i32 = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc19_19: %.3 = struct_literal (%.loc19_16) +// CHECK:STDOUT: %.loc19_16: i32 = int_value 123 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_19: %.2 = struct_literal (%.loc19_16) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index 3bf3838e6533..8d7b11bbc2aa 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -45,26 +45,26 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %A1: type = class_type @A1 [template] // 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 = unbound_element_type %A1, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A1, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %A2: type = class_type @A2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %A2, i32 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %A2, i32 [template] // CHECK:STDOUT: %B2: type = class_type @B2 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %B2, %A2 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %B2, i32 [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %A2, .b: i32} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %B2 [template] -// CHECK:STDOUT: %.12: type = ptr_type %A1 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %B2, %A2 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %B2, i32 [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %A2, .b: i32} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %B2 [template] +// CHECK:STDOUT: %.11: type = ptr_type %A1 [template] // CHECK:STDOUT: %ConvertUnrelated.type: type = fn_type @ConvertUnrelated [template] // CHECK:STDOUT: %ConvertUnrelated: %ConvertUnrelated.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: %.6, .b: i32} [template] -// CHECK:STDOUT: %.14: type = ptr_type %.13 [template] -// CHECK:STDOUT: %.15: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.12: type = struct_type {.base: %.5, .b: i32} [template] +// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] +// CHECK:STDOUT: %.14: type = ptr_type %.8 [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] @@ -74,24 +74,24 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // 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: %.16: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.12) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.12) [template] +// CHECK:STDOUT: %.15: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.11) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.11) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.20: %.16 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.17: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.19: %.15 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.21: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.22: type = ptr_type %A2 [template] +// CHECK:STDOUT: %.20: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.21: type = ptr_type %A2 [template] // CHECK:STDOUT: %ConvertIncomplete.type: type = fn_type @ConvertIncomplete [template] // CHECK:STDOUT: %ConvertIncomplete: %ConvertIncomplete.type = struct_value () [template] -// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(%.22) [template] -// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%.22) [template] +// CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(%.21) [template] +// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%.21) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.23: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] -// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.22: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.23: %.22 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,7 +104,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // 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 (%.16) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.20)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.15) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.19)] // 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 @@ -125,35 +125,35 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %A2.decl: type = class_decl @A2 [template = constants.%A2] {} {} // CHECK:STDOUT: %B2.decl: type = class_decl @B2 [template = constants.%B2] {} {} // CHECK:STDOUT: %ConvertUnrelated.decl: %ConvertUnrelated.type = fn_decl @ConvertUnrelated [template = constants.%ConvertUnrelated] { -// CHECK:STDOUT: %p.patt: %.11 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.11 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.12 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.12 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.11 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.11 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] -// CHECK:STDOUT: %.loc31_26: type = ptr_type %B2 [template = constants.%.11] +// CHECK:STDOUT: %.loc31_26: type = ptr_type %B2 [template = constants.%.10] // CHECK:STDOUT: %A1.ref: type = name_ref A1, file.%A1.decl [template = constants.%A1] -// CHECK:STDOUT: %.loc31_34: type = ptr_type %A1 [template = constants.%.12] -// CHECK:STDOUT: %p.param: %.11 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.11 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.12 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.12 = return_slot %return.param +// CHECK:STDOUT: %.loc31_34: type = ptr_type %A1 [template = constants.%.11] +// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.11 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.11 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // CHECK:STDOUT: %ConvertIncomplete.decl: %ConvertIncomplete.type = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { -// CHECK:STDOUT: %p.patt: %.21 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.21 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.20 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.20 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.21 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.21 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.21] +// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.20] // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.22] -// CHECK:STDOUT: %p.param: %.21 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.21 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param +// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.21] +// CHECK:STDOUT: %p.param: %.20 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.20 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.21 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.21 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -166,8 +166,8 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // 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.%.16)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.16) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.17)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.15)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.15) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -181,8 +181,8 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A1 @@ -193,8 +193,8 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32] -// CHECK:STDOUT: %.loc16_8: %.5 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc16_8: %.4 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A2 @@ -203,12 +203,12 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: class @B2 { // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc20: %.7 = base_decl %A2, element0 [template] +// CHECK:STDOUT: %.loc20: %.6 = base_decl %A2, element0 [template] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32, %.loc21_10.1 [template = i32] -// CHECK:STDOUT: %.loc21_8: %.8 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc21_8: %.7 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 @@ -221,10 +221,10 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertUnrelated(%p.param_patt: %.11) -> %.12 { +// CHECK:STDOUT: fn @ConvertUnrelated(%p.param_patt: %.10) -> %.11 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p -// CHECK:STDOUT: %.loc31_46: %.12 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.10 = name_ref p, %p +// CHECK:STDOUT: %.loc31_46: %.11 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -236,10 +236,10 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %.21) -> %.22 { +// CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %.20) -> %.21 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.21 = name_ref p, %p -// CHECK:STDOUT: %.loc41_55: %.22 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.20 = name_ref p, %p +// CHECK:STDOUT: %.loc41_55: %.21 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -264,29 +264,29 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.12) { -// CHECK:STDOUT: %Dest => constants.%.12 -// CHECK:STDOUT: %Dest.patt => constants.%.12 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.11) { +// CHECK:STDOUT: %Dest => constants.%.11 +// CHECK:STDOUT: %Dest.patt => constants.%.11 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %.1 => constants.%.17 +// CHECK:STDOUT: %.2 => constants.%.18 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.22) { -// CHECK:STDOUT: %Dest => constants.%.22 -// CHECK:STDOUT: %Dest.patt => constants.%.22 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.21) { +// CHECK:STDOUT: %Dest => constants.%.21 +// CHECK:STDOUT: %Dest.patt => constants.%.21 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.1 => constants.%.23 -// CHECK:STDOUT: %.2 => constants.%.24 +// CHECK:STDOUT: %.1 => constants.%.22 +// CHECK:STDOUT: %.2 => constants.%.23 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_extend_cycle.carbon b/toolchain/check/testdata/class/fail_extend_cycle.carbon index 547577439d91..6089a844b311 100644 --- a/toolchain/check/testdata/class/fail_extend_cycle.carbon +++ b/toolchain/check/testdata/class/fail_extend_cycle.carbon @@ -38,13 +38,13 @@ base class A { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = class_type @.1 [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %.8, %A [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = class_type @.1 [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %.7, %A [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,7 +63,7 @@ base class A { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.8] {} {} +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.7] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -75,8 +75,8 @@ base class A { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.5 = base_decl %A, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc16: %.4 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -86,13 +86,13 @@ base class A { // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc27: %.9 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc27: %.8 = base_decl %A, element0 [template] // CHECK:STDOUT: %C.ref: = name_ref C, [template = ] // CHECK:STDOUT: %.loc31: = field_decl c, element1 [template] // CHECK:STDOUT: %.loc32: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.8 +// CHECK:STDOUT: .Self = constants.%.7 // CHECK:STDOUT: .base = %.loc27 // CHECK:STDOUT: .c = %.loc31 // CHECK:STDOUT: extend name_scope2 diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index a67c9135efaf..c7f840bacc5b 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -39,13 +39,13 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: type = struct_type {.j: i32, .k: i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = struct_type {.j: i32, .k: i32} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,22 +70,22 @@ class Class { // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_32.loc17, %.loc17_18.1 [template = i32] -// CHECK:STDOUT: %.loc17_16: %.2 = field_decl j, element0 [template] +// CHECK:STDOUT: %.loc17_16: %.1 = field_decl j, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_32.loc23, %.loc23_16.1 [template = i32] -// CHECK:STDOUT: %.loc23_14: %.2 = field_decl k, element1 [template] +// CHECK:STDOUT: %.loc23_14: %.1 = field_decl k, element1 [template] // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_18.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_18.2: type = converted %int.make_type_32.loc29, %.loc29_18.1 [template = i32] -// CHECK:STDOUT: %.loc29_24: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc29_24: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %l: i32 = bind_name l, %.loc29_24 // CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_16.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_16.2: type = converted %int.make_type_32.loc34, %.loc34_16.1 [template = i32] -// CHECK:STDOUT: %.loc34_22: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc34_22: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %m: i32 = bind_name m, %.loc34_22 -// CHECK:STDOUT: %.loc35: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc35: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index 7c7d617d6d02..ecc2702a3d25 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -37,20 +37,20 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,7 +75,7 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %self.patt: = binding_pattern self // CHECK:STDOUT: %self.param_patt: = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %n.patt: = binding_pattern n @@ -101,15 +101,15 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.2)] +// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.1)] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.3) [symbolic = %.loc14_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.2) [symbolic = %.loc14_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.2) = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.1) = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { // CHECK:STDOUT: %self.patt: @F.%Class (%Class.2) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.%Class (%Class.2) = value_param_pattern %self.patt, runtime_param0 @@ -124,7 +124,7 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %n.param: @F.%T (%T) = value_param runtime_param1 // CHECK:STDOUT: %n: @F.%T (%T) = bind_name n, %n.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.3 [symbolic = %.loc14_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.2 [symbolic = %.loc14_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index 68786dc02521..45fb5aa2902b 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -159,14 +159,14 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: %CallClassFunction.type: type = fn_type @CallClassFunction [template] // CHECK:STDOUT: %CallClassFunction: %CallClassFunction.type = struct_value () [template] // CHECK:STDOUT: %ConvertFromStruct.type: type = fn_type @ConvertFromStruct [template] // CHECK:STDOUT: %ConvertFromStruct: %ConvertFromStruct.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: type = ptr_type %Class [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %Class [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -214,7 +214,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: %CallClassFunction.decl: %CallClassFunction.type = fn_decl @CallClassFunction [template = constants.%CallClassFunction] {} {} // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %global_var.var: ref = var global_var @@ -228,59 +228,59 @@ class C { // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc44_14: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %.loc44_14: type = ptr_type %Class [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc44_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc44_20.2: type = converted %int.make_type_32, %.loc44_20.1 [template = i32] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MemberAccess.decl: %MemberAccess.type = fn_decl @MemberAccess [template = constants.%MemberAccess] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc55_25: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %.loc55_25: type = ptr_type %Class [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc55_31.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc55_31.2: type = converted %int.make_type_32, %.loc55_31.1 [template = i32] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Copy.decl: %Copy.type = fn_decl @Copy [template = constants.%Copy] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc73_12: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc73_17: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %.loc73_17: type = ptr_type %Class [template = constants.%.3] // CHECK:STDOUT: %Class.ref.loc73_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param1 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Let.decl: %Let.type = fn_decl @Let [template = constants.%Let] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc77: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc77: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %.loc77: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %TakeIncomplete.decl: %TakeIncomplete.type = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { // CHECK:STDOUT: %c.patt: %Class = binding_pattern c @@ -299,13 +299,13 @@ class C { // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallTakeIncomplete.decl: %CallTakeIncomplete.type = fn_decl @CallTakeIncomplete [template = constants.%CallTakeIncomplete] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc92: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param +// CHECK:STDOUT: %.loc92: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallReturnIncomplete.decl: %CallReturnIncomplete.type = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} {} // CHECK:STDOUT: } @@ -326,37 +326,37 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertFromStruct() -> %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc42_43: %.3 = struct_literal () +// CHECK:STDOUT: %.loc42_43: %.2 = struct_literal () // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.4) -> i32 { +// CHECK:STDOUT: fn @G(%p.param_patt: %.3) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: %.loc52: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @MemberAccess(%p.param_patt: %.4) -> i32 { +// CHECK:STDOUT: fn @MemberAccess(%p.param_patt: %.3) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: %.loc63: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Copy(%p.param_patt: %.4) -> %Class { +// CHECK:STDOUT: fn @Copy(%p.param_patt: %.3) -> %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: %.loc74: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Let(%p.param_patt: %.4) { +// CHECK:STDOUT: fn @Let(%p.param_patt: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc85: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: %.loc85: ref %Class = deref %p.ref // CHECK:STDOUT: %c: = bind_name c, // CHECK:STDOUT: return @@ -366,15 +366,15 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnIncomplete() -> %Class; // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallTakeIncomplete(%p.param_patt: %.4) { +// CHECK:STDOUT: fn @CallTakeIncomplete(%p.param_patt: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TakeIncomplete.ref.loc103: %TakeIncomplete.type = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: %.loc103: ref %Class = deref %p.ref -// CHECK:STDOUT: %TakeIncomplete.call.loc103: init %.1 = call %TakeIncomplete.ref.loc103() +// CHECK:STDOUT: %TakeIncomplete.call.loc103: init %empty_tuple.type = call %TakeIncomplete.ref.loc103() // CHECK:STDOUT: %TakeIncomplete.ref.loc115: %TakeIncomplete.type = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] -// CHECK:STDOUT: %.loc115: %.3 = struct_literal () -// CHECK:STDOUT: %TakeIncomplete.call.loc115: init %.1 = call %TakeIncomplete.ref.loc115() +// CHECK:STDOUT: %.loc115: %.2 = struct_literal () +// CHECK:STDOUT: %TakeIncomplete.call.loc115: init %empty_tuple.type = call %TakeIncomplete.ref.loc115() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 02ed02e56e7e..55c3e6eaf2f9 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -35,20 +35,20 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.7: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: i32, .c: i32} [template] -// CHECK:STDOUT: %.10: i32 = int_value 3 [template] -// CHECK:STDOUT: %.11: type = struct_type {.a: i32, .b: i32, .c: i32} [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.8: type = struct_type {.a: i32, .c: i32} [template] +// CHECK:STDOUT: %.9: i32 = int_value 3 [template] +// CHECK:STDOUT: %.10: type = struct_type {.a: i32, .b: i32, .c: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,12 +75,12 @@ fn F() { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -92,25 +92,25 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_9: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc21_10.1: %.6 = struct_literal (%.loc21_9) +// CHECK:STDOUT: %.loc21_9: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc21_10.1: %.5 = struct_literal (%.loc21_9) // CHECK:STDOUT: %Class.ref.loc21: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc21_10.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc21_10.3: ref %Class = temporary %.loc21_10.2, // CHECK:STDOUT: %.loc21_12: ref %Class = converted %.loc21_10.1, %.loc21_10.3 -// CHECK:STDOUT: %.loc26_9: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc26_17: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc26_18.1: %.9 = struct_literal (%.loc26_9, %.loc26_17) +// CHECK:STDOUT: %.loc26_9: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc26_17: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc26_18.1: %.8 = struct_literal (%.loc26_9, %.loc26_17) // CHECK:STDOUT: %Class.ref.loc26: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc26_18.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc26_18.3: ref i32 = class_element_access %.loc26_18.2, element0 -// CHECK:STDOUT: %.loc26_18.4: init i32 = initialize_from %.loc26_9 to %.loc26_18.3 [template = constants.%.5] +// CHECK:STDOUT: %.loc26_18.4: init i32 = initialize_from %.loc26_9 to %.loc26_18.3 [template = constants.%.4] // CHECK:STDOUT: %.loc26_18.5: ref %Class = temporary %.loc26_18.2, // CHECK:STDOUT: %.loc26_20: ref %Class = converted %.loc26_18.1, %.loc26_18.5 -// CHECK:STDOUT: %.loc30_9: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc30_17: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc30_25: i32 = int_value 3 [template = constants.%.10] -// CHECK:STDOUT: %.loc30_26.1: %.11 = struct_literal (%.loc30_9, %.loc30_17, %.loc30_25) +// CHECK:STDOUT: %.loc30_9: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc30_17: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc30_25: i32 = int_value 3 [template = constants.%.9] +// CHECK:STDOUT: %.loc30_26.1: %.10 = struct_literal (%.loc30_9, %.loc30_17, %.loc30_25) // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc30_26.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc30_26.3: ref %Class = temporary %.loc30_26.2, diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 53a60ffcd8f0..a2057e80d6bd 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -31,20 +31,20 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %Class [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.7, %.8) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.6, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,13 +66,13 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.5] -// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: } @@ -81,12 +81,12 @@ fn F() { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -96,22 +96,22 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.5); +// CHECK:STDOUT: fn @G(%p.param_patt: %.4); // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc25_10: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var -// CHECK:STDOUT: %.loc25_24: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_32: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc25_33.1: %.3 = struct_literal (%.loc25_24, %.loc25_32) +// CHECK:STDOUT: %.loc25_24: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc25_32: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc25_33.1: %.2 = struct_literal (%.loc25_24, %.loc25_32) // CHECK:STDOUT: %Class.ref.loc25_38: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc25_33.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc25_33.3: ref i32 = class_element_access %.loc25_33.2, element0 -// CHECK:STDOUT: %.loc25_33.4: init i32 = initialize_from %.loc25_24 to %.loc25_33.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc25_33.4: init i32 = initialize_from %.loc25_24 to %.loc25_33.3 [template = constants.%.6] // CHECK:STDOUT: %.loc25_33.5: ref i32 = class_element_access %.loc25_33.2, element1 -// CHECK:STDOUT: %.loc25_33.6: init i32 = initialize_from %.loc25_32 to %.loc25_33.5 [template = constants.%.8] +// CHECK:STDOUT: %.loc25_33.6: init i32 = initialize_from %.loc25_32 to %.loc25_33.5 [template = constants.%.7] // CHECK:STDOUT: %.loc25_33.7: init %Class = class_init (%.loc25_33.4, %.loc25_33.6), %.loc25_33.2 [template = constants.%struct] // CHECK:STDOUT: %.loc25_33.8: ref %Class = temporary %.loc25_33.2, %.loc25_33.7 // CHECK:STDOUT: %.loc25_35.1: ref %Class = converted %.loc25_33.1, %.loc25_33.8 @@ -119,8 +119,8 @@ fn F() { // CHECK:STDOUT: assign %c.var, // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c -// CHECK:STDOUT: %.loc26: %.5 = addr_of %c.ref -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref(%.loc26) +// CHECK:STDOUT: %.loc26: %.4 = addr_of %c.ref +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc26) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_memaccess_category.carbon b/toolchain/check/testdata/class/fail_memaccess_category.carbon index 76e93ec405b9..d66b2f9e5c77 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -44,19 +44,19 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = ptr_type %A [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.6: type = struct_type {.a: %A} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: %.5} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.8: type = struct_type {.a: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,16 +77,16 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %s.patt: %.7 = binding_pattern s -// CHECK:STDOUT: %s.param_patt: %.7 = value_param_pattern %s.patt, runtime_param0 +// CHECK:STDOUT: %s.patt: %.6 = binding_pattern s +// CHECK:STDOUT: %s.param_patt: %.6 = value_param_pattern %s.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %B = binding_pattern b // CHECK:STDOUT: %b.param_patt: %B = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc19: type = struct_type {.a: %A} [template = constants.%.7] +// CHECK:STDOUT: %.loc19: type = struct_type {.a: %A} [template = constants.%.6] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %s.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %s: %.7 = bind_name s, %s.param +// CHECK:STDOUT: %s.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %s: %.6 = bind_name s, %s.param // CHECK:STDOUT: %b.param: %B = value_param runtime_param1 // CHECK:STDOUT: %b: %B = bind_name b, %b.param // CHECK:STDOUT: } @@ -103,7 +103,7 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 // CHECK:STDOUT: %self: %.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -112,8 +112,8 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc16: %.6 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc16: %.5 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -122,20 +122,20 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1[addr %self.param_patt: %.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%s.param_patt: %.7, %b.param_patt: %B) { +// CHECK:STDOUT: fn @F.2(%s.param_patt: %.6, %b.param_patt: %B) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %s.ref: %.7 = name_ref s, %s +// CHECK:STDOUT: %s.ref: %.6 = name_ref s, %s // CHECK:STDOUT: %.loc28_4: %A = struct_access %s.ref, element0 // CHECK:STDOUT: %F.ref.loc28: %F.type.1 = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc28_6: = bound_method %.loc28_4, %F.ref.loc28 -// CHECK:STDOUT: %F.call.loc28: init %.2 = call %.loc28_6() +// CHECK:STDOUT: %F.call.loc28: init %empty_tuple.type = call %.loc28_6() // CHECK:STDOUT: %b.ref: %B = name_ref b, %b -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, @B.%.loc16 [template = @B.%.loc16] +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, @B.%.loc16 [template = @B.%.loc16] // CHECK:STDOUT: %.loc38_4.1: ref %A = class_element_access %b.ref, element0 // CHECK:STDOUT: %.loc38_4.2: %A = bind_value %.loc38_4.1 // CHECK:STDOUT: %F.ref.loc38: %F.type.1 = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc38_6: = bound_method %.loc38_4.2, %F.ref.loc38 -// CHECK:STDOUT: %F.call.loc38: init %.2 = call %.loc38_6() +// CHECK:STDOUT: %F.call.loc38: init %empty_tuple.type = call %.loc38_6() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_member_of_let.carbon b/toolchain/check/testdata/class/fail_member_of_let.carbon index 1119d30a6823..6073782cb81b 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -30,14 +30,14 @@ fn T.F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,7 +57,7 @@ fn T.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -71,7 +71,7 @@ fn T.F() {} // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index 5358b917e382..5faefdad022b 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -51,13 +51,13 @@ fn F(c: Class) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %NoSelf.type: type = fn_type @NoSelf [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NoSelf: %NoSelf.type = struct_value () [template] // CHECK:STDOUT: %WithSelf.type: type = fn_type @WithSelf [template] // CHECK:STDOUT: %WithSelf: %WithSelf.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -101,7 +101,7 @@ fn F(c: Class) { // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -117,22 +117,22 @@ fn F(c: Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref.loc19: %Class = name_ref c, %c // CHECK:STDOUT: %NoSelf.ref.loc19: %NoSelf.type = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] -// CHECK:STDOUT: %NoSelf.call.loc19: init %.1 = call %NoSelf.ref.loc19() +// CHECK:STDOUT: %NoSelf.call.loc19: init %empty_tuple.type = call %NoSelf.ref.loc19() // CHECK:STDOUT: %c.ref.loc20: %Class = name_ref c, %c // CHECK:STDOUT: %WithSelf.ref.loc20: %WithSelf.type = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %.loc20: = bound_method %c.ref.loc20, %WithSelf.ref.loc20 -// CHECK:STDOUT: %WithSelf.call.loc20: init %.1 = call %.loc20(%c.ref.loc20) +// CHECK:STDOUT: %WithSelf.call.loc20: init %empty_tuple.type = call %.loc20(%c.ref.loc20) // CHECK:STDOUT: %Class.ref.loc22: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %NoSelf.ref.loc22: %NoSelf.type = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] -// CHECK:STDOUT: %NoSelf.call.loc22: init %.1 = call %NoSelf.ref.loc22() +// CHECK:STDOUT: %NoSelf.call.loc22: init %empty_tuple.type = call %NoSelf.ref.loc22() // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %WithSelf.ref.loc30: %WithSelf.type = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] -// CHECK:STDOUT: %WithSelf.call.loc30: init %.1 = call %WithSelf.ref.loc30() +// CHECK:STDOUT: %WithSelf.call.loc30: init %empty_tuple.type = call %WithSelf.ref.loc30() // CHECK:STDOUT: %Class.ref.loc38: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %WithSelf.ref.loc38: %WithSelf.type = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %c.ref.loc38: %Class = name_ref c, %c // CHECK:STDOUT: %A.ref: %WithSelf.type = name_ref A, file.%A [template = constants.%WithSelf] -// CHECK:STDOUT: %WithSelf.call.loc46: init %.1 = call %A.ref() +// CHECK:STDOUT: %WithSelf.call.loc46: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_method_modifiers.carbon b/toolchain/check/testdata/class/fail_method_modifiers.carbon index 47fa74500f78..71bc6bf50195 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -60,12 +60,12 @@ base class BaseClass { // CHECK:STDOUT: constants { // CHECK:STDOUT: %FinalClass: type = class_type @FinalClass [template] // CHECK:STDOUT: %Abstract.type.1: type = fn_type @Abstract.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Abstract.1: %Abstract.type.1 = struct_value () [template] // CHECK:STDOUT: %Virtual.type: type = fn_type @Virtual [template] // CHECK:STDOUT: %Virtual: %Virtual.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %AbstractClass: type = class_type @AbstractClass [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] // CHECK:STDOUT: %Default: %Default.type = struct_value () [template] @@ -113,7 +113,7 @@ base class BaseClass { // CHECK:STDOUT: %self.param: %FinalClass = value_param runtime_param0 // CHECK:STDOUT: %self: %FinalClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc30: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc30: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FinalClass @@ -138,7 +138,7 @@ base class BaseClass { // CHECK:STDOUT: %self.param: %AbstractClass = value_param runtime_param0 // CHECK:STDOUT: %self: %AbstractClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc45: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractClass @@ -155,7 +155,7 @@ base class BaseClass { // CHECK:STDOUT: %self.param: %BaseClass = value_param runtime_param0 // CHECK:STDOUT: %self: %BaseClass = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc56: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc56: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%BaseClass diff --git a/toolchain/check/testdata/class/fail_method_redefinition.carbon b/toolchain/check/testdata/class/fail_method_redefinition.carbon index e09e66c2a7a3..5917ae6cda8d 100644 --- a/toolchain/check/testdata/class/fail_method_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_method_redefinition.carbon @@ -24,10 +24,10 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,7 +49,7 @@ class Class { // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %F.decl.loc19: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_modifiers.carbon b/toolchain/check/testdata/class/fail_modifiers.carbon index c999debb0d31..f2c67ff8d653 100644 --- a/toolchain/check/testdata/class/fail_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_modifiers.carbon @@ -111,13 +111,13 @@ fn AbstractWithDefinition.G() { // CHECK:STDOUT: %AbstractAndBase: type = class_type @AbstractAndBase [template] // CHECK:STDOUT: %AbstractWithDefinition: type = class_type @AbstractWithDefinition [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: type = ptr_type [template] -// CHECK:STDOUT: %.5: type = struct_type {.: %.4} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: type = ptr_type [template] +// CHECK:STDOUT: %.4: type = struct_type {.: %.3} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -192,7 +192,7 @@ fn AbstractWithDefinition.G() { // CHECK:STDOUT: class @AbstractWithDefinition { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc92: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc92: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AbstractWithDefinition diff --git a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon index e4f4b0ab0788..becbd7e426b7 100644 --- a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon +++ b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon @@ -22,7 +22,7 @@ fn C.F() {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_redefinition.carbon b/toolchain/check/testdata/class/fail_redefinition.carbon index 50563556b20c..2dbca48c6f27 100644 --- a/toolchain/check/testdata/class/fail_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_redefinition.carbon @@ -47,15 +47,15 @@ fn Class.I() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %H.type.1: type = fn_type @H.1 [template] // CHECK:STDOUT: %H.1: %H.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.1: type = fn_type @I.1 [template] // CHECK:STDOUT: %I.1: %I.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = class_type @.1 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] @@ -80,7 +80,7 @@ fn Class.I() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} -// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.4] {} {} +// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} // CHECK:STDOUT: %H.decl: %H.type.1 = fn_decl @H.1 [template = constants.%H.1] {} {} @@ -91,7 +91,7 @@ fn Class.I() {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %H.decl: %H.type.1 = fn_decl @H.1 [template = constants.%H.1] {} {} // CHECK:STDOUT: %I.decl: %I.type.1 = fn_decl @I.1 [template = constants.%I.1] {} {} -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -105,10 +105,10 @@ fn Class.I() {} // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] {} {} // CHECK:STDOUT: %H.decl: %H.type.2 = fn_decl @H.2 [template = constants.%H.2] {} {} // CHECK:STDOUT: %I.decl: %I.type.2 = fn_decl @I.2 [template = constants.%I.2] {} {} -// CHECK:STDOUT: %.loc28: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc28: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.4 +// CHECK:STDOUT: .Self = constants.%.3 // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: .I = %I.decl diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index 3263bd781fdf..4e5abbbe966d 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -26,13 +26,13 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -77,7 +77,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -88,7 +88,7 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: return %.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index 17cee7e6cd58..77e602b4a8e3 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -60,13 +60,13 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %WrongSelf: type = class_type @WrongSelf [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -81,14 +81,14 @@ fn CallWrongSelf(ws: WrongSelf) { // 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: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%Class) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%Class) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -99,7 +99,7 @@ fn CallWrongSelf(ws: WrongSelf) { // 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 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // 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 @@ -150,8 +150,8 @@ fn CallWrongSelf(ws: WrongSelf) { // 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.%.5)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -178,7 +178,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %return.param.loc18: ref %Class = out_param runtime_param0 // CHECK:STDOUT: %.loc18: ref %Class = return_slot %return.param.loc18 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -195,7 +195,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc43: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc43: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%WrongSelf @@ -225,7 +225,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %F.ref: %F.type.2 = name_ref F, @WrongSelf.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc55_5: = bound_method %ws.ref, %F.ref // CHECK:STDOUT: %.loc55_3: %Class = converted %ws.ref, [template = ] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc55_5() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc55_5() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,7 +267,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_self_param.carbon b/toolchain/check/testdata/class/fail_self_param.carbon index 396c5f644b6d..69cfeb3b9d12 100644 --- a/toolchain/check/testdata/class/fail_self_param.carbon +++ b/toolchain/check/testdata/class/fail_self_param.carbon @@ -20,12 +20,12 @@ var v: C(0); // CHECK:STDOUT: %x: = bind_symbolic_name x, 0 [symbolic] // CHECK:STDOUT: %x.patt: = symbolic_binding_pattern x, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%x) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,7 +51,7 @@ var v: C(0); // CHECK:STDOUT: %x.loc14_22.1: = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc14_22.2 (constants.%x)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc15: i32 = int_value 0 [template = constants.%.4] +// CHECK:STDOUT: %.loc15: i32 = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: } @@ -63,7 +63,7 @@ var v: C(0); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 diff --git a/toolchain/check/testdata/class/fail_self_type_member.carbon b/toolchain/check/testdata/class/fail_self_type_member.carbon index 1af5e8683a5f..40e98df5b7f6 100644 --- a/toolchain/check/testdata/class/fail_self_type_member.carbon +++ b/toolchain/check/testdata/class/fail_self_type_member.carbon @@ -30,16 +30,16 @@ fn F() -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class, bool [template] -// CHECK:STDOUT: %.3: type = struct_type {.b: bool} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, bool [template] +// CHECK:STDOUT: %.2: type = struct_type {.b: bool} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: bool = bool_literal true [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.6) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: bool = bool_literal true [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} @@ -48,8 +48,8 @@ fn F() -> bool { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_10.2: type = converted %bool.make_type, %.loc12_10.1 [template = bool] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_todo_local_class.carbon b/toolchain/check/testdata/class/fail_todo_local_class.carbon index 3f578f3fcc0f..264227a379e2 100644 --- a/toolchain/check/testdata/class/fail_todo_local_class.carbon +++ b/toolchain/check/testdata/class/fail_todo_local_class.carbon @@ -31,17 +31,17 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc27: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc27: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index 95291194926f..64bfe2d6f10d 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -31,16 +31,16 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.field: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {.field: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,7 +76,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_14.2: type = converted %int.make_type_32, %.loc12_14.1 [template = i32] -// CHECK:STDOUT: %.loc12_12: %.2 = field_decl field, element0 [template] +// CHECK:STDOUT: %.loc12_12: %.1 = field_decl field, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param0 @@ -87,7 +87,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -99,14 +99,14 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %field.ref: %.2 = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %.1 = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %field.ref: %.2 = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %.1 = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_unknown_member.carbon b/toolchain/check/testdata/class/fail_unknown_member.carbon index 2ec329ded6ea..84399264eeb6 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -25,14 +25,14 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,8 +73,8 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 1db6b66c89cb..531097e88ef4 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -26,16 +26,16 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.j: i32, .k: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.j: i32, .k: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,12 +62,12 @@ fn Run() { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl j, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl j, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl k, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl k, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -83,14 +83,14 @@ fn Run() { // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref.loc18: ref %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc18: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc18: %.1 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc18_4: ref i32 = class_element_access %c.ref.loc18, element0 -// CHECK:STDOUT: %.loc18_9: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_9: i32 = int_value 1 [template = constants.%.5] // CHECK:STDOUT: assign %.loc18_4, %.loc18_9 // CHECK:STDOUT: %c.ref.loc19: ref %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc19: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc19: %.1 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] // CHECK:STDOUT: %.loc19_4: ref i32 = class_element_access %c.ref.loc19, element1 -// CHECK:STDOUT: %.loc19_9: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_9: i32 = int_value 2 [template = constants.%.6] // CHECK:STDOUT: assign %.loc19_4, %.loc19_9 // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_11.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] @@ -98,7 +98,7 @@ fn Run() { // CHECK:STDOUT: %cj.var: ref i32 = var cj // CHECK:STDOUT: %cj: ref i32 = bind_name cj, %cj.var // CHECK:STDOUT: %c.ref.loc20: ref %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc20: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc20: %.1 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc20_18.1: ref i32 = class_element_access %c.ref.loc20, element0 // CHECK:STDOUT: %.loc20_18.2: i32 = bind_value %.loc20_18.1 // CHECK:STDOUT: assign %cj.var, %.loc20_18.2 @@ -108,7 +108,7 @@ fn Run() { // CHECK:STDOUT: %ck.var: ref i32 = var ck // CHECK:STDOUT: %ck: ref i32 = bind_name ck, %ck.var // CHECK:STDOUT: %c.ref.loc21: ref %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc21: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc21: %.1 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] // CHECK:STDOUT: %.loc21_18.1: ref i32 = class_element_access %c.ref.loc21, element1 // CHECK:STDOUT: %.loc21_18.2: i32 = bind_value %.loc21_18.1 // CHECK:STDOUT: assign %ck.var, %.loc21_18.2 diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 0cc70207bd91..88f5e06dc71d 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -27,16 +27,16 @@ fn Test() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.j: i32, .k: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.j: i32, .k: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,12 +63,12 @@ fn Test() { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl j, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl j, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl k, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl k, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -84,14 +84,14 @@ fn Test() { // CHECK:STDOUT: %cv.var: ref %Class = var cv // CHECK:STDOUT: %cv: ref %Class = bind_name cv, %cv.var // CHECK:STDOUT: %cv.ref.loc18: ref %Class = name_ref cv, %cv -// CHECK:STDOUT: %j.ref.loc18: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc18: %.1 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc18_5: ref i32 = class_element_access %cv.ref.loc18, element0 -// CHECK:STDOUT: %.loc18_10: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_10: i32 = int_value 1 [template = constants.%.5] // CHECK:STDOUT: assign %.loc18_5, %.loc18_10 // CHECK:STDOUT: %cv.ref.loc19: ref %Class = name_ref cv, %cv -// CHECK:STDOUT: %k.ref.loc19: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc19: %.1 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] // CHECK:STDOUT: %.loc19_5: ref i32 = class_element_access %cv.ref.loc19, element1 -// CHECK:STDOUT: %.loc19_10: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_10: i32 = int_value 2 [template = constants.%.6] // CHECK:STDOUT: assign %.loc19_5, %.loc19_10 // CHECK:STDOUT: %Class.ref.loc20: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %cv.ref.loc20: ref %Class = name_ref cv, %cv @@ -103,7 +103,7 @@ fn Test() { // CHECK:STDOUT: %cj.var: ref i32 = var cj // CHECK:STDOUT: %cj: ref i32 = bind_name cj, %cj.var // CHECK:STDOUT: %c.ref.loc21: %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc21: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc21: %.1 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc21_18.1: ref i32 = class_element_access %c.ref.loc21, element0 // CHECK:STDOUT: %.loc21_18.2: i32 = bind_value %.loc21_18.1 // CHECK:STDOUT: assign %cj.var, %.loc21_18.2 @@ -113,7 +113,7 @@ fn Test() { // CHECK:STDOUT: %ck.var: ref i32 = var ck // CHECK:STDOUT: %ck: ref i32 = bind_name ck, %ck.var // CHECK:STDOUT: %c.ref.loc22: %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc22: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc22: %.1 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] // CHECK:STDOUT: %.loc22_18.1: ref i32 = class_element_access %c.ref.loc22, element1 // CHECK:STDOUT: %.loc22_18.2: i32 = bind_value %.loc22_18.1 // CHECK:STDOUT: assign %ck.var, %.loc22_18.2 diff --git a/toolchain/check/testdata/class/forward_declared.carbon b/toolchain/check/testdata/class/forward_declared.carbon index 7ecb79faefb6..8e13b6b776e0 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -18,7 +18,7 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type %Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic.carbon b/toolchain/check/testdata/class/generic.carbon index 3c790bfb0fcc..d7e56e5026f7 100644 --- a/toolchain/check/testdata/class/generic.carbon +++ b/toolchain/check/testdata/class/generic.carbon @@ -14,7 +14,7 @@ class C[](); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C [template] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index 18fc13f3e18b..66ec0faaf0d5 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -29,19 +29,19 @@ class Declaration(T:! type); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %Class.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr, @Class(%T) [symbolic] // CHECK:STDOUT: %GetAddr: %GetAddr.type = struct_value () [symbolic] // CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue, @Class(%T) [symbolic] // CHECK:STDOUT: %GetValue: %GetValue.type = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {.k: %T} [symbolic] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [symbolic] +// CHECK:STDOUT: %.3: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {.k: %T} [symbolic] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Declaration.type: type = generic_class_type @Declaration [template] // CHECK:STDOUT: %Declaration.1: %Declaration.type = struct_value () [template] @@ -88,27 +88,27 @@ class Declaration(T:! type); // CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue, @Class(%T.loc11_13.2) [symbolic = %GetValue.type (constants.%GetValue.type)] // CHECK:STDOUT: %GetValue: @Class.%GetValue.type (%GetValue.type) = struct_value () [symbolic = %GetValue (constants.%GetValue)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc21_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc21_8.2 (constants.%.4)] -// CHECK:STDOUT: %.loc22_1.2: type = struct_type {.k: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc22_1.2 (constants.%.5)] -// CHECK:STDOUT: %.loc22_1.3: = complete_type_witness @Class.%.loc22_1.2 (%.5) [symbolic = %.loc22_1.3 (constants.%.6)] +// CHECK:STDOUT: %.loc21_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc21_8.2 (constants.%.3)] +// CHECK:STDOUT: %.loc22_1.2: type = struct_type {.k: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc22_1.2 (constants.%.4)] +// CHECK:STDOUT: %.loc22_1.3: = complete_type_witness @Class.%.loc22_1.2 (%.4) [symbolic = %.loc22_1.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GetAddr.decl: @Class.%GetAddr.type (%GetAddr.type) = fn_decl @GetAddr [symbolic = @Class.%GetAddr (constants.%GetAddr)] { -// CHECK:STDOUT: %self.patt: @GetAddr.%.loc12_29.1 (%.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @GetAddr.%.loc12_29.1 (%.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @GetAddr.%.loc12_29.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @GetAddr.%.loc12_29.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc12_14: auto = addr_pattern %self.param_patt -// CHECK:STDOUT: %return.patt: @GetAddr.%.loc12_38.1 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GetAddr.%.loc12_38.1 (%.3) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @GetAddr.%.loc12_38.1 (%.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GetAddr.%.loc12_38.1 (%.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_25 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_29.2: type = ptr_type %Class.2 [symbolic = %.loc12_29.1 (constants.%.2)] +// CHECK:STDOUT: %.loc12_29.2: type = ptr_type %Class.2 [symbolic = %.loc12_29.1 (constants.%.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc12_38.2: type = ptr_type %T [symbolic = %.loc12_38.1 (constants.%.3)] -// CHECK:STDOUT: %self.param: @GetAddr.%.loc12_29.1 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @GetAddr.%.loc12_29.1 (%.2) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @GetAddr.%.loc12_38.1 (%.3) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @GetAddr.%.loc12_38.1 (%.3) = return_slot %return.param +// CHECK:STDOUT: %.loc12_38.2: type = ptr_type %T [symbolic = %.loc12_38.1 (constants.%.2)] +// CHECK:STDOUT: %self.param: @GetAddr.%.loc12_29.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @GetAddr.%.loc12_29.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @GetAddr.%.loc12_38.1 (%.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @GetAddr.%.loc12_38.1 (%.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %GetValue.decl: @Class.%GetValue.type (%GetValue.type) = fn_decl @GetValue [symbolic = @Class.%GetValue (constants.%GetValue)] { // CHECK:STDOUT: %self.patt: @GetValue.%Class (%Class.2) = binding_pattern self @@ -125,8 +125,8 @@ class Declaration(T:! type); // CHECK:STDOUT: %return: ref @GetValue.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc21_8.1: @Class.%.loc21_8.2 (%.4) = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc22_1.1: = complete_type_witness %.5 [symbolic = %.loc22_1.3 (constants.%.6)] +// CHECK:STDOUT: %.loc21_8.1: @Class.%.loc21_8.2 (%.3) = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc22_1.1: = complete_type_witness %.4 [symbolic = %.loc22_1.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -146,19 +146,19 @@ class Declaration(T:! type); // CHECK:STDOUT: generic fn @GetAddr(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_29.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.loc12_29.1 (constants.%.2)] -// CHECK:STDOUT: %.loc12_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %.loc12_38.1 (constants.%.3)] +// CHECK:STDOUT: %.loc12_29.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.loc12_29.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %.loc12_38.1 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_17.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.loc13_17.3 (constants.%.4)] +// CHECK:STDOUT: %.loc13_17.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.loc13_17.3 (constants.%.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%.loc12_29.1 (%.2)]() -> @GetAddr.%.loc12_38.1 (%.3) { +// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%.loc12_29.1 (%.1)]() -> @GetAddr.%.loc12_38.1 (%.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @GetAddr.%.loc12_29.1 (%.2) = name_ref self, %self +// CHECK:STDOUT: %self.ref: @GetAddr.%.loc12_29.1 (%.1) = name_ref self, %self // CHECK:STDOUT: %.loc13_17.1: ref @GetAddr.%Class (%Class.2) = deref %self.ref -// CHECK:STDOUT: %k.ref: @GetAddr.%.loc13_17.3 (%.4) = name_ref k, @Class.%.loc21_8.1 [template = @Class.%.loc21_8.1] +// CHECK:STDOUT: %k.ref: @GetAddr.%.loc13_17.3 (%.3) = name_ref k, @Class.%.loc21_8.1 [template = @Class.%.loc21_8.1] // CHECK:STDOUT: %.loc13_17.2: ref @GetAddr.%T (%T) = class_element_access %.loc13_17.1, element0 -// CHECK:STDOUT: %.loc13_12: @GetAddr.%.loc12_38.1 (%.3) = addr_of %.loc13_17.2 +// CHECK:STDOUT: %.loc13_12: @GetAddr.%.loc12_38.1 (%.2) = addr_of %.loc13_17.2 // CHECK:STDOUT: return %.loc13_12 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -168,12 +168,12 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc18_16.3: type = unbound_element_type @GetValue.%Class (%Class.2), @GetValue.%T (%T) [symbolic = %.loc18_16.3 (constants.%.4)] +// CHECK:STDOUT: %.loc18_16.3: type = unbound_element_type @GetValue.%Class (%Class.2), @GetValue.%T (%T) [symbolic = %.loc18_16.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self.param_patt: @GetValue.%Class (%Class.2)]() -> @GetValue.%T (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @GetValue.%Class (%Class.2) = name_ref self, %self -// CHECK:STDOUT: %k.ref: @GetValue.%.loc18_16.3 (%.4) = name_ref k, @Class.%.loc21_8.1 [template = @Class.%.loc21_8.1] +// CHECK:STDOUT: %k.ref: @GetValue.%.loc18_16.3 (%.3) = name_ref k, @Class.%.loc21_8.1 [template = @Class.%.loc21_8.1] // CHECK:STDOUT: %.loc18_16.1: ref @GetValue.%T (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc18_16.2: @GetValue.%T (%T) = bind_value %.loc18_16.1 // CHECK:STDOUT: return %.loc18_16.2 @@ -190,9 +190,9 @@ class Declaration(T:! type); // CHECK:STDOUT: %GetValue.type => constants.%GetValue.type // CHECK:STDOUT: %GetValue => constants.%GetValue // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc21_8.2 => constants.%.4 -// CHECK:STDOUT: %.loc22_1.2 => constants.%.5 -// CHECK:STDOUT: %.loc22_1.3 => constants.%.6 +// CHECK:STDOUT: %.loc21_8.2 => constants.%.3 +// CHECK:STDOUT: %.loc22_1.2 => constants.%.4 +// CHECK:STDOUT: %.loc22_1.3 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@GetAddr.%T) { @@ -203,8 +203,8 @@ class Declaration(T:! type); // CHECK:STDOUT: specific @GetAddr(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc12_29.1 => constants.%.2 -// CHECK:STDOUT: %.loc12_38.1 => constants.%.3 +// CHECK:STDOUT: %.loc12_29.1 => constants.%.1 +// CHECK:STDOUT: %.loc12_38.1 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@GetValue.%T) { diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index cae685771ce3..711179104de5 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -91,21 +91,21 @@ class Outer(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: %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: %N: i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type i32 [template] -// CHECK:STDOUT: %.5: i32 = int_value 5 [template] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%.4, %.5) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] -// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%.1, %.7) [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.4: i32 = int_value 5 [template] +// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%.3, %.4) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] +// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%empty_tuple.type, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -143,16 +143,16 @@ class Outer(T:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_32, %.loc6_17.1 [template = i32] -// CHECK:STDOUT: %.loc6_17.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_20: i32 = int_value 5 [template = constants.%.5] -// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.4, constants.%.5) [template = constants.%Class.3] +// CHECK:STDOUT: %.loc6_17.3: type = ptr_type i32 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_20: i32 = int_value 5 [template = constants.%.4] +// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.3, constants.%.4) [template = constants.%Class.3] // CHECK:STDOUT: %a.var: ref %Class.3 = var a // CHECK:STDOUT: %a: ref %Class.3 = bind_name a, %a.var // CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc9_15: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_18: i32 = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc9_13: type = converted %.loc9_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%.1, constants.%.7) [template = constants.%Class.4] +// CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_18: i32 = int_value 0 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_13: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%.6) [template = constants.%Class.4] // CHECK:STDOUT: %b.var: ref %Class.4 = var b // CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var // CHECK:STDOUT: } @@ -166,7 +166,7 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -182,20 +182,20 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%.4, constants.%.5) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.4 -// CHECK:STDOUT: %N.loc4_23.2 => constants.%.5 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.5 +// CHECK:STDOUT: specific @Class(constants.%.3, constants.%.4) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%.4 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%.1, constants.%.7) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.1 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.1 -// CHECK:STDOUT: %N.loc4_23.2 => constants.%.7 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.7 +// CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%.6) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %N.loc4_23.2 => constants.%.6 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -206,16 +206,16 @@ class Outer(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: %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: %N: i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -252,7 +252,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32, %.loc13_17.1 [template = i32] -// CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -266,7 +266,7 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -288,18 +288,18 @@ class Outer(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: %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: %N: i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type i32 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -336,9 +336,9 @@ class Outer(T:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32, %.loc13_17.1 [template = i32] -// CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -352,7 +352,7 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -374,17 +374,17 @@ class Outer(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: %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: %N: i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T, %N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 5 [template] -// CHECK:STDOUT: %.5: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 5 [template] +// CHECK:STDOUT: %.4: type = ptr_type i32 [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] @@ -394,14 +394,14 @@ class Outer(T:! type) { // 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: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = 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: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -414,7 +414,7 @@ class Outer(T:! type) { // 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 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // 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 @@ -442,11 +442,11 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.loc4_23.1: i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc15_14: i32 = int_value 5 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_14: i32 = int_value 5 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_32, %.loc15_20.1 [template = i32] -// CHECK:STDOUT: %.loc15_20.3: type = ptr_type i32 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_20.3: type = ptr_type i32 [template = constants.%.4] // CHECK:STDOUT: %.loc15_13: type = converted %.loc15_14, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var @@ -461,8 +461,8 @@ class Outer(T:! type) { // 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.%.6)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -481,7 +481,7 @@ class Outer(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_33: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -535,8 +535,8 @@ class Outer(T:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_in_nested_return_type.carbon @@ -545,7 +545,7 @@ class Outer(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: %Outer.type: type = generic_class_type @Outer [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Outer.1: %Outer.type = struct_value () [template] // CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -563,9 +563,9 @@ class Outer(T:! type) { // CHECK:STDOUT: %C.1: %C.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %D.type.1: type = fn_type @D, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %D.1: %D.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %Outer.2 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%U) [symbolic] // CHECK:STDOUT: %Inner.4: %Inner.type.2 = struct_value () [symbolic] @@ -620,7 +620,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc3_15.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc3_15.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer.2 @@ -686,7 +686,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %return.param: ref @D.%Inner.loc13_20.1 (%Inner.2) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @D.%Inner.loc13_20.1 (%Inner.2) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner.2 @@ -706,7 +706,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @A.%Outer.loc4_20.1 (%Outer.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_15.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc5_15.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc5_15.2: init @A.%Outer.loc4_20.1 (%Outer.2) = class_init (), %return [symbolic = %struct (constants.%struct.1)] // CHECK:STDOUT: %.loc5_16: init @A.%Outer.loc4_20.1 (%Outer.2) = converted %.loc5_15.1, %.loc5_15.2 [symbolic = %struct (constants.%struct.1)] // CHECK:STDOUT: return %.loc5_16 to %return @@ -722,7 +722,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @B.%Outer.loc7_20.1 (%Outer.3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_15.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc8_15.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc8_15.2: init @B.%Outer.loc7_20.1 (%Outer.3) = class_init (), %return [symbolic = %struct (constants.%struct.2)] // CHECK:STDOUT: %.loc8_16: init @B.%Outer.loc7_20.1 (%Outer.3) = converted %.loc8_15.1, %.loc8_15.2 [symbolic = %struct (constants.%struct.2)] // CHECK:STDOUT: return %.loc8_16 to %return @@ -740,7 +740,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @C.%Inner.loc10_20.1 (%Inner.3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_15.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc11_15.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.loc10_20.1 (%Inner.3) = class_init (), %return [symbolic = %struct (constants.%struct.3)] // CHECK:STDOUT: %.loc11_16: init @C.%Inner.loc10_20.1 (%Inner.3) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %struct (constants.%struct.3)] // CHECK:STDOUT: return %.loc11_16 to %return @@ -759,7 +759,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @D.%Inner.loc13_20.1 (%Inner.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_15.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc14_15.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.loc13_20.1 (%Inner.2) = class_init (), %return [symbolic = %struct (constants.%struct.4)] // CHECK:STDOUT: %.loc14_16: init @D.%Inner.loc13_20.1 (%Inner.2) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %struct (constants.%struct.4)] // CHECK:STDOUT: return %.loc14_16 to %return diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 6c2102ec5d34..00ba8bc319ce 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -30,34 +30,34 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Class.3, i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Class.3, i32 [template] +// CHECK:STDOUT: %.5: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %.8: type = ptr_type %.2 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%U) [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = unbound_element_type %Class.4, %U [symbolic] -// CHECK:STDOUT: %.11: type = struct_type {.x: %U} [symbolic] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [symbolic] -// CHECK:STDOUT: %.13: type = ptr_type %.11 [symbolic] +// CHECK:STDOUT: %.9: type = unbound_element_type %Class.4, %U [symbolic] +// CHECK:STDOUT: %.10: type = struct_type {.x: %U} [symbolic] +// CHECK:STDOUT: %.11: = complete_type_witness %.10 [symbolic] +// CHECK:STDOUT: %.12: type = ptr_type %.10 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -150,14 +150,14 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.2)] -// CHECK:STDOUT: %.loc13_1.2: type = struct_type {.x: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc13_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc13_1.3: = complete_type_witness @Class.%.loc13_1.2 (%.3) [symbolic = %.loc13_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.1)] +// CHECK:STDOUT: %.loc13_1.2: type = struct_type {.x: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc13_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc13_1.3: = complete_type_witness @Class.%.loc13_1.2 (%.2) [symbolic = %.loc13_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.2) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc13_1.1: = complete_type_witness %.3 [symbolic = %.loc13_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc13_1.1: = complete_type_witness %.2 [symbolic = %.loc13_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -170,7 +170,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: fn @F(%c.param_patt: %Class.3) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] +// CHECK:STDOUT: %x.ref: %.4 = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] // CHECK:STDOUT: %.loc16_11.1: ref i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc16_11.2: i32 = bind_value %.loc16_11.1 // CHECK:STDOUT: return %.loc16_11.2 @@ -182,12 +182,12 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.loc19_24.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_24.2 (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc20_11.3: type = unbound_element_type @G.%Class.loc19_24.2 (%Class.2), @G.%T.loc19_6.2 (%T) [symbolic = %.loc20_11.3 (constants.%.2)] +// CHECK:STDOUT: %.loc20_11.3: type = unbound_element_type @G.%Class.loc19_24.2 (%Class.2), @G.%T.loc19_6.2 (%T) [symbolic = %.loc20_11.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_24.2 (%Class.2)) -> @G.%T.loc19_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: @G.%Class.loc19_24.2 (%Class.2) = name_ref c, %c -// CHECK:STDOUT: %x.ref: @G.%.loc20_11.3 (%.2) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] +// CHECK:STDOUT: %x.ref: @G.%.loc20_11.3 (%.1) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] // CHECK:STDOUT: %.loc20_11.1: ref @G.%T.loc19_6.2 (%T) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc20_11.2: @G.%T.loc19_6.2 (%T) = bind_value %.loc20_11.1 // CHECK:STDOUT: return %.loc20_11.2 @@ -200,12 +200,12 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.loc23_24.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_24.2 (constants.%Class.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc24_11.3: type = unbound_element_type @H.%Class.loc23_24.2 (%Class.4), @H.%U.loc23_6.2 (%U) [symbolic = %.loc24_11.3 (constants.%.10)] +// CHECK:STDOUT: %.loc24_11.3: type = unbound_element_type @H.%Class.loc23_24.2 (%Class.4), @H.%U.loc23_6.2 (%U) [symbolic = %.loc24_11.3 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_24.2 (%Class.4)) -> @H.%U.loc23_6.2 (%U) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: @H.%Class.loc23_24.2 (%Class.4) = name_ref c, %c -// CHECK:STDOUT: %x.ref: @H.%.loc24_11.3 (%.10) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] +// CHECK:STDOUT: %x.ref: @H.%.loc24_11.3 (%.9) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] // CHECK:STDOUT: %.loc24_11.1: ref @H.%U.loc23_6.2 (%U) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc24_11.2: @H.%U.loc23_6.2 (%U) = bind_value %.loc24_11.1 // CHECK:STDOUT: return %.loc24_11.2 @@ -218,9 +218,9 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.2 -// CHECK:STDOUT: %.loc13_1.2 => constants.%.3 -// CHECK:STDOUT: %.loc13_1.3 => constants.%.4 +// CHECK:STDOUT: %.loc12_8.2 => constants.%.1 +// CHECK:STDOUT: %.loc13_1.2 => constants.%.2 +// CHECK:STDOUT: %.loc13_1.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@Class.%T.loc11_13.2) { @@ -234,9 +234,9 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.5 -// CHECK:STDOUT: %.loc13_1.2 => constants.%.6 -// CHECK:STDOUT: %.loc13_1.3 => constants.%.7 +// CHECK:STDOUT: %.loc12_8.2 => constants.%.4 +// CHECK:STDOUT: %.loc13_1.2 => constants.%.5 +// CHECK:STDOUT: %.loc13_1.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) { @@ -256,9 +256,9 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.4 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.10 -// CHECK:STDOUT: %.loc13_1.2 => constants.%.11 -// CHECK:STDOUT: %.loc13_1.3 => constants.%.12 +// CHECK:STDOUT: %.loc12_8.2 => constants.%.9 +// CHECK:STDOUT: %.loc13_1.2 => constants.%.10 +// CHECK:STDOUT: %.loc13_1.3 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) { diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 488daf48cbf1..5cbc9e316b25 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -90,7 +90,7 @@ class Class(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] @@ -99,12 +99,12 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %CompleteClass.2, i32 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %CompleteClass.2, i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: i32 = int_value 0 [template] // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -168,7 +168,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T.loc6_21.2) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.loc7_8.2 (constants.%.2)] +// CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.loc7_8.2 (constants.%.1)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T.loc6_21.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -176,7 +176,7 @@ class Class(U:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32, %.loc7_10.1 [template = i32] -// CHECK:STDOUT: %.loc7_8.1: @CompleteClass.%.loc7_8.2 (%.2) = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc7_8.1: @CompleteClass.%.loc7_8.2 (%.1) = field_decl n, element0 [template] // CHECK:STDOUT: %F.decl: @CompleteClass.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @CompleteClass.%F (constants.%F.1)] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param0 @@ -187,7 +187,7 @@ class Class(U:! type) { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%CompleteClass.2 @@ -203,7 +203,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_26: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_26: i32 = int_value 0 [template = constants.%.4] // CHECK:STDOUT: return %.loc8_26 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -221,7 +221,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.loc7_8.2 => constants.%.2 +// CHECK:STDOUT: %.loc7_8.2 => constants.%.1 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -244,19 +244,19 @@ class Class(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] -// CHECK:STDOUT: %.7: type = unbound_element_type %CompleteClass.2, i32 [symbolic] +// CHECK:STDOUT: %.6: type = unbound_element_type %CompleteClass.2, i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] @@ -264,12 +264,12 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %CompleteClass.3, i32 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %CompleteClass.3, i32 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @CompleteClass(i32) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.10) [template] +// CHECK:STDOUT: %.8: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.9: i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.9) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -324,14 +324,14 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.3) [symbolic = %.loc6_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.1)] +// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.2) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.3 [symbolic = %.loc6_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -345,7 +345,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -367,10 +367,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %CompleteClass.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_16: i32 = int_value 1 [template = constants.%.10] -// CHECK:STDOUT: %.loc9_17.1: %.5 = struct_literal (%.loc9_16) +// CHECK:STDOUT: %.loc9_16: i32 = int_value 1 [template = constants.%.9] +// CHECK:STDOUT: %.loc9_17.1: %.4 = struct_literal (%.loc9_16) // CHECK:STDOUT: %.loc9_17.2: ref i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_17.3: init i32 = initialize_from %.loc9_16 to %.loc9_17.2 [template = constants.%.10] +// CHECK:STDOUT: %.loc9_17.3: init i32 = initialize_from %.loc9_16 to %.loc9_17.2 [template = constants.%.9] // CHECK:STDOUT: %.loc9_17.4: init %CompleteClass.3 = class_init (%.loc9_17.3), %return [template = constants.%struct] // CHECK:STDOUT: %.loc9_18: init %CompleteClass.3 = converted %.loc9_17.1, %.loc9_17.4 [template = constants.%struct] // CHECK:STDOUT: return %.loc9_18 to %return @@ -392,7 +392,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.6 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -410,7 +410,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.7 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 // CHECK:STDOUT: } @@ -419,28 +419,28 @@ class Class(U:! type) { // 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: %UseMethod.type: type = fn_type @UseMethod [template] // CHECK:STDOUT: %UseMethod: %UseMethod.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, i32 [symbolic] +// CHECK:STDOUT: %.3: type = unbound_element_type %CompleteClass.2, i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(i32) [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %CompleteClass.3, i32 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.3, i32 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(i32) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %F.2, @F.1(i32) [template] +// CHECK:STDOUT: %.6: = specific_function %F.2, @F.1(i32) [template] // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [template] // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [template] // CHECK:STDOUT: } @@ -456,7 +456,7 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+26, unloaded -// CHECK:STDOUT: %import_ref.6: @CompleteClass.%.1 (%.4) = import_ref Main//foo, inst+38, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.6: @CompleteClass.%.1 (%.3) = import_ref Main//foo, inst+38, loaded [template = %.1] // CHECK:STDOUT: %import_ref.7: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, inst+46, loaded [symbolic = @CompleteClass.%F (constants.%F.1)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -499,7 +499,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.3)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -529,7 +529,7 @@ class Class(U:! type) { // CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v // CHECK:STDOUT: %.loc7_11.1: %F.type.2 = specific_constant imports.%import_ref.7, @CompleteClass(i32) [template = constants.%F.2] // CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11.1 [template = constants.%F.2] -// CHECK:STDOUT: %.loc7_11.2: = specific_function %F.ref.loc7, @F.1(i32) [template = constants.%.7] +// CHECK:STDOUT: %.loc7_11.2: = specific_function %F.ref.loc7, @F.1(i32) [template = constants.%.6] // CHECK:STDOUT: %F.call.loc7: init i32 = call %.loc7_11.2() // CHECK:STDOUT: %.loc7_15.1: i32 = value_of_initializer %F.call.loc7 // CHECK:STDOUT: %.loc7_15.2: i32 = converted %F.call.loc7, %.loc7_15.1 @@ -558,7 +558,7 @@ class Class(U:! type) { // CHECK:STDOUT: %F.call: init %CompleteClass.3 = call %F.ref() to %.loc11_7 // CHECK:STDOUT: assign %v.var, %F.call // CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, imports.%import_ref.6 [template = imports.%.1] +// CHECK:STDOUT: %n.ref: %.4 = name_ref n, imports.%import_ref.6 [template = imports.%.1] // CHECK:STDOUT: %.loc12_11.1: ref i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc12_11.2: i32 = bind_value %.loc12_11.1 // CHECK:STDOUT: return %.loc12_11.2 @@ -570,7 +570,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %.1 => constants.%.3 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -588,7 +588,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.1 => constants.%.4 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 // CHECK:STDOUT: } @@ -601,30 +601,30 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, i32 [symbolic] +// CHECK:STDOUT: %.3: type = unbound_element_type %CompleteClass.2, i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type i32 [template] -// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%.5) [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %CompleteClass.3, i32 [template] -// CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%.5) [template] +// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%.4) [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %CompleteClass.3, i32 [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%.4) [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %CompleteClass.4: type = class_type @CompleteClass, @CompleteClass(i32) [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %CompleteClass.4, i32 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %CompleteClass.4, i32 [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @CompleteClass(i32) [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -636,14 +636,14 @@ class Class(U:! type) { // 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: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.12 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%CompleteClass.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%CompleteClass.3) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [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.12 [template] -// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -662,7 +662,7 @@ class Class(U:! type) { // CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.8: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] +// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -690,8 +690,8 @@ class Class(U:! type) { // 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.%.9)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -707,7 +707,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), i32 [symbolic = %.1 (constants.%.3)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -725,8 +725,8 @@ class Class(U:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_32, %.loc14_27.1 [template = i32] -// CHECK:STDOUT: %.loc14_27.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%.5) [template = constants.%CompleteClass.3] +// CHECK:STDOUT: %.loc14_27.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%.4) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] @@ -762,7 +762,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %.1 => constants.%.3 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -774,13 +774,13 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(constants.%.5) { -// CHECK:STDOUT: %T => constants.%.5 -// CHECK:STDOUT: %T.patt => constants.%.5 +// CHECK:STDOUT: specific @CompleteClass(constants.%.4) { +// CHECK:STDOUT: %T => constants.%.4 +// CHECK:STDOUT: %T.patt => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 // CHECK:STDOUT: } @@ -791,7 +791,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.4 -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.7 // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 // CHECK:STDOUT: } @@ -826,8 +826,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_foo.impl.carbon @@ -836,14 +836,14 @@ class Class(U:! type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%U) [symbolic] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%U) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -866,7 +866,7 @@ class Class(U:! type) { // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %U.patt.loc12_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc12_13.1, runtime_param [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -894,7 +894,7 @@ class Class(U:! type) { // CHECK:STDOUT: %.loc17: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.2 // CHECK:STDOUT: .x = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index b5c636892f97..8b5b99cb9bbc 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -48,25 +48,25 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.k: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.k: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %InitFromStructGeneric.type: type = fn_type @InitFromStructGeneric [template] // CHECK:STDOUT: %InitFromStructGeneric: %InitFromStructGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %InitFromStructSpecific.type: type = fn_type @InitFromStructSpecific [template] // CHECK:STDOUT: %InitFromStructSpecific: %InitFromStructSpecific.type = struct_value () [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(i32) [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Class.3, i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.k: i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Class.3, i32 [template] +// CHECK:STDOUT: %.6: type = struct_type {.k: i32} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -135,14 +135,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc5_8.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.k: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.3) [symbolic = %.loc6_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc5_8.2 (constants.%.1)] +// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.k: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc6_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.2) [symbolic = %.loc6_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.2) = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.3 [symbolic = %.loc6_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.1) = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.2 [symbolic = %.loc6_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -156,8 +156,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class.loc9_15.2: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class.loc9_15.2 (constants.%Class.2)] -// CHECK:STDOUT: %.loc9_28.5: type = struct_type {.k: @InitFromStructGeneric.%T.loc8_26.2 (%T)} [symbolic = %.loc9_28.5 (constants.%.3)] -// CHECK:STDOUT: %.loc10_11.3: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %.loc10_11.3 (constants.%.2)] +// CHECK:STDOUT: %.loc9_28.5: type = struct_type {.k: @InitFromStructGeneric.%T.loc8_26.2 (%T)} [symbolic = %.loc9_28.5 (constants.%.2)] +// CHECK:STDOUT: %.loc10_11.3: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %.loc10_11.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @InitFromStructGeneric.%T.loc8_26.2 (%T)) -> @InitFromStructGeneric.%T.loc8_26.2 (%T) { // CHECK:STDOUT: !entry: @@ -167,14 +167,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = var v // CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = bind_name v, %v.var // CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.loc8_26.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc9_28.1: @InitFromStructGeneric.%.loc9_28.5 (%.3) = struct_literal (%x.ref) +// CHECK:STDOUT: %.loc9_28.1: @InitFromStructGeneric.%.loc9_28.5 (%.2) = struct_literal (%x.ref) // CHECK:STDOUT: %.loc9_28.2: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc9_28.3: init @InitFromStructGeneric.%T.loc8_26.2 (%T) = initialize_from %x.ref to %.loc9_28.2 // CHECK:STDOUT: %.loc9_28.4: init @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = class_init (%.loc9_28.3), %v.var // CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = converted %.loc9_28.1, %.loc9_28.4 // CHECK:STDOUT: assign %v.var, %.loc9_29 // CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = name_ref v, %v -// CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%.loc10_11.3 (%.2) = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] +// CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%.loc10_11.3 (%.1) = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] // CHECK:STDOUT: %.loc10_11.1: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc10_11.2: @InitFromStructGeneric.%T.loc8_26.2 (%T) = bind_value %.loc10_11.1 // CHECK:STDOUT: return %.loc10_11.2 @@ -193,14 +193,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %v.var: ref %Class.3 = var v // CHECK:STDOUT: %v: ref %Class.3 = bind_name v, %v.var // CHECK:STDOUT: %x.ref: i32 = name_ref x, %x -// CHECK:STDOUT: %.loc14_30.1: %.7 = struct_literal (%x.ref) +// CHECK:STDOUT: %.loc14_30.1: %.6 = struct_literal (%x.ref) // CHECK:STDOUT: %.loc14_30.2: ref i32 = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc14_30.3: init i32 = initialize_from %x.ref to %.loc14_30.2 // CHECK:STDOUT: %.loc14_30.4: init %Class.3 = class_init (%.loc14_30.3), %v.var // CHECK:STDOUT: %.loc14_31: init %Class.3 = converted %.loc14_30.1, %.loc14_30.4 // CHECK:STDOUT: assign %v.var, %.loc14_31 // CHECK:STDOUT: %v.ref: ref %Class.3 = name_ref v, %v -// CHECK:STDOUT: %k.ref: %.6 = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] +// CHECK:STDOUT: %k.ref: %.5 = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] // CHECK:STDOUT: %.loc15_11.1: ref i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc15_11.2: i32 = bind_value %.loc15_11.1 // CHECK:STDOUT: return %.loc15_11.2 @@ -212,9 +212,9 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.2 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.4 +// CHECK:STDOUT: %.loc5_8.2 => constants.%.1 +// CHECK:STDOUT: %.loc6_1.2 => constants.%.2 +// CHECK:STDOUT: %.loc6_1.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@Class.%T.loc4_13.2) { @@ -238,9 +238,9 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc5_8.2 => constants.%.6 -// CHECK:STDOUT: %.loc6_1.2 => constants.%.7 -// CHECK:STDOUT: %.loc6_1.3 => constants.%.8 +// CHECK:STDOUT: %.loc5_8.2 => constants.%.5 +// CHECK:STDOUT: %.loc6_1.2 => constants.%.6 +// CHECK:STDOUT: %.loc6_1.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adapt.carbon @@ -249,10 +249,10 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Adapt.type: type = generic_class_type @Adapt [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Adapt.1: %Adapt.type = struct_value () [template] // CHECK:STDOUT: %Adapt.2: type = class_type @Adapt, @Adapt(%T) [symbolic] -// CHECK:STDOUT: %.2: = complete_type_witness %T [symbolic] +// CHECK:STDOUT: %.1: = complete_type_witness %T [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %InitFromAdaptedGeneric.type: type = fn_type @InitFromAdaptedGeneric [template] // CHECK:STDOUT: %InitFromAdaptedGeneric: %InitFromAdaptedGeneric.type = struct_value () [template] @@ -261,7 +261,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %InitFromAdaptedSpecific.type: type = fn_type @InitFromAdaptedSpecific [template] // CHECK:STDOUT: %InitFromAdaptedSpecific: %InitFromAdaptedSpecific.type = struct_value () [template] // CHECK:STDOUT: %Adapt.3: type = class_type @Adapt, @Adapt(i32) [template] -// CHECK:STDOUT: %.3: = complete_type_witness i32 [template] +// CHECK:STDOUT: %.2: = complete_type_witness i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -329,12 +329,12 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2: = complete_type_witness @Adapt.%T.loc4_13.2 (%T) [symbolic = %.loc6_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc6_1.2: = complete_type_witness @Adapt.%T.loc4_13.2 (%T) [symbolic = %.loc6_1.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: adapt_decl %T -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %T [symbolic = %.loc6_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %T [symbolic = %.loc6_1.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapt.2 @@ -388,7 +388,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2 => constants.%.2 +// CHECK:STDOUT: %.loc6_1.2 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InitFromAdaptedGeneric(constants.%T) { @@ -406,6 +406,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_1.2 => constants.%.3 +// CHECK:STDOUT: %.loc6_1.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index f290998afc57..8b609eaa9569 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -54,38 +54,38 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] // CHECK:STDOUT: %Get.type.1: type = fn_type @Get, @Class(%T) [symbolic] // CHECK:STDOUT: %Get.1: %Get.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %Class.2 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] // CHECK:STDOUT: %GetAddr.type.1: type = fn_type @GetAddr, @Class(%T) [symbolic] // CHECK:STDOUT: %GetAddr.1: %GetAddr.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(i32) [template] // CHECK:STDOUT: %DirectFieldAccess.type: type = fn_type @DirectFieldAccess [template] // CHECK:STDOUT: %DirectFieldAccess: %DirectFieldAccess.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %Class.3, i32 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %Class.3, i32 [template] // CHECK:STDOUT: %Get.type.2: type = fn_type @Get, @Class(i32) [template] // CHECK:STDOUT: %Get.2: %Get.type.2 = struct_value () [template] // CHECK:STDOUT: %GetAddr.type.2: type = fn_type @GetAddr, @Class(i32) [template] // CHECK:STDOUT: %GetAddr.2: %GetAddr.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.8: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.8 [template] // CHECK:STDOUT: %MethodCall.type: type = fn_type @MethodCall [template] // CHECK:STDOUT: %MethodCall: %MethodCall.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = ptr_type %Class.3 [template] +// CHECK:STDOUT: %.11: type = ptr_type %Class.3 [template] // CHECK:STDOUT: %AddrMethodCall.type: type = fn_type @AddrMethodCall [template] // CHECK:STDOUT: %AddrMethodCall: %AddrMethodCall.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = ptr_type i32 [template] +// CHECK:STDOUT: %.12: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -152,8 +152,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AddrMethodCall.decl: %AddrMethodCall.type = fn_decl @AddrMethodCall [template = constants.%AddrMethodCall] { -// CHECK:STDOUT: %p.patt: %.12 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.12 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.11 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.11 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { @@ -162,12 +162,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.loc18_27.1: type = value_of_initializer %int.make_type_32.loc18_28 [template = i32] // CHECK:STDOUT: %.loc18_27.2: type = converted %int.make_type_32.loc18_28, %.loc18_27.1 [template = i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(i32) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc18_32: type = ptr_type %Class.3 [template = constants.%.12] +// CHECK:STDOUT: %.loc18_32: type = ptr_type %Class.3 [template = constants.%.11] // CHECK:STDOUT: %int.make_type_32.loc18_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_38.1: type = value_of_initializer %int.make_type_32.loc18_38 [template = i32] // CHECK:STDOUT: %.loc18_38.2: type = converted %int.make_type_32.loc18_38, %.loc18_38.1 [template = i32] -// CHECK:STDOUT: %p.param: %.12 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.12 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.11 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.11 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -179,17 +179,17 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc2_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc3_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc2_13.2 (%T) [symbolic = %.loc3_8.2 (constants.%.2)] +// CHECK:STDOUT: %.loc3_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc2_13.2 (%T) [symbolic = %.loc3_8.2 (constants.%.1)] // CHECK:STDOUT: %Get.type: type = fn_type @Get, @Class(%T.loc2_13.2) [symbolic = %Get.type (constants.%Get.type.1)] // CHECK:STDOUT: %Get: @Class.%Get.type (%Get.type.1) = struct_value () [symbolic = %Get (constants.%Get.1)] // CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr, @Class(%T.loc2_13.2) [symbolic = %GetAddr.type (constants.%GetAddr.type.1)] // CHECK:STDOUT: %GetAddr: @Class.%GetAddr.type (%GetAddr.type.1) = struct_value () [symbolic = %GetAddr (constants.%GetAddr.1)] -// CHECK:STDOUT: %.loc8_1.2: type = struct_type {.x: @Class.%T.loc2_13.2 (%T)} [symbolic = %.loc8_1.2 (constants.%.5)] -// CHECK:STDOUT: %.loc8_1.3: = complete_type_witness @Class.%.loc8_1.2 (%.5) [symbolic = %.loc8_1.3 (constants.%.6)] +// CHECK:STDOUT: %.loc8_1.2: type = struct_type {.x: @Class.%T.loc2_13.2 (%T)} [symbolic = %.loc8_1.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_1.3: = complete_type_witness @Class.%.loc8_1.2 (%.4) [symbolic = %.loc8_1.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc2_13.1 [symbolic = %T.loc2_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc3_8.1: @Class.%.loc3_8.2 (%.2) = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc3_8.1: @Class.%.loc3_8.2 (%.1) = field_decl x, element0 [template] // CHECK:STDOUT: %Get.decl: @Class.%Get.type (%Get.type.1) = fn_decl @Get [symbolic = @Class.%Get (constants.%Get.1)] { // CHECK:STDOUT: %self.patt: @Get.%Class (%Class.2) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @Get.%Class (%Class.2) = value_param_pattern %self.patt, runtime_param0 @@ -205,23 +205,23 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return: ref @Get.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %GetAddr.decl: @Class.%GetAddr.type (%GetAddr.type.1) = fn_decl @GetAddr [symbolic = @Class.%GetAddr (constants.%GetAddr.1)] { -// CHECK:STDOUT: %self.patt: @GetAddr.%.loc7_29.1 (%.3) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @GetAddr.%.loc7_29.1 (%.3) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @GetAddr.%.loc7_29.1 (%.2) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @GetAddr.%.loc7_29.1 (%.2) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc7_14: auto = addr_pattern %self.param_patt -// CHECK:STDOUT: %return.patt: @GetAddr.%.loc7_38.1 (%.4) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GetAddr.%.loc7_38.1 (%.4) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @GetAddr.%.loc7_38.1 (%.3) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GetAddr.%.loc7_38.1 (%.3) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc7_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc7_25 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_29.2: type = ptr_type %Class.2 [symbolic = %.loc7_29.1 (constants.%.3)] +// CHECK:STDOUT: %.loc7_29.2: type = ptr_type %Class.2 [symbolic = %.loc7_29.1 (constants.%.2)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc7_38.2: type = ptr_type %T [symbolic = %.loc7_38.1 (constants.%.4)] -// CHECK:STDOUT: %self.param: @GetAddr.%.loc7_29.1 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %self: @GetAddr.%.loc7_29.1 (%.3) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @GetAddr.%.loc7_38.1 (%.4) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @GetAddr.%.loc7_38.1 (%.4) = return_slot %return.param +// CHECK:STDOUT: %.loc7_38.2: type = ptr_type %T [symbolic = %.loc7_38.1 (constants.%.3)] +// CHECK:STDOUT: %self.param: @GetAddr.%.loc7_29.1 (%.2) = value_param runtime_param0 +// CHECK:STDOUT: %self: @GetAddr.%.loc7_29.1 (%.2) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @GetAddr.%.loc7_38.1 (%.3) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @GetAddr.%.loc7_38.1 (%.3) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_1.1: = complete_type_witness %.5 [symbolic = %.loc8_1.3 (constants.%.6)] +// CHECK:STDOUT: %.loc8_1.1: = complete_type_witness %.4 [symbolic = %.loc8_1.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -236,12 +236,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc5_42.3: type = unbound_element_type @Get.%Class (%Class.2), @Get.%T (%T) [symbolic = %.loc5_42.3 (constants.%.2)] +// CHECK:STDOUT: %.loc5_42.3: type = unbound_element_type @Get.%Class (%Class.2), @Get.%T (%T) [symbolic = %.loc5_42.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self.param_patt: @Get.%Class (%Class.2)]() -> @Get.%T (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @Get.%Class (%Class.2) = name_ref self, %self -// CHECK:STDOUT: %x.ref: @Get.%.loc5_42.3 (%.2) = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] +// CHECK:STDOUT: %x.ref: @Get.%.loc5_42.3 (%.1) = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] // CHECK:STDOUT: %.loc5_42.1: ref @Get.%T (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc5_42.2: @Get.%T (%T) = bind_value %.loc5_42.1 // CHECK:STDOUT: return %.loc5_42.2 @@ -251,19 +251,19 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: generic fn @GetAddr(@Class.%T.loc2_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_29.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.loc7_29.1 (constants.%.3)] -// CHECK:STDOUT: %.loc7_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %.loc7_38.1 (constants.%.4)] +// CHECK:STDOUT: %.loc7_29.1: type = ptr_type @GetAddr.%Class (%Class.2) [symbolic = %.loc7_29.1 (constants.%.2)] +// CHECK:STDOUT: %.loc7_38.1: type = ptr_type @GetAddr.%T (%T) [symbolic = %.loc7_38.1 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.loc7_54.3 (constants.%.2)] +// CHECK:STDOUT: %.loc7_54.3: type = unbound_element_type @GetAddr.%Class (%Class.2), @GetAddr.%T (%T) [symbolic = %.loc7_54.3 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%.loc7_29.1 (%.3)]() -> @GetAddr.%.loc7_38.1 (%.4) { +// CHECK:STDOUT: fn[addr %self.param_patt: @GetAddr.%.loc7_29.1 (%.2)]() -> @GetAddr.%.loc7_38.1 (%.3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @GetAddr.%.loc7_29.1 (%.3) = name_ref self, %self +// CHECK:STDOUT: %self.ref: @GetAddr.%.loc7_29.1 (%.2) = name_ref self, %self // CHECK:STDOUT: %.loc7_54.1: ref @GetAddr.%Class (%Class.2) = deref %self.ref -// CHECK:STDOUT: %x.ref: @GetAddr.%.loc7_54.3 (%.2) = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] +// CHECK:STDOUT: %x.ref: @GetAddr.%.loc7_54.3 (%.1) = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] // CHECK:STDOUT: %.loc7_54.2: ref @GetAddr.%T (%T) = class_element_access %.loc7_54.1, element0 -// CHECK:STDOUT: %.loc7_49: @GetAddr.%.loc7_38.1 (%.4) = addr_of %.loc7_54.2 +// CHECK:STDOUT: %.loc7_49: @GetAddr.%.loc7_38.1 (%.3) = addr_of %.loc7_54.2 // CHECK:STDOUT: return %.loc7_49 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -273,7 +273,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: fn @DirectFieldAccess(%x.param_patt: %Class.3) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref.loc11_10: %Class.3 = name_ref x, %x -// CHECK:STDOUT: %x.ref.loc11_11: %.8 = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] +// CHECK:STDOUT: %x.ref.loc11_11: %.7 = name_ref x, @Class.%.loc3_8.1 [template = @Class.%.loc3_8.1] // CHECK:STDOUT: %.loc11_11.1: ref i32 = class_element_access %x.ref.loc11_10, element0 // CHECK:STDOUT: %.loc11_11.2: i32 = bind_value %.loc11_11.1 // CHECK:STDOUT: return %.loc11_11.2 @@ -292,18 +292,18 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: return %.loc15_17.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AddrMethodCall(%p.param_patt: %.12) -> i32 { +// CHECK:STDOUT: fn @AddrMethodCall(%p.param_patt: %.11) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.12 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p // CHECK:STDOUT: %.loc19_12.1: ref %Class.3 = deref %p.ref // CHECK:STDOUT: %.loc19_12.2: %GetAddr.type.2 = specific_constant @Class.%GetAddr.decl, @Class(i32) [template = constants.%GetAddr.2] // CHECK:STDOUT: %GetAddr.ref: %GetAddr.type.2 = name_ref GetAddr, %.loc19_12.2 [template = constants.%GetAddr.2] // CHECK:STDOUT: %.loc19_12.3: = bound_method %.loc19_12.1, %GetAddr.ref // CHECK:STDOUT: %.loc19_12.4: = specific_function %.loc19_12.3, @GetAddr(i32) -// CHECK:STDOUT: %.loc19_12.5: %.12 = addr_of %.loc19_12.1 -// CHECK:STDOUT: %GetAddr.call: init %.13 = call %.loc19_12.4(%.loc19_12.5) -// CHECK:STDOUT: %.loc19_21.1: %.13 = value_of_initializer %GetAddr.call -// CHECK:STDOUT: %.loc19_21.2: %.13 = converted %GetAddr.call, %.loc19_21.1 +// CHECK:STDOUT: %.loc19_12.5: %.11 = addr_of %.loc19_12.1 +// CHECK:STDOUT: %GetAddr.call: init %.12 = call %.loc19_12.4(%.loc19_12.5) +// CHECK:STDOUT: %.loc19_21.1: %.12 = value_of_initializer %GetAddr.call +// CHECK:STDOUT: %.loc19_21.2: %.12 = converted %GetAddr.call, %.loc19_21.1 // CHECK:STDOUT: %.loc19_10.1: ref i32 = deref %.loc19_21.2 // CHECK:STDOUT: %.loc19_10.2: i32 = bind_value %.loc19_10.1 // CHECK:STDOUT: return %.loc19_10.2 @@ -315,13 +315,13 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.2 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.1 // CHECK:STDOUT: %Get.type => constants.%Get.type.1 // CHECK:STDOUT: %Get => constants.%Get.1 // CHECK:STDOUT: %GetAddr.type => constants.%GetAddr.type.1 // CHECK:STDOUT: %GetAddr => constants.%GetAddr.1 -// CHECK:STDOUT: %.loc8_1.2 => constants.%.5 -// CHECK:STDOUT: %.loc8_1.3 => constants.%.6 +// CHECK:STDOUT: %.loc8_1.2 => constants.%.4 +// CHECK:STDOUT: %.loc8_1.3 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@Get.%T) { @@ -342,8 +342,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: specific @GetAddr(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc7_29.1 => constants.%.3 -// CHECK:STDOUT: %.loc7_38.1 => constants.%.4 +// CHECK:STDOUT: %.loc7_29.1 => constants.%.2 +// CHECK:STDOUT: %.loc7_38.1 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@Class.%T.loc2_13.2) { @@ -357,13 +357,13 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.8 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.7 // CHECK:STDOUT: %Get.type => constants.%Get.type.2 // CHECK:STDOUT: %Get => constants.%Get.2 // CHECK:STDOUT: %GetAddr.type => constants.%GetAddr.type.2 // CHECK:STDOUT: %GetAddr => constants.%GetAddr.2 -// CHECK:STDOUT: %.loc8_1.2 => constants.%.9 -// CHECK:STDOUT: %.loc8_1.3 => constants.%.10 +// CHECK:STDOUT: %.loc8_1.2 => constants.%.8 +// CHECK:STDOUT: %.loc8_1.3 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Get(i32) { @@ -371,17 +371,17 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class => constants.%Class.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc5_42.3 => constants.%.8 +// CHECK:STDOUT: %.loc5_42.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(i32) { // CHECK:STDOUT: %T => i32 // CHECK:STDOUT: %Class => constants.%Class.3 -// CHECK:STDOUT: %.loc7_29.1 => constants.%.12 -// CHECK:STDOUT: %.loc7_38.1 => constants.%.13 +// CHECK:STDOUT: %.loc7_29.1 => constants.%.11 +// CHECK:STDOUT: %.loc7_38.1 => constants.%.12 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.3 => constants.%.8 +// CHECK:STDOUT: %.loc7_54.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_static_member_fn_call.carbon @@ -390,19 +390,19 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T) [symbolic] // CHECK:STDOUT: %Make: %Make.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %Class.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %StaticMemberFunctionCall.type: type = fn_type @StaticMemberFunctionCall [template] // CHECK:STDOUT: %StaticMemberFunctionCall: %StaticMemberFunctionCall.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %Make, @Make(%T) [symbolic] +// CHECK:STDOUT: %.4: = specific_function %Make, @Make(%T) [symbolic] // 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] @@ -412,14 +412,14 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // 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: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%Class.2) [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%Class.2) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -430,7 +430,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // 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 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // 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 @@ -475,8 +475,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // 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.%.6)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -505,7 +505,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return.param: ref @Make.%Class.loc5_21.1 (%Class.2) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.%Class.loc5_21.1 (%Class.2) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -522,7 +522,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @Make.%Class.loc5_21.1 (%Class.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_35.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc5_35.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc5_35.2: init @Make.%Class.loc5_21.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: %.loc5_36: init @Make.%Class.loc5_21.1 (%Class.2) = converted %.loc5_35.1, %.loc5_35.2 [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: return %.loc5_36 to %return @@ -537,7 +537,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T.loc8_29.2) [symbolic = %Make.type (constants.%Make.type)] // CHECK:STDOUT: %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.loc15_18.3: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %.loc15_18.3 (constants.%.5)] +// CHECK:STDOUT: %.loc15_18.3: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %.loc15_18.3 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> %return: @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) { // CHECK:STDOUT: !entry: @@ -546,7 +546,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_47.2 (constants.%Class.2)] // CHECK:STDOUT: %.loc15_18.1: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] // CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc15_18.1 [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.loc15_18.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc15_18.3 (constants.%.5)] +// CHECK:STDOUT: %.loc15_18.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc15_18.3 (constants.%.4)] // CHECK:STDOUT: %.loc15_23.1: ref @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = temporary_storage // CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = call %.loc15_18.2() to %.loc15_23.1 // CHECK:STDOUT: %.loc15_23.2: ref @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = temporary %.loc15_23.1, %Make.call @@ -631,8 +631,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make(@StaticMemberFunctionCall.%T.loc8_29.2) { diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index f3044dea1059..ef348637da95 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -44,17 +44,17 @@ class C(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: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T) [symbolic] // CHECK:STDOUT: %G: %G.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.n: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,9 +89,9 @@ class C(T:! type) { // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T.loc4_13.2) [symbolic = %G.type (constants.%G.type)] // CHECK:STDOUT: %G: @Class.%G.type (%G.type) = struct_value () [symbolic = %G (constants.%G)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc13_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc13_8.2 (constants.%.2)] -// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.3) [symbolic = %.loc14_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc13_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc13_8.2 (constants.%.1)] +// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.2) [symbolic = %.loc14_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { @@ -122,8 +122,8 @@ class C(T:! type) { // CHECK:STDOUT: %return: ref @G.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_8.1: @Class.%.loc13_8.2 (%.2) = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.3 [symbolic = %.loc14_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc13_8.1: @Class.%.loc13_8.2 (%.1) = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.2 [symbolic = %.loc14_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -150,12 +150,12 @@ class C(T:! type) { // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc10_16.3: type = unbound_element_type @G.%Class (%Class.2), @G.%T (%T) [symbolic = %.loc10_16.3 (constants.%.2)] +// CHECK:STDOUT: %.loc10_16.3: type = unbound_element_type @G.%Class (%Class.2), @G.%T (%T) [symbolic = %.loc10_16.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self.param_patt: @G.%Class (%Class.2)]() -> @G.%T (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @G.%Class (%Class.2) = name_ref self, %self -// CHECK:STDOUT: %n.ref: @G.%.loc10_16.3 (%.2) = name_ref n, @Class.%.loc13_8.1 [template = @Class.%.loc13_8.1] +// CHECK:STDOUT: %n.ref: @G.%.loc10_16.3 (%.1) = name_ref n, @Class.%.loc13_8.1 [template = @Class.%.loc13_8.1] // CHECK:STDOUT: %.loc10_16.1: ref @G.%T (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc10_16.2: @G.%T (%T) = bind_value %.loc10_16.1 // CHECK:STDOUT: return %.loc10_16.2 @@ -172,9 +172,9 @@ class C(T:! type) { // CHECK:STDOUT: %G.type => constants.%G.type // CHECK:STDOUT: %G => constants.%G // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc13_8.2 => constants.%.2 -// CHECK:STDOUT: %.loc14_1.2 => constants.%.3 -// CHECK:STDOUT: %.loc14_1.3 => constants.%.4 +// CHECK:STDOUT: %.loc13_8.2 => constants.%.1 +// CHECK:STDOUT: %.loc14_1.2 => constants.%.2 +// CHECK:STDOUT: %.loc14_1.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { @@ -202,15 +202,15 @@ class C(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: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %C.2, %.2 [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {.data: %.2} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C.2, %.1 [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {.data: %.1} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -243,14 +243,14 @@ class C(T:! type) { // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%T.loc4_9.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @C.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc11_11.2: type = unbound_element_type @C.%C (%C.2), %.2 [symbolic = %.loc11_11.2 (constants.%.3)] +// CHECK:STDOUT: %.loc11_11.2: type = unbound_element_type @C.%C (%C.2), %.1 [symbolic = %.loc11_11.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @C.%F.type (%F.type) = fn_decl @F [symbolic = @C.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc11_14.1: %.2 = struct_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_11.1: @C.%.loc11_11.2 (%.3) = field_decl data, element0 [template] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_14.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_11.1: @C.%.loc11_11.2 (%.2) = field_decl data, element0 [template] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -263,11 +263,11 @@ class C(T:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc9: type = unbound_element_type @F.%C (%C.2), %.2 [symbolic = %.loc9 (constants.%.3)] +// CHECK:STDOUT: %.loc9: type = unbound_element_type @F.%C (%C.2), %.1 [symbolic = %.loc9 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %data.ref: @F.%.loc9 (%.3) = name_ref data, @C.%.loc11_11.1 [template = @C.%.loc11_11.1] +// CHECK:STDOUT: %data.ref: @F.%.loc9 (%.2) = name_ref data, @C.%.loc11_11.1 [template = @C.%.loc11_11.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -280,7 +280,7 @@ class C(T:! type) { // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F // CHECK:STDOUT: %C => constants.%C.2 -// CHECK:STDOUT: %.loc11_11.2 => constants.%.3 +// CHECK:STDOUT: %.loc11_11.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) {} diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index fa7fcfa299d4..a4cab26ee1e0 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -111,19 +111,19 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T) [symbolic] // CHECK:STDOUT: %G: %G.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.n: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.patt.3: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -189,9 +189,9 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %G.type: type = fn_type @G, @Class(%T.loc4_13.2) [symbolic = %G.type (constants.%G.type)] // CHECK:STDOUT: %G: @Class.%G.type (%G.type) = struct_value () [symbolic = %G (constants.%G)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc4_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc7_8.2 (constants.%.2)] -// CHECK:STDOUT: %.loc8_1.2: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc8_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc8_1.3: = complete_type_witness @Class.%.loc8_1.2 (%.3) [symbolic = %.loc8_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc4_13.2 (%T) [symbolic = %.loc7_8.2 (constants.%.1)] +// CHECK:STDOUT: %.loc8_1.2: type = struct_type {.n: @Class.%T.loc4_13.2 (%T)} [symbolic = %.loc8_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc8_1.3: = complete_type_witness @Class.%.loc8_1.2 (%.2) [symbolic = %.loc8_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { @@ -222,8 +222,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %.loc6_22: ref @G.%T.loc6 (%T) = return_slot %return.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_8.1: @Class.%.loc7_8.2 (%.2) = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc8_1.1: = complete_type_witness %.3 [symbolic = %.loc8_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc7_8.1: @Class.%.loc7_8.2 (%.1) = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc8_1.1: = complete_type_witness %.2 [symbolic = %.loc8_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -250,12 +250,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc6) [symbolic = %Class (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc15_14.3: type = unbound_element_type @G.%Class (%Class.2), @G.%T.loc6 (%T) [symbolic = %.loc15_14.3 (constants.%.2)] +// CHECK:STDOUT: %.loc15_14.3: type = unbound_element_type @G.%Class (%Class.2), @G.%T.loc6 (%T) [symbolic = %.loc15_14.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self.param_patt: %Class.2]() -> %T { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @G.%Class (%Class.2) = name_ref self, %self.loc14 -// CHECK:STDOUT: %n.ref: @G.%.loc15_14.3 (%.2) = name_ref n, @Class.%.loc7_8.1 [template = @Class.%.loc7_8.1] +// CHECK:STDOUT: %n.ref: @G.%.loc15_14.3 (%.1) = name_ref n, @Class.%.loc7_8.1 [template = @Class.%.loc7_8.1] // CHECK:STDOUT: %.loc15_14.1: ref @G.%T.loc6 (%T) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc15_14.2: @G.%T.loc6 (%T) = bind_value %.loc15_14.1 // CHECK:STDOUT: return %.loc15_14.2 @@ -272,9 +272,9 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %G.type => constants.%G.type // CHECK:STDOUT: %G => constants.%G // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc7_8.2 => constants.%.2 -// CHECK:STDOUT: %.loc8_1.2 => constants.%.3 -// CHECK:STDOUT: %.loc8_1.3 => constants.%.4 +// CHECK:STDOUT: %.loc7_8.2 => constants.%.1 +// CHECK:STDOUT: %.loc8_1.2 => constants.%.2 +// CHECK:STDOUT: %.loc8_1.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { @@ -302,7 +302,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.1: %A.type = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A, @A(%T) [symbolic] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] @@ -312,11 +312,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %B.2: type = class_type @B, @B(%T, %N) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @B(%T, %N) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N.patt.2: %T = symbolic_binding_pattern N, 1 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -377,7 +377,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %N.param: @B.%T (%T) = value_param runtime_param // CHECK:STDOUT: %N.loc5_11.1: @B.%T (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc5_11.2 (constants.%N)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.2 @@ -409,7 +409,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %a.param.loc6: @F.%T.loc6 (%T) = value_param runtime_param1 // CHECK:STDOUT: %a.loc6: @F.%T.loc6 (%T) = bind_name a, %a.param.loc6 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B.2 @@ -477,14 +477,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %NotGeneric: type = class_type @NotGeneric [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -501,7 +501,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [template = constants.%NotGeneric] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc15_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -509,7 +509,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class @NotGeneric { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NotGeneric @@ -541,15 +541,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -572,7 +572,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Generic(%T.loc4_15.1: type) { @@ -585,7 +585,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %TooFew.decl: @Generic.%TooFew.type (%TooFew.type) = fn_decl @TooFew [symbolic = @Generic.%TooFew (constants.%TooFew)] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -621,18 +621,18 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany, @Generic(%T) [symbolic] // CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -655,7 +655,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc15_12.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_12.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param @@ -673,7 +673,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %TooMany.decl: @Generic.%TooMany.type (%TooMany.type) = fn_decl @TooMany [symbolic = @Generic.%TooMany (constants.%TooMany)] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -725,17 +725,17 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T.1) [symbolic] // CHECK:STDOUT: %WrongType.type: type = fn_type @WrongType, @Generic(%T.1) [symbolic] // CHECK:STDOUT: %WrongType: %WrongType.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %T.2: %.1 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt.2: %.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %T.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.2: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -758,11 +758,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} { -// CHECK:STDOUT: %.loc14_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %T.param: %.1 = value_param runtime_param -// CHECK:STDOUT: %T.loc14_12.1: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_12.2 (constants.%T.2)] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} { +// CHECK:STDOUT: %.loc14_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %T.param: %empty_tuple.type = value_param runtime_param +// CHECK:STDOUT: %T.loc14_12.1: %empty_tuple.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_12.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -776,7 +776,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %WrongType.decl: @Generic.%WrongType.type (%WrongType.type) = fn_decl @WrongType [symbolic = @Generic.%WrongType (constants.%WrongType)] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -789,9 +789,9 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.1(%T.loc14_12.1: %.1) { -// CHECK:STDOUT: %T.loc14_12.2: %.1 = bind_symbolic_name T, 0 [symbolic = %T.loc14_12.2 (constants.%T.2)] -// CHECK:STDOUT: %T.patt: %.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.2)] +// CHECK:STDOUT: generic fn @.1(%T.loc14_12.1: %empty_tuple.type) { +// CHECK:STDOUT: %T.loc14_12.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_12.2 (constants.%T.2)] +// CHECK:STDOUT: %T.patt: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index 5f9133a3ee73..04913e2aa9b4 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -34,36 +34,36 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%T, %U) [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %U) [symbolic] // CHECK:STDOUT: %Get.type.1: type = fn_type @Get, @Class(%T) [symbolic] // CHECK:STDOUT: %Get.1: %Get.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %GetNoDeduce.type.1: type = fn_type @GetNoDeduce, @Class(%T) [symbolic] // CHECK:STDOUT: %GetNoDeduce.1: %GetNoDeduce.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [symbolic] -// CHECK:STDOUT: %.7: = specific_function %Get.1, @Get(%T, %U) [symbolic] -// CHECK:STDOUT: %.8: = specific_function %GetNoDeduce.1, @GetNoDeduce(%T, %U) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.2 [symbolic] +// CHECK:STDOUT: %.4: = specific_function %Get.1, @Get(%T, %U) [symbolic] +// CHECK:STDOUT: %.5: = specific_function %GetNoDeduce.1, @GetNoDeduce(%T, %U) [symbolic] // CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%A) [template] -// CHECK:STDOUT: %.9: type = tuple_type (%A, %B) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%A, %B) [template] // CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [template] // CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.11: type = tuple_type (%.10, %.10) [template] -// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.6, %.6) [template] +// CHECK:STDOUT: %.7: type = ptr_type %tuple.type.4 [template] // CHECK:STDOUT: %Get.type.2: type = fn_type @Get, @Class(%A) [template] // CHECK:STDOUT: %Get.2: %Get.type.2 = struct_value () [template] // CHECK:STDOUT: %GetNoDeduce.type.2: type = fn_type @GetNoDeduce, @Class(%A) [template] // CHECK:STDOUT: %GetNoDeduce.2: %GetNoDeduce.type.2 = struct_value () [template] -// CHECK:STDOUT: %.13: = specific_function %Get.2, @Get(%A, %B) [template] +// CHECK:STDOUT: %.8: = specific_function %Get.2, @Get(%A, %B) [template] // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam.type: type = fn_type @CallGenericMethodWithNonDeducedParam [template] // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam: %CallGenericMethodWithNonDeducedParam.type = struct_value () [template] -// CHECK:STDOUT: %.14: = specific_function %GetNoDeduce.2, @GetNoDeduce(%A, %B) [template] +// CHECK:STDOUT: %.9: = specific_function %GetNoDeduce.2, @GetNoDeduce(%A, %B) [template] // CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -96,38 +96,38 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [template = constants.%CallGenericMethod] { // CHECK:STDOUT: %c.patt: %Class.3 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %Class.3 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.9 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.9 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %A.ref.loc19_31: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.3] // CHECK:STDOUT: %A.ref.loc19_39: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc19: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc19_43.1: %.4 = tuple_literal (%A.ref.loc19_39, %B.ref.loc19) -// CHECK:STDOUT: %.loc19_43.2: type = converted %.loc19_43.1, constants.%.9 [template = constants.%.9] +// CHECK:STDOUT: %.loc19_43.1: %tuple.type.1 = tuple_literal (%A.ref.loc19_39, %B.ref.loc19) +// CHECK:STDOUT: %.loc19_43.2: type = converted %.loc19_43.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %c.param: %Class.3 = value_param runtime_param0 // CHECK:STDOUT: %c: %Class.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.9 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.9 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam.decl: %CallGenericMethodWithNonDeducedParam.type = fn_decl @CallGenericMethodWithNonDeducedParam [template = constants.%CallGenericMethodWithNonDeducedParam] { // CHECK:STDOUT: %c.patt: %Class.3 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %Class.3 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.9 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.9 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %A.ref.loc23_50: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.3] // CHECK:STDOUT: %A.ref.loc23_58: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc23: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc23_62.1: %.4 = tuple_literal (%A.ref.loc23_58, %B.ref.loc23) -// CHECK:STDOUT: %.loc23_62.2: type = converted %.loc23_62.1, constants.%.9 [template = constants.%.9] +// CHECK:STDOUT: %.loc23_62.1: %tuple.type.1 = tuple_literal (%A.ref.loc23_58, %B.ref.loc23) +// CHECK:STDOUT: %.loc23_62.2: type = converted %.loc23_62.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %c.param: %Class.3 = value_param runtime_param0 // CHECK:STDOUT: %c: %Class.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.9 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.9 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -159,37 +159,37 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.decl: @Class.%Get.type (%Get.type.1) = fn_decl @Get [symbolic = @Class.%Get (constants.%Get.1)] { // CHECK:STDOUT: %U.patt.loc15_10.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_10.1 (constants.%U.patt.1)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc15_10.2, runtime_param [symbolic = %U.patt.loc15_10.1 (constants.%U.patt.1)] -// CHECK:STDOUT: %return.patt: @Get.%.loc15_28.1 (%.5) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Get.%.loc15_28.1 (%.5) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Get.%tuple.type (%tuple.type.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Get.%tuple.type (%tuple.type.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %U.ref.loc15_27: type = name_ref U, %U.loc15_10.2 [symbolic = %U.loc15_10.1 (constants.%U)] -// CHECK:STDOUT: %.loc15_28.2: %.4 = tuple_literal (%T.ref, %U.ref.loc15_27) -// CHECK:STDOUT: %.loc15_28.3: type = converted %.loc15_28.2, constants.%.5 [symbolic = %.loc15_28.1 (constants.%.5)] +// CHECK:STDOUT: %.loc15_28.1: %tuple.type.1 = tuple_literal (%T.ref, %U.ref.loc15_27) +// CHECK:STDOUT: %.loc15_28.2: type = converted %.loc15_28.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc15_10.2: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc15_10.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @Get.%.loc15_28.1 (%.5) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @Get.%.loc15_28.1 (%.5) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @Get.%tuple.type (%tuple.type.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @Get.%tuple.type (%tuple.type.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %GetNoDeduce.decl: @Class.%GetNoDeduce.type (%GetNoDeduce.type.1) = fn_decl @GetNoDeduce [symbolic = @Class.%GetNoDeduce (constants.%GetNoDeduce.1)] { // CHECK:STDOUT: %x.patt: @GetNoDeduce.%T (%T) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @GetNoDeduce.%T (%T) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: %U.patt.loc16_24.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc16_24.1 (constants.%U.patt.2)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc16_24.2, runtime_param [symbolic = %U.patt.loc16_24.1 (constants.%U.patt.2)] -// CHECK:STDOUT: %return.patt: @GetNoDeduce.%.loc16_42.1 (%.5) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @GetNoDeduce.%.loc16_42.1 (%.5) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @GetNoDeduce.%tuple.type (%tuple.type.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @GetNoDeduce.%tuple.type (%tuple.type.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc16_21: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.ref.loc16_38: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %U.ref.loc16_41: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)] -// CHECK:STDOUT: %.loc16_42.2: %.4 = tuple_literal (%T.ref.loc16_38, %U.ref.loc16_41) -// CHECK:STDOUT: %.loc16_42.3: type = converted %.loc16_42.2, constants.%.5 [symbolic = %.loc16_42.1 (constants.%.5)] +// CHECK:STDOUT: %.loc16_42.1: %tuple.type.1 = tuple_literal (%T.ref.loc16_38, %U.ref.loc16_41) +// CHECK:STDOUT: %.loc16_42.2: type = converted %.loc16_42.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %x.param: @GetNoDeduce.%T (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @GetNoDeduce.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc16_24.2: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc16_24.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @GetNoDeduce.%.loc16_42.1 (%.5) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @GetNoDeduce.%.loc16_42.1 (%.5) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: @@ -204,22 +204,22 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %U.loc15_10.1: type = bind_symbolic_name U, 1 [symbolic = %U.loc15_10.1 (constants.%U)] // CHECK:STDOUT: %U.patt.loc15_10.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_10.1 (constants.%U.patt.1)] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc15_28.1: type = tuple_type (@Get.%T (%T), @Get.%U.loc15_10.1 (%U)) [symbolic = %.loc15_28.1 (constants.%.5)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@Get.%T (%T), @Get.%U.loc15_10.1 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Get.type: type = fn_type @Get, @Class(%T) [symbolic = %Get.type (constants.%Get.type.1)] // CHECK:STDOUT: %Get: @Get.%Get.type (%Get.type.1) = struct_value () [symbolic = %Get (constants.%Get.1)] -// CHECK:STDOUT: %.loc15_39.3: = specific_function %Get, @Get(%T, %U.loc15_10.1) [symbolic = %.loc15_39.3 (constants.%.7)] +// CHECK:STDOUT: %.loc15_39.3: = specific_function %Get, @Get(%T, %U.loc15_10.1) [symbolic = %.loc15_39.3 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type) -> %return: @Get.%.loc15_28.1 (%.5) { +// CHECK:STDOUT: fn(%U.param_patt: type) -> %return: @Get.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_39.1: @Get.%Get.type (%Get.type.1) = specific_constant @Class.%Get.decl, @Class(constants.%T) [symbolic = %Get (constants.%Get.1)] // CHECK:STDOUT: %Get.ref: @Get.%Get.type (%Get.type.1) = name_ref Get, %.loc15_39.1 [symbolic = %Get (constants.%Get.1)] // CHECK:STDOUT: %U.ref.loc15_43: type = name_ref U, %U.loc15_10.2 [symbolic = %U.loc15_10.1 (constants.%U)] -// CHECK:STDOUT: %.loc15_39.2: = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %.loc15_39.3 (constants.%.7)] -// CHECK:STDOUT: %.loc15_42.1: ref @Get.%.loc15_28.1 (%.5) = temporary_storage -// CHECK:STDOUT: %Get.call: init @Get.%.loc15_28.1 (%.5) = call %.loc15_39.2() to %.loc15_42.1 -// CHECK:STDOUT: %.loc15_42.2: ref @Get.%.loc15_28.1 (%.5) = temporary %.loc15_42.1, %Get.call +// CHECK:STDOUT: %.loc15_39.2: = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %.loc15_39.3 (constants.%.4)] +// CHECK:STDOUT: %.loc15_42.1: ref @Get.%tuple.type (%tuple.type.2) = temporary_storage +// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.2) = call %.loc15_39.2() to %.loc15_42.1 +// CHECK:STDOUT: %.loc15_42.2: ref @Get.%tuple.type (%tuple.type.2) = temporary %.loc15_42.1, %Get.call // CHECK:STDOUT: %.loc15_42.3: ref @Get.%T (%T) = tuple_access %.loc15_42.2, element0 // CHECK:STDOUT: %.loc15_42.4: @Get.%T (%T) = bind_value %.loc15_42.3 // CHECK:STDOUT: %.loc15_42.5: ref @Get.%T (%T) = tuple_access %return, element0 @@ -228,8 +228,8 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %.loc15_42.8: @Get.%U.loc15_10.1 (%U) = bind_value %.loc15_42.7 // CHECK:STDOUT: %.loc15_42.9: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1 // CHECK:STDOUT: %.loc15_42.10: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_42.8 to %.loc15_42.9 -// CHECK:STDOUT: %.loc15_42.11: init @Get.%.loc15_28.1 (%.5) = tuple_init (%.loc15_42.6, %.loc15_42.10) to %return -// CHECK:STDOUT: %.loc15_45: init @Get.%.loc15_28.1 (%.5) = converted %Get.call, %.loc15_42.11 +// CHECK:STDOUT: %.loc15_42.11: init @Get.%tuple.type (%tuple.type.2) = tuple_init (%.loc15_42.6, %.loc15_42.10) to %return +// CHECK:STDOUT: %.loc15_45: init @Get.%tuple.type (%tuple.type.2) = converted %Get.call, %.loc15_42.11 // CHECK:STDOUT: return %.loc15_45 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -238,23 +238,23 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %U.loc16_24.1: type = bind_symbolic_name U, 1 [symbolic = %U.loc16_24.1 (constants.%U)] // CHECK:STDOUT: %U.patt.loc16_24.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc16_24.1 (constants.%U.patt.2)] -// CHECK:STDOUT: %.loc16_42.1: type = tuple_type (@GetNoDeduce.%T (%T), @GetNoDeduce.%U.loc16_24.1 (%U)) [symbolic = %.loc16_42.1 (constants.%.5)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@GetNoDeduce.%T (%T), @GetNoDeduce.%U.loc16_24.1 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetNoDeduce.type: type = fn_type @GetNoDeduce, @Class(%T) [symbolic = %GetNoDeduce.type (constants.%GetNoDeduce.type.1)] // CHECK:STDOUT: %GetNoDeduce: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = struct_value () [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] -// CHECK:STDOUT: %.loc16_53.3: = specific_function %GetNoDeduce, @GetNoDeduce(%T, %U.loc16_24.1) [symbolic = %.loc16_53.3 (constants.%.8)] +// CHECK:STDOUT: %.loc16_53.3: = specific_function %GetNoDeduce, @GetNoDeduce(%T, %U.loc16_24.1) [symbolic = %.loc16_53.3 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param_patt: @GetNoDeduce.%T (%T), %U.param_patt: type) -> %return: @GetNoDeduce.%.loc16_42.1 (%.5) { +// CHECK:STDOUT: fn(%x.param_patt: @GetNoDeduce.%T (%T), %U.param_patt: type) -> %return: @GetNoDeduce.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_53.1: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = specific_constant @Class.%GetNoDeduce.decl, @Class(constants.%T) [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] // CHECK:STDOUT: %GetNoDeduce.ref: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.1) = name_ref GetNoDeduce, %.loc16_53.1 [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] // CHECK:STDOUT: %x.ref: @GetNoDeduce.%T (%T) = name_ref x, %x // CHECK:STDOUT: %U.ref.loc16_68: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)] -// CHECK:STDOUT: %.loc16_53.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %.loc16_53.3 (constants.%.8)] -// CHECK:STDOUT: %.loc16_64.1: ref @GetNoDeduce.%.loc16_42.1 (%.5) = temporary_storage -// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%.loc16_42.1 (%.5) = call %.loc16_53.2(%x.ref) to %.loc16_64.1 -// CHECK:STDOUT: %.loc16_64.2: ref @GetNoDeduce.%.loc16_42.1 (%.5) = temporary %.loc16_64.1, %GetNoDeduce.call +// CHECK:STDOUT: %.loc16_53.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %.loc16_53.3 (constants.%.5)] +// CHECK:STDOUT: %.loc16_64.1: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary_storage +// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.2) = call %.loc16_53.2(%x.ref) to %.loc16_64.1 +// CHECK:STDOUT: %.loc16_64.2: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary %.loc16_64.1, %GetNoDeduce.call // CHECK:STDOUT: %.loc16_64.3: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_64.2, element0 // CHECK:STDOUT: %.loc16_64.4: @GetNoDeduce.%T (%T) = bind_value %.loc16_64.3 // CHECK:STDOUT: %.loc16_64.5: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0 @@ -263,39 +263,39 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %.loc16_64.8: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %.loc16_64.7 // CHECK:STDOUT: %.loc16_64.9: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1 // CHECK:STDOUT: %.loc16_64.10: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_64.8 to %.loc16_64.9 -// CHECK:STDOUT: %.loc16_64.11: init @GetNoDeduce.%.loc16_42.1 (%.5) = tuple_init (%.loc16_64.6, %.loc16_64.10) to %return -// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%.loc16_42.1 (%.5) = converted %GetNoDeduce.call, %.loc16_64.11 +// CHECK:STDOUT: %.loc16_64.11: init @GetNoDeduce.%tuple.type (%tuple.type.2) = tuple_init (%.loc16_64.6, %.loc16_64.10) to %return +// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.2) = converted %GetNoDeduce.call, %.loc16_64.11 // CHECK:STDOUT: return %.loc16_70 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGenericMethod(%c.param_patt: %Class.3) -> %return: %.9 { +// CHECK:STDOUT: fn @CallGenericMethod(%c.param_patt: %Class.3) -> %return: %tuple.type.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c // CHECK:STDOUT: %.loc20_11.1: %Get.type.2 = specific_constant @Class.%Get.decl, @Class(constants.%A) [template = constants.%Get.2] // CHECK:STDOUT: %Get.ref: %Get.type.2 = name_ref Get, %.loc20_11.1 [template = constants.%Get.2] // CHECK:STDOUT: %B.ref.loc20: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc20_11.2: = specific_function %Get.ref, @Get(constants.%A, constants.%B) [template = constants.%.13] -// CHECK:STDOUT: %.loc19_35.2: ref %.9 = splice_block %return {} -// CHECK:STDOUT: %Get.call: init %.9 = call %.loc20_11.2() to %.loc19_35.2 +// CHECK:STDOUT: %.loc20_11.2: = specific_function %Get.ref, @Get(constants.%A, constants.%B) [template = constants.%.8] +// CHECK:STDOUT: %.loc19_35.2: ref %tuple.type.3 = splice_block %return {} +// CHECK:STDOUT: %Get.call: init %tuple.type.3 = call %.loc20_11.2() to %.loc19_35.2 // CHECK:STDOUT: return %Get.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGenericMethodWithNonDeducedParam(%c.param_patt: %Class.3) -> %return: %.9 { +// CHECK:STDOUT: fn @CallGenericMethodWithNonDeducedParam(%c.param_patt: %Class.3) -> %return: %tuple.type.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c // CHECK:STDOUT: %.loc24_11.1: %GetNoDeduce.type.2 = specific_constant @Class.%GetNoDeduce.decl, @Class(constants.%A) [template = constants.%GetNoDeduce.2] // CHECK:STDOUT: %GetNoDeduce.ref: %GetNoDeduce.type.2 = name_ref GetNoDeduce, %.loc24_11.1 [template = constants.%GetNoDeduce.2] // CHECK:STDOUT: %.loc24_25.1: %.1 = struct_literal () // CHECK:STDOUT: %B.ref.loc24: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc24_11.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%A, constants.%B) [template = constants.%.14] -// CHECK:STDOUT: %.loc23_54.2: ref %.9 = splice_block %return {} +// CHECK:STDOUT: %.loc24_11.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%A, constants.%B) [template = constants.%.9] +// CHECK:STDOUT: %.loc23_54.2: ref %tuple.type.3 = splice_block %return {} // CHECK:STDOUT: %.loc24_25.2: ref %A = temporary_storage // CHECK:STDOUT: %.loc24_25.3: init %A = class_init (), %.loc24_25.2 [template = constants.%struct] // CHECK:STDOUT: %.loc24_25.4: ref %A = temporary %.loc24_25.2, %.loc24_25.3 // CHECK:STDOUT: %.loc24_25.5: ref %A = converted %.loc24_25.1, %.loc24_25.4 // CHECK:STDOUT: %.loc24_25.6: %A = bind_value %.loc24_25.5 -// CHECK:STDOUT: %GetNoDeduce.call: init %.9 = call %.loc24_11.2(%.loc24_25.6) to %.loc23_54.2 +// CHECK:STDOUT: %GetNoDeduce.call: init %tuple.type.3 = call %.loc24_11.2(%.loc24_25.6) to %.loc23_54.2 // CHECK:STDOUT: return %GetNoDeduce.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -314,24 +314,24 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %U.loc15_10.1 => constants.%U // CHECK:STDOUT: %U.patt.loc15_10.1 => constants.%U // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %.loc15_28.1 => constants.%.5 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Get.type => constants.%Get.type.1 // CHECK:STDOUT: %Get => constants.%Get.1 -// CHECK:STDOUT: %.loc15_39.3 => constants.%.7 +// CHECK:STDOUT: %.loc15_39.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetNoDeduce(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %U.loc16_24.1 => constants.%U // CHECK:STDOUT: %U.patt.loc16_24.1 => constants.%U -// CHECK:STDOUT: %.loc16_42.1 => constants.%.5 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetNoDeduce.type => constants.%GetNoDeduce.type.1 // CHECK:STDOUT: %GetNoDeduce => constants.%GetNoDeduce.1 -// CHECK:STDOUT: %.loc16_53.3 => constants.%.8 +// CHECK:STDOUT: %.loc16_53.3 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@Class.%T.loc14_13.2) { @@ -348,7 +348,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %U.loc15_10.1 => constants.%U // CHECK:STDOUT: %U.patt.loc15_10.1 => constants.%U // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %.loc15_28.1 => constants.%.5 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@GetNoDeduce.%T) { @@ -360,7 +360,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %U.loc16_24.1 => constants.%U // CHECK:STDOUT: %U.patt.loc16_24.1 => constants.%U -// CHECK:STDOUT: %.loc16_42.1 => constants.%.5 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%A) { @@ -378,23 +378,23 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %U.loc15_10.1 => constants.%B // CHECK:STDOUT: %U.patt.loc15_10.1 => constants.%B // CHECK:STDOUT: %T => constants.%A -// CHECK:STDOUT: %.loc15_28.1 => constants.%.9 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Get.type => constants.%Get.type.2 // CHECK:STDOUT: %Get => constants.%Get.2 -// CHECK:STDOUT: %.loc15_39.3 => constants.%.13 +// CHECK:STDOUT: %.loc15_39.3 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetNoDeduce(constants.%A, constants.%B) { // CHECK:STDOUT: %T => constants.%A // CHECK:STDOUT: %U.loc16_24.1 => constants.%B // CHECK:STDOUT: %U.patt.loc16_24.1 => constants.%B -// CHECK:STDOUT: %.loc16_42.1 => constants.%.9 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GetNoDeduce.type => constants.%GetNoDeduce.type.2 // CHECK:STDOUT: %GetNoDeduce => constants.%GetNoDeduce.2 -// CHECK:STDOUT: %.loc16_53.3 => constants.%.14 +// CHECK:STDOUT: %.loc16_53.3 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 029b415fb26e..2b9273a9782a 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -92,12 +92,12 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic, @Generic(%T) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -136,7 +136,7 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -155,11 +155,11 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%T) [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -176,7 +176,7 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: } { @@ -194,10 +194,10 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -210,7 +210,7 @@ class E(U:! type) {} // 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: %N.1: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: i32 = symbolic_binding_pattern N, 0 [symbolic] @@ -222,10 +222,10 @@ class E(U:! type) {} // CHECK:STDOUT: %N.2: %T = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.2: %T = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T, %N.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%T, %N.2) [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -253,7 +253,7 @@ class E(U:! type) {} // CHECK:STDOUT: %N.param: i32 = value_param runtime_param // CHECK:STDOUT: %N.loc4_9.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %N.patt.loc12_19.1: @.1.%T.loc12_9.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.2)] @@ -283,10 +283,10 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -310,7 +310,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] @@ -319,10 +319,10 @@ class E(U:! type) {} // CHECK:STDOUT: %U: i32 = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: i32 = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T, %U) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%T, %U) [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -347,7 +347,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %U.patt.loc12_19.1: i32 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_19.2 (constants.%U.patt)] @@ -379,10 +379,10 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12_29: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_29: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -406,7 +406,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D.1: %D.type = struct_value () [template] // CHECK:STDOUT: %D.2: type = class_type @D, @D(%T.1) [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] @@ -414,10 +414,10 @@ class E(U:! type) {} // CHECK:STDOUT: %T.2: i32 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: i32 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%T.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%T.2) [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -442,7 +442,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %T.patt.loc12_9.1: i32 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: i32 = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { @@ -468,10 +468,10 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc12_19: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_19: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -493,16 +493,16 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %E.type: type = generic_class_type @E [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %E.1: %E.type = struct_value () [template] // CHECK:STDOUT: %E.2: type = class_type @E, @E(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = class_type @.1, @.1(%U) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = class_type @.1, @.1(%U) [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -525,7 +525,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %U.patt.loc11_9.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_9.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc11_9.1, runtime_param [symbolic = %U.patt.loc11_9.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -548,10 +548,10 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc11: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.3 +// CHECK:STDOUT: .Self = constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 3a266a9951c9..2b57f29a14c2 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -25,7 +25,7 @@ class Class(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: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] // CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf, @Class(%T) [symbolic] @@ -34,12 +34,12 @@ class Class(T:! type) { // CHECK:STDOUT: %MakeClass: %MakeClass.type = struct_value () [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %Class.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic] -// CHECK:STDOUT: %.6: = specific_function %MakeClass, @MakeClass(%T) [symbolic] +// CHECK:STDOUT: %.4: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic] +// CHECK:STDOUT: %.5: = specific_function %MakeClass, @MakeClass(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -97,7 +97,7 @@ class Class(T:! type) { // CHECK:STDOUT: %return: ref @MakeClass.%Class.loc15_26.1 (%Class.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -116,7 +116,7 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @MakeSelf.%Class (%Class.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_35.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc14_35.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc14_35.2: init @MakeSelf.%Class (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: %.loc14_36: init @MakeSelf.%Class (%Class.2) = converted %.loc14_35.1, %.loc14_35.2 [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: return %.loc14_36 to %return @@ -132,7 +132,7 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> %return: @MakeClass.%Class.loc15_26.1 (%Class.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_40.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc15_40.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc15_40.2: init @MakeClass.%Class.loc15_26.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: %.loc15_41: init @MakeClass.%Class.loc15_26.1 (%Class.2) = converted %.loc15_40.1, %.loc15_40.2 [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: return %.loc15_41 to %return @@ -145,10 +145,10 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.loc17_17.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc17_17.2 (constants.%Class.2)] // CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf, @Class(%T) [symbolic = %MakeSelf.type (constants.%MakeSelf.type)] // CHECK:STDOUT: %MakeSelf: @F.%MakeSelf.type (%MakeSelf.type) = struct_value () [symbolic = %MakeSelf (constants.%MakeSelf)] -// CHECK:STDOUT: %.loc17_23.3: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic = %.loc17_23.3 (constants.%.5)] +// CHECK:STDOUT: %.loc17_23.3: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic = %.loc17_23.3 (constants.%.4)] // CHECK:STDOUT: %MakeClass.type: type = fn_type @MakeClass, @Class(%T) [symbolic = %MakeClass.type (constants.%MakeClass.type)] // CHECK:STDOUT: %MakeClass: @F.%MakeClass.type (%MakeClass.type) = struct_value () [symbolic = %MakeClass (constants.%MakeClass)] -// CHECK:STDOUT: %.loc18_19.3: = specific_function %MakeClass, @MakeClass(%T) [symbolic = %.loc18_19.3 (constants.%.6)] +// CHECK:STDOUT: %.loc18_19.3: = specific_function %MakeClass, @MakeClass(%T) [symbolic = %.loc18_19.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -159,7 +159,7 @@ class Class(T:! type) { // CHECK:STDOUT: %c: ref @F.%Class.loc17_17.2 (%Class.2) = bind_name c, %c.var // CHECK:STDOUT: %.loc17_23.1: @F.%MakeSelf.type (%MakeSelf.type) = specific_constant @Class.%MakeSelf.decl, @Class(constants.%T) [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %MakeSelf.ref: @F.%MakeSelf.type (%MakeSelf.type) = name_ref MakeSelf, %.loc17_23.1 [symbolic = %MakeSelf (constants.%MakeSelf)] -// CHECK:STDOUT: %.loc17_23.2: = specific_function %MakeSelf.ref, @MakeSelf(constants.%T) [symbolic = %.loc17_23.3 (constants.%.5)] +// CHECK:STDOUT: %.loc17_23.2: = specific_function %MakeSelf.ref, @MakeSelf(constants.%T) [symbolic = %.loc17_23.3 (constants.%.4)] // CHECK:STDOUT: %.loc17_9: ref @F.%Class.loc17_17.2 (%Class.2) = splice_block %c.var {} // CHECK:STDOUT: %MakeSelf.call: init @F.%Class.loc17_17.2 (%Class.2) = call %.loc17_23.2() to %.loc17_9 // CHECK:STDOUT: assign %c.var, %MakeSelf.call @@ -169,7 +169,7 @@ class Class(T:! type) { // CHECK:STDOUT: %s: ref @F.%Class.loc17_17.2 (%Class.2) = bind_name s, %s.var // CHECK:STDOUT: %.loc18_19.1: @F.%MakeClass.type (%MakeClass.type) = specific_constant @Class.%MakeClass.decl, @Class(constants.%T) [symbolic = %MakeClass (constants.%MakeClass)] // CHECK:STDOUT: %MakeClass.ref: @F.%MakeClass.type (%MakeClass.type) = name_ref MakeClass, %.loc18_19.1 [symbolic = %MakeClass (constants.%MakeClass)] -// CHECK:STDOUT: %.loc18_19.2: = specific_function %MakeClass.ref, @MakeClass(constants.%T) [symbolic = %.loc18_19.3 (constants.%.6)] +// CHECK:STDOUT: %.loc18_19.2: = specific_function %MakeClass.ref, @MakeClass(constants.%T) [symbolic = %.loc18_19.3 (constants.%.5)] // CHECK:STDOUT: %.loc18_9: ref @F.%Class.loc17_17.2 (%Class.2) = splice_block %s.var {} // CHECK:STDOUT: %MakeClass.call: init @F.%Class.loc17_17.2 (%Class.2) = call %.loc18_19.2() to %.loc18_9 // CHECK:STDOUT: assign %s.var, %MakeClass.call diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index 132978aa7148..1a44cfb1990f 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -21,16 +21,16 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class.2, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,15 +77,15 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.2)] +// CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.1)] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.3) [symbolic = %.loc14_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc14_1.2: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc14_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc14_1.3: = complete_type_witness @Class.%.loc14_1.2 (%.2) [symbolic = %.loc14_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.2) = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.1) = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { // CHECK:STDOUT: %self.patt: %Class.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Class.2 = value_param_pattern %self.patt, runtime_param0 @@ -100,7 +100,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %n.param.loc13: @F.%T.loc13 (%T) = value_param runtime_param1 // CHECK:STDOUT: %n.loc13: @F.%T.loc13 (%T) = bind_name n, %n.param.loc13 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.3 [symbolic = %.loc14_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc14_1.1: = complete_type_witness %.2 [symbolic = %.loc14_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -127,11 +127,11 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class => constants.%Class.2 -// CHECK:STDOUT: %.loc12_8.2 => constants.%.2 +// CHECK:STDOUT: %.loc12_8.2 => constants.%.1 // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc14_1.2 => constants.%.3 -// CHECK:STDOUT: %.loc14_1.3 => constants.%.4 +// CHECK:STDOUT: %.loc14_1.2 => constants.%.2 +// CHECK:STDOUT: %.loc14_1.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@F.%T.loc13) { diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index aa31749ffdc6..2187a43951a7 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -57,15 +57,15 @@ fn Run() { // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Field, i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Field, i32 [template] +// CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %ForwardDeclared: type = class_type @ForwardDeclared [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %ForwardDeclared [template] +// CHECK:STDOUT: %.6: type = ptr_type %ForwardDeclared [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] @@ -107,8 +107,8 @@ fn Run() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32, %.loc8_10.1 [template = i32] -// CHECK:STDOUT: %.loc8_8: %.4 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc8_8: %.3 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Field @@ -125,14 +125,14 @@ fn Run() { // CHECK:STDOUT: %self: %ForwardDeclared = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc15_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] -// CHECK:STDOUT: %.loc15_23: type = ptr_type %ForwardDeclared [template = constants.%.7] -// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param +// CHECK:STDOUT: %.loc15_23: type = ptr_type %ForwardDeclared [template = constants.%.6] +// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: @@ -148,27 +148,27 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self.param_patt: %.7](); +// CHECK:STDOUT: fn @G[addr %self.param_patt: %.6](); // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Empty: type = class_type @Empty [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %Empty = struct_value () [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] -// CHECK:STDOUT: %.5: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.8: i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.2: %Field = struct_value (%.8) [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %Field, i32 [template] -// CHECK:STDOUT: %.10: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.7: i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.2: %Field = struct_value (%.7) [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %Field, i32 [template] +// CHECK:STDOUT: %.9: i32 = int_value 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] // CHECK:STDOUT: %struct.3: %ForwardDeclared.1 = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -176,9 +176,9 @@ fn Run() { // CHECK:STDOUT: %ForwardDeclared.2: type = class_type @ForwardDeclared.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = ptr_type %ForwardDeclared.1 [template] +// CHECK:STDOUT: %.10: type = ptr_type %ForwardDeclared.1 [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.12: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.11: type = ptr_type %Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -192,7 +192,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+9, unloaded -// CHECK:STDOUT: %import_ref.7: %.9 = import_ref Main//a, inst+22, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.7: %.8 = import_ref Main//a, inst+22, loaded [template = %.1] // CHECK:STDOUT: %import_ref.8 = import_ref Main//a, inst+27, unloaded // CHECK:STDOUT: %import_ref.9: %F.type = import_ref Main//a, inst+34, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.10: %G.type = import_ref Main//a, inst+45, loaded [template = constants.%G] @@ -247,29 +247,29 @@ fn Run() { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%Empty] // CHECK:STDOUT: %a.var: ref %Empty = var a // CHECK:STDOUT: %a: ref %Empty = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_19.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc7_19.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc7_19.2: init %Empty = class_init (), %a.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_20: init %Empty = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%struct.1] // CHECK:STDOUT: assign %a.var, %.loc7_20 // CHECK:STDOUT: %Field.ref: type = name_ref Field, imports.%import_ref.2 [template = constants.%Field] // CHECK:STDOUT: %b.var: ref %Field = var b // CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var -// CHECK:STDOUT: %.loc9_24: i32 = int_value 1 [template = constants.%.8] -// CHECK:STDOUT: %.loc9_25.1: %.5 = struct_literal (%.loc9_24) +// CHECK:STDOUT: %.loc9_24: i32 = int_value 1 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_25.1: %.4 = struct_literal (%.loc9_24) // CHECK:STDOUT: %.loc9_25.2: ref i32 = class_element_access %b.var, element0 -// CHECK:STDOUT: %.loc9_25.3: init i32 = initialize_from %.loc9_24 to %.loc9_25.2 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_25.3: init i32 = initialize_from %.loc9_24 to %.loc9_25.2 [template = constants.%.7] // CHECK:STDOUT: %.loc9_25.4: init %Field = class_init (%.loc9_25.3), %b.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc9_26: init %Field = converted %.loc9_25.1, %.loc9_25.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %b.var, %.loc9_26 // CHECK:STDOUT: %b.ref: ref %Field = name_ref b, %b -// CHECK:STDOUT: %x.ref: %.9 = name_ref x, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %.8 = name_ref x, imports.%import_ref.7 [template = imports.%.1] // CHECK:STDOUT: %.loc10_4: ref i32 = class_element_access %b.ref, element0 -// CHECK:STDOUT: %.loc10_9: i32 = int_value 2 [template = constants.%.10] +// CHECK:STDOUT: %.loc10_9: i32 = int_value 2 [template = constants.%.9] // CHECK:STDOUT: assign %.loc10_4, %.loc10_9 // CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %c.var: ref %ForwardDeclared.1 = var c // CHECK:STDOUT: %c: ref %ForwardDeclared.1 = bind_name c, %c.var -// CHECK:STDOUT: %.loc12_29.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc12_29.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc12_29.2: init %ForwardDeclared.1 = class_init (), %c.var [template = constants.%struct.3] // CHECK:STDOUT: %.loc12_30: init %ForwardDeclared.1 = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%struct.3] // CHECK:STDOUT: assign %c.var, %.loc12_30 @@ -277,27 +277,27 @@ fn Run() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.9 [template = constants.%F] // CHECK:STDOUT: %.loc13_4: = bound_method %c.ref.loc13, %F.ref // CHECK:STDOUT: %.loc13_3: %ForwardDeclared.1 = bind_value %c.ref.loc13 -// CHECK:STDOUT: %F.call: init %.1 = call %.loc13_4(%.loc13_3) +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4(%.loc13_3) // CHECK:STDOUT: %c.ref.loc14: ref %ForwardDeclared.1 = name_ref c, %c // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.10 [template = constants.%G] // CHECK:STDOUT: %.loc14_4: = bound_method %c.ref.loc14, %G.ref -// CHECK:STDOUT: %.loc14_3: %.11 = addr_of %c.ref.loc14 -// CHECK:STDOUT: %G.call: init %.1 = call %.loc14_4(%.loc14_3) +// CHECK:STDOUT: %.loc14_3: %.10 = addr_of %c.ref.loc14 +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc14_4(%.loc14_3) // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] -// CHECK:STDOUT: %.loc16_25: type = ptr_type %ForwardDeclared.1 [template = constants.%.11] -// CHECK:STDOUT: %d.var: ref %.11 = var d -// CHECK:STDOUT: %d: ref %.11 = bind_name d, %d.var +// CHECK:STDOUT: %.loc16_25: type = ptr_type %ForwardDeclared.1 [template = constants.%.10] +// CHECK:STDOUT: %d.var: ref %.10 = var d +// CHECK:STDOUT: %d: ref %.10 = bind_name d, %d.var // CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %.loc16_29: %.11 = addr_of %c.ref.loc16 +// CHECK:STDOUT: %.loc16_29: %.10 = addr_of %c.ref.loc16 // CHECK:STDOUT: assign %d.var, %.loc16_29 // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%import_ref.4 [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc18: type = ptr_type %Incomplete [template = constants.%.12] -// CHECK:STDOUT: %e.var: ref %.12 = var e -// CHECK:STDOUT: %e: ref %.12 = bind_name e, %e.var +// CHECK:STDOUT: %.loc18: type = ptr_type %Incomplete [template = constants.%.11] +// CHECK:STDOUT: %e.var: ref %.11 = var e +// CHECK:STDOUT: %e: ref %.11 = bind_name e, %e.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr .inst+91: %.11](); +// CHECK:STDOUT: fn @G[addr .inst+91: %.10](); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index b918a44e2c12..e5affd0b4c66 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -41,20 +41,20 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Unused.type: type = fn_type @Unused [template] // CHECK:STDOUT: %Unused: %Unused.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32, .unused: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32, .unused: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Child: type = class_type @Child [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Child, %Base [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Child, %Base [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -97,12 +97,12 @@ fn Run() { // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32.loc8, %.loc8_10.1 [template = i32] -// CHECK:STDOUT: %.loc8_8: %.2 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc8_8: %.1 = field_decl x, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_32.loc9, %.loc9_15.1 [template = i32] -// CHECK:STDOUT: %.loc9_13: %.2 = field_decl unused, element1 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_13: %.1 = field_decl unused, element1 [template] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -114,8 +114,8 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @Child { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc13: %.6 = base_decl %Base, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc13: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Child @@ -133,25 +133,25 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Child: type = class_type @Child [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: i32, .unused: i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Child, %Base [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %.7} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.10: i32 = int_value 0 [template] -// CHECK:STDOUT: %.11: i32 = int_value 1 [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: %.2} [template] -// CHECK:STDOUT: %struct.1: %Base = struct_value (%.10, %.11) [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: i32, .unused: i32} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Child, %Base [template] +// CHECK:STDOUT: %.4: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %.6} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.9: i32 = int_value 0 [template] +// CHECK:STDOUT: %.10: i32 = int_value 1 [template] +// CHECK:STDOUT: %.11: type = struct_type {.base: %.1} [template] +// CHECK:STDOUT: %struct.1: %Base = struct_value (%.9, %.10) [template] // CHECK:STDOUT: %struct.2: %Child = struct_value (%struct.1) [template] -// CHECK:STDOUT: %.13: type = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.14: i32 = int_value 2 [template] +// CHECK:STDOUT: %.12: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.13: i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -166,7 +166,7 @@ fn Run() { // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Main//a, inst+10, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+19, unloaded -// CHECK:STDOUT: %import_ref.6: %.13 = import_ref Main//a, inst+33, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.6: %.12 = import_ref Main//a, inst+33, loaded [template = %.1] // CHECK:STDOUT: %import_ref.7 = import_ref Main//a, inst+37, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//a, inst+42, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//a, inst+46, unloaded @@ -205,26 +205,26 @@ fn Run() { // CHECK:STDOUT: %Child.ref: type = name_ref Child, imports.%import_ref.2 [template = constants.%Child] // CHECK:STDOUT: %a.var: ref %Child = var a // CHECK:STDOUT: %a: ref %Child = bind_name a, %a.var -// CHECK:STDOUT: %.loc7_33: i32 = int_value 0 [template = constants.%.10] -// CHECK:STDOUT: %.loc7_46: i32 = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc7_47.1: %.2 = struct_literal (%.loc7_33, %.loc7_46) -// CHECK:STDOUT: %.loc7_48.1: %.12 = struct_literal (%.loc7_47.1) +// CHECK:STDOUT: %.loc7_33: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc7_46: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc7_47.1: %.1 = struct_literal (%.loc7_33, %.loc7_46) +// CHECK:STDOUT: %.loc7_48.1: %.11 = struct_literal (%.loc7_47.1) // CHECK:STDOUT: %.loc7_48.2: ref %Base = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc7_47.2: ref i32 = class_element_access %.loc7_48.2, element0 -// CHECK:STDOUT: %.loc7_47.3: init i32 = initialize_from %.loc7_33 to %.loc7_47.2 [template = constants.%.10] +// CHECK:STDOUT: %.loc7_47.3: init i32 = initialize_from %.loc7_33 to %.loc7_47.2 [template = constants.%.9] // CHECK:STDOUT: %.loc7_47.4: ref i32 = class_element_access %.loc7_48.2, element1 -// CHECK:STDOUT: %.loc7_47.5: init i32 = initialize_from %.loc7_46 to %.loc7_47.4 [template = constants.%.11] +// CHECK:STDOUT: %.loc7_47.5: init i32 = initialize_from %.loc7_46 to %.loc7_47.4 [template = constants.%.10] // CHECK:STDOUT: %.loc7_47.6: init %Base = class_init (%.loc7_47.3, %.loc7_47.5), %.loc7_48.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_48.3: init %Base = converted %.loc7_47.1, %.loc7_47.6 [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_48.4: init %Child = class_init (%.loc7_48.3), %a.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc7_49: init %Child = converted %.loc7_48.1, %.loc7_48.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %a.var, %.loc7_49 // CHECK:STDOUT: %a.ref.loc8: ref %Child = name_ref a, %a -// CHECK:STDOUT: %x.ref: %.13 = name_ref x, imports.%import_ref.6 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %.12 = name_ref x, imports.%import_ref.6 [template = imports.%.1] // CHECK:STDOUT: %.loc8_4.1: ref %Base = class_element_access %a.ref.loc8, element0 // CHECK:STDOUT: %.loc8_4.2: ref %Base = converted %a.ref.loc8, %.loc8_4.1 // CHECK:STDOUT: %.loc8_4.3: ref i32 = class_element_access %.loc8_4.2, element0 -// CHECK:STDOUT: %.loc8_9: i32 = int_value 2 [template = constants.%.14] +// CHECK:STDOUT: %.loc8_9: i32 = int_value 2 [template = constants.%.13] // CHECK:STDOUT: assign %.loc8_4.3, %.loc8_9 // CHECK:STDOUT: %a.ref.loc9: ref %Child = name_ref a, %a // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] @@ -232,7 +232,7 @@ fn Run() { // CHECK:STDOUT: %.loc9_3.1: ref %Base = class_element_access %a.ref.loc9, element0 // CHECK:STDOUT: %.loc9_3.2: ref %Base = converted %a.ref.loc9, %.loc9_3.1 // CHECK:STDOUT: %.loc9_3.3: %Base = bind_value %.loc9_3.2 -// CHECK:STDOUT: %F.call: init %.1 = call %.loc9_4(%.loc9_3.3) +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc9_4(%.loc9_3.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_indirect.carbon b/toolchain/check/testdata/class/import_indirect.carbon index ad56f0275d6a..9729f0838783 100644 --- a/toolchain/check/testdata/class/import_indirect.carbon +++ b/toolchain/check/testdata/class/import_indirect.carbon @@ -137,10 +137,10 @@ var ptr: E* = &val; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -168,9 +168,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %b_val.var: ref %C = var b_val // CHECK:STDOUT: %b_val: ref %C = bind_name b_val, %b_val.var // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %.loc9: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %b_ptr.var: ref %.5 = var b_ptr -// CHECK:STDOUT: %b_ptr: ref %.5 = bind_name b_ptr, %b_ptr.var +// CHECK:STDOUT: %.loc9: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %b_ptr.var: ref %.4 = var b_ptr +// CHECK:STDOUT: %b_ptr: ref %.4 = bind_name b_ptr, %b_ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -185,7 +185,7 @@ var ptr: E* = &val; // CHECK:STDOUT: %.loc8_18: init %C = converted %.loc8_17.1, %.loc8_17.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%b_val.var, %.loc8_18 // CHECK:STDOUT: %b_val.ref: ref %C = name_ref b_val, file.%b_val -// CHECK:STDOUT: %.loc9: %.5 = addr_of %b_val.ref +// CHECK:STDOUT: %.loc9: %.4 = addr_of %b_val.ref // CHECK:STDOUT: assign file.%b_ptr.var, %.loc9 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -196,10 +196,10 @@ var ptr: E* = &val; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -227,9 +227,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %c_val.var: ref %C = var c_val // CHECK:STDOUT: %c_val: ref %C = bind_name c_val, %c_val.var // CHECK:STDOUT: %E.ref: type = name_ref E, %E [template = constants.%C] -// CHECK:STDOUT: %.loc9: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %c_ptr.var: ref %.5 = var c_ptr -// CHECK:STDOUT: %c_ptr: ref %.5 = bind_name c_ptr, %c_ptr.var +// CHECK:STDOUT: %.loc9: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %c_ptr.var: ref %.4 = var c_ptr +// CHECK:STDOUT: %c_ptr: ref %.4 = bind_name c_ptr, %c_ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -244,7 +244,7 @@ var ptr: E* = &val; // CHECK:STDOUT: %.loc8_18: init %C = converted %.loc8_17.1, %.loc8_17.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c_val.var, %.loc8_18 // CHECK:STDOUT: %c_val.ref: ref %C = name_ref c_val, file.%c_val -// CHECK:STDOUT: %.loc9: %.5 = addr_of %c_val.ref +// CHECK:STDOUT: %.loc9: %.4 = addr_of %c_val.ref // CHECK:STDOUT: assign file.%c_ptr.var, %.loc9 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -255,10 +255,10 @@ var ptr: E* = &val; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -289,9 +289,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %ptr.var: ref %.5 = var ptr -// CHECK:STDOUT: %ptr: ref %.5 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr +// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -306,7 +306,7 @@ var ptr: E* = &val; // CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val -// CHECK:STDOUT: %.loc8: %.5 = addr_of %val.ref +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -317,10 +317,10 @@ var ptr: E* = &val; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -351,9 +351,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %ptr.var: ref %.5 = var ptr -// CHECK:STDOUT: %ptr: ref %.5 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr +// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -368,7 +368,7 @@ var ptr: E* = &val; // CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val -// CHECK:STDOUT: %.loc8: %.5 = addr_of %val.ref +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -379,10 +379,10 @@ var ptr: E* = &val; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -417,9 +417,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %E.ref: type = name_ref E, imports.%import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %ptr.var: ref %.5 = var ptr -// CHECK:STDOUT: %ptr: ref %.5 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr +// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -434,7 +434,7 @@ var ptr: E* = &val; // CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val -// CHECK:STDOUT: %.loc8: %.5 = addr_of %val.ref +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -445,10 +445,10 @@ var ptr: E* = &val; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -483,9 +483,9 @@ var ptr: E* = &val; // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var // CHECK:STDOUT: %E.ref: type = name_ref E, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.5] -// CHECK:STDOUT: %ptr.var: ref %.5 = var ptr -// CHECK:STDOUT: %ptr: ref %.5 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %ptr.var: ref %.4 = var ptr +// CHECK:STDOUT: %ptr: ref %.4 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -500,7 +500,7 @@ var ptr: E* = &val; // CHECK:STDOUT: %.loc7_16: init %C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%val.var, %.loc7_16 // CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val -// CHECK:STDOUT: %.loc8: %.5 = addr_of %val.ref +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index dbe3f325ee8a..9c5dd2ba0052 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -67,12 +67,12 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] -// CHECK:STDOUT: %.2: type = ptr_type %Cycle [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: %.2} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: %.1} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -105,9 +105,9 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, imports.%import_ref.1 [template = constants.%Cycle] -// CHECK:STDOUT: %.loc7: type = ptr_type %Cycle [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref %.2 = var a -// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var +// CHECK:STDOUT: %.loc7: type = ptr_type %Cycle [template = constants.%.1] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_struct_cyle.carbon b/toolchain/check/testdata/class/import_struct_cyle.carbon index fe2d248b9acf..efc4bd45f8d1 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -81,26 +81,26 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] -// CHECK:STDOUT: %.2: type = ptr_type %Cycle [template] -// CHECK:STDOUT: %.3: type = struct_type {.b: %.2} [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: %.3} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %Cycle, %.3 [template] +// CHECK:STDOUT: %.1: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %.2: type = struct_type {.b: %.1} [template] +// CHECK:STDOUT: %.3: type = struct_type {.c: %.2} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %Cycle, %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//a, inst+3, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.3 = import_ref Main//a, inst+11, loaded +// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref Main//a, inst+11, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+4, unloaded -// CHECK:STDOUT: %import_ref.4: %.7 = import_ref Main//a, inst+17, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.4: %.6 = import_ref Main//a, inst+17, loaded [template = %.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,16 +123,16 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref.loc7_3: ref %.3 = name_ref a, imports.%import_ref.2 -// CHECK:STDOUT: %.loc7_4: ref %.2 = struct_access %a.ref.loc7_3, element0 -// CHECK:STDOUT: %a.ref.loc7_11: ref %.3 = name_ref a, imports.%import_ref.2 -// CHECK:STDOUT: %.loc7_12.1: ref %.2 = struct_access %a.ref.loc7_11, element0 -// CHECK:STDOUT: %.loc7_12.2: %.2 = bind_value %.loc7_12.1 +// CHECK:STDOUT: %a.ref.loc7_3: ref %.2 = name_ref a, imports.%import_ref.2 +// CHECK:STDOUT: %.loc7_4: ref %.1 = struct_access %a.ref.loc7_3, element0 +// CHECK:STDOUT: %a.ref.loc7_11: ref %.2 = name_ref a, imports.%import_ref.2 +// CHECK:STDOUT: %.loc7_12.1: ref %.1 = struct_access %a.ref.loc7_11, element0 +// CHECK:STDOUT: %.loc7_12.2: %.1 = bind_value %.loc7_12.1 // CHECK:STDOUT: %.loc7_10: ref %Cycle = deref %.loc7_12.2 -// CHECK:STDOUT: %c.ref: %.7 = name_ref c, imports.%import_ref.4 [template = imports.%.1] -// CHECK:STDOUT: %.loc7_15: ref %.3 = class_element_access %.loc7_10, element0 -// CHECK:STDOUT: %.loc7_17.1: ref %.2 = struct_access %.loc7_15, element0 -// CHECK:STDOUT: %.loc7_17.2: %.2 = bind_value %.loc7_17.1 +// CHECK:STDOUT: %c.ref: %.6 = name_ref c, imports.%import_ref.4 [template = imports.%.1] +// CHECK:STDOUT: %.loc7_15: ref %.2 = class_element_access %.loc7_10, element0 +// CHECK:STDOUT: %.loc7_17.1: ref %.1 = struct_access %.loc7_15, element0 +// CHECK:STDOUT: %.loc7_17.2: %.1 = bind_value %.loc7_17.1 // CHECK:STDOUT: assign %.loc7_4, %.loc7_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 4962f76521bb..043f43470a33 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -231,23 +231,23 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Shape: type = class_type @Shape [template] // 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 = unbound_element_type %Shape, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Shape, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Circle: type = class_type @Circle [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Circle, %Shape [template] -// CHECK:STDOUT: %.7: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Circle, %Shape [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %GetPosition.type: type = fn_type @GetPosition [template] // CHECK:STDOUT: %GetPosition: %GetPosition.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %Shape} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.13: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Shape} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -274,12 +274,12 @@ class B { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_32.loc5, %.loc5_20.1 [template = i32] -// CHECK:STDOUT: %.loc5_18: %.2 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_18: %.1 = field_decl x, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_20.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_20.2: type = converted %int.make_type_32.loc6, %.loc6_20.1 [template = i32] -// CHECK:STDOUT: %.loc6_18: %.2 = field_decl y, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_18: %.1 = field_decl y, element1 [template] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Shape @@ -289,28 +289,28 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { // CHECK:STDOUT: %Shape.ref: type = name_ref Shape, file.%Shape.decl [template = constants.%Shape] -// CHECK:STDOUT: %.loc10: %.6 = base_decl %Shape, element0 [template] +// CHECK:STDOUT: %.loc10: %.5 = base_decl %Shape, element0 [template] // CHECK:STDOUT: %GetPosition.decl: %GetPosition.type = fn_decl @GetPosition [template = constants.%GetPosition] { // CHECK:STDOUT: %self.patt: %Circle = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Circle = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.8 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.8 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // CHECK:STDOUT: %int.make_type_32.loc12_36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_41: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_44.1: %.7 = tuple_literal (%int.make_type_32.loc12_36, %int.make_type_32.loc12_41) +// CHECK:STDOUT: %.loc12_44.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12_36, %int.make_type_32.loc12_41) // CHECK:STDOUT: %.loc12_44.2: type = value_of_initializer %int.make_type_32.loc12_36 [template = i32] // CHECK:STDOUT: %.loc12_44.3: type = converted %int.make_type_32.loc12_36, %.loc12_44.2 [template = i32] // CHECK:STDOUT: %.loc12_44.4: type = value_of_initializer %int.make_type_32.loc12_41 [template = i32] // CHECK:STDOUT: %.loc12_44.5: type = converted %int.make_type_32.loc12_41, %.loc12_44.4 [template = i32] -// CHECK:STDOUT: %.loc12_44.6: type = converted %.loc12_44.1, constants.%.8 [template = constants.%.8] +// CHECK:STDOUT: %.loc12_44.6: type = converted %.loc12_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %.8 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.8 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -321,27 +321,27 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @GetPosition[%self.param_patt: %Circle]() -> %return: %.8 { +// CHECK:STDOUT: fn @GetPosition[%self.param_patt: %Circle]() -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc13_13: %Circle = name_ref self, %self -// CHECK:STDOUT: %x.ref: %.2 = name_ref x, @Shape.%.loc5_18 [template = @Shape.%.loc5_18] +// CHECK:STDOUT: %x.ref: %.1 = name_ref x, @Shape.%.loc5_18 [template = @Shape.%.loc5_18] // CHECK:STDOUT: %.loc13_17.1: ref %Shape = class_element_access %self.ref.loc13_13, element0 // CHECK:STDOUT: %.loc13_17.2: ref %Shape = converted %self.ref.loc13_13, %.loc13_17.1 // CHECK:STDOUT: %.loc13_17.3: ref i32 = class_element_access %.loc13_17.2, element0 // CHECK:STDOUT: %self.ref.loc13_21: %Circle = name_ref self, %self -// CHECK:STDOUT: %y.ref: %.2 = name_ref y, @Shape.%.loc6_18 [template = @Shape.%.loc6_18] +// CHECK:STDOUT: %y.ref: %.1 = name_ref y, @Shape.%.loc6_18 [template = @Shape.%.loc6_18] // CHECK:STDOUT: %.loc13_25.1: ref %Shape = class_element_access %self.ref.loc13_21, element0 // CHECK:STDOUT: %.loc13_25.2: ref %Shape = converted %self.ref.loc13_21, %.loc13_25.1 // CHECK:STDOUT: %.loc13_25.3: ref i32 = class_element_access %.loc13_25.2, element1 -// CHECK:STDOUT: %.loc13_27.1: %.8 = tuple_literal (%.loc13_17.3, %.loc13_25.3) +// CHECK:STDOUT: %.loc13_27.1: %tuple.type.2 = tuple_literal (%.loc13_17.3, %.loc13_25.3) // CHECK:STDOUT: %.loc13_17.4: i32 = bind_value %.loc13_17.3 // CHECK:STDOUT: %.loc13_27.2: ref i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc13_27.3: init i32 = initialize_from %.loc13_17.4 to %.loc13_27.2 // CHECK:STDOUT: %.loc13_25.4: i32 = bind_value %.loc13_25.3 // CHECK:STDOUT: %.loc13_27.4: ref i32 = tuple_access %return, element1 // CHECK:STDOUT: %.loc13_27.5: init i32 = initialize_from %.loc13_25.4 to %.loc13_27.4 -// CHECK:STDOUT: %.loc13_27.6: init %.8 = tuple_init (%.loc13_27.3, %.loc13_27.5) to %return -// CHECK:STDOUT: %.loc13_28: init %.8 = converted %.loc13_27.1, %.loc13_27.6 +// CHECK:STDOUT: %.loc13_27.6: init %tuple.type.2 = tuple_init (%.loc13_27.3, %.loc13_27.5) to %return +// CHECK:STDOUT: %.loc13_28: init %tuple.type.2 = converted %.loc13_27.1, %.loc13_27.6 // CHECK:STDOUT: return %.loc13_28 to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -350,30 +350,30 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.10: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %.3} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.9: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: %.9} [template] -// CHECK:STDOUT: %.14: type = ptr_type %.11 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.11: = complete_type_witness %.10 [template] +// CHECK:STDOUT: %.12: type = struct_type {.base: %.8} [template] +// CHECK:STDOUT: %.13: type = ptr_type %.10 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -400,7 +400,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -409,7 +409,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: %.5 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc9: %.4 = base_decl %A, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param0 @@ -420,7 +420,7 @@ class B { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -431,22 +431,22 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc14: %.10 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc14: %.9 = base_decl %B, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc15_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_26.2: type = converted %.loc15_26.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_26.2: type = converted %.loc15_26.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 // CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.11 [template = constants.%.12] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.10 [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -461,15 +461,15 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[%self.param_patt: %C]() -> %.1 { +// CHECK:STDOUT: fn @G[%self.param_patt: %C]() -> %empty_tuple.type { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %C = name_ref self, %self // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @A.%F.decl [template = constants.%F.1] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() -// CHECK:STDOUT: %.loc15_43.1: ref %.1 = temporary_storage -// CHECK:STDOUT: %.loc15_43.2: ref %.1 = temporary %.loc15_43.1, %F.call -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_45: %.1 = converted %F.call, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() +// CHECK:STDOUT: %.loc15_43.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc15_43.2: ref %empty_tuple.type = temporary %.loc15_43.1, %F.call +// CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_45: %empty_tuple.type = converted %F.call, %tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc15_45 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -478,22 +478,22 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] // CHECK:STDOUT: %SomeProtectedFunction.type: type = fn_type @SomeProtectedFunction [template] // CHECK:STDOUT: %SomeProtectedFunction: %SomeProtectedFunction.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -520,7 +520,7 @@ class B { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_32.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_32.2: type = converted %int.make_type_32, %.loc5_32.1 [template = i32] -// CHECK:STDOUT: %.loc5_38: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_38: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %SOME_CONSTANT: i32 = bind_name SOME_CONSTANT, %.loc5_38 // CHECK:STDOUT: %SomeProtectedFunction.decl: %SomeProtectedFunction.type = fn_decl @SomeProtectedFunction [template = constants.%SomeProtectedFunction] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern @@ -532,7 +532,7 @@ class B { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -542,7 +542,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc12: %.6 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc12: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param0 @@ -563,7 +563,7 @@ class B { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -577,7 +577,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeProtectedFunction() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc7: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: return %.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -603,20 +603,20 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Shape: type = class_type @Shape [template] // 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 = unbound_element_type %Shape, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.y: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Shape, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.y: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Square: type = class_type @Square [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Square, %Shape [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Square, %Shape [template] // CHECK:STDOUT: %GetPosition.type: type = fn_type @GetPosition [template] // CHECK:STDOUT: %GetPosition: %GetPosition.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %Shape} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Shape} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -643,8 +643,8 @@ class B { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_32, %.loc5_18.1 [template = i32] -// CHECK:STDOUT: %.loc5_16: %.2 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_16: %.1 = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Shape @@ -653,7 +653,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @Square { // CHECK:STDOUT: %Shape.ref: type = name_ref Shape, file.%Shape.decl [template = constants.%Shape] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %Shape, element0 [template] +// CHECK:STDOUT: %.loc9: %.5 = base_decl %Shape, element0 [template] // CHECK:STDOUT: %GetPosition.decl: %GetPosition.type = fn_decl @GetPosition [template = constants.%GetPosition] { // CHECK:STDOUT: %self.patt: %Square = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Square = value_param_pattern %self.patt, runtime_param0 @@ -669,7 +669,7 @@ class B { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Square @@ -692,13 +692,13 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -720,7 +720,7 @@ class B { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -737,7 +737,7 @@ class B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @C.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -746,13 +746,13 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -774,7 +774,7 @@ class B { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -791,7 +791,7 @@ class B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @C.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -800,19 +800,19 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %.3} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -835,7 +835,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -844,9 +844,9 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc9: %.5 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc9: %.4 = base_decl %B, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc18: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -872,19 +872,19 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %.3} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -907,7 +907,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -916,9 +916,9 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc9: %.5 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc9: %.4 = base_decl %B, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -936,7 +936,7 @@ class B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @B.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -945,23 +945,23 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 5 [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Internal: type = class_type @Internal [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %Internal [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %Internal [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %SomeFunc.type: type = fn_type @SomeFunc [template] // CHECK:STDOUT: %SomeFunc: %SomeFunc.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.internal: %Internal} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = struct_type {.internal: %.5} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.6: type = struct_type {.internal: %Internal} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = struct_type {.internal: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -990,14 +990,14 @@ class B { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_42.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_42.2: type = converted %int.make_type_32.loc5, %.loc5_42.1 [template = i32] -// CHECK:STDOUT: %.loc5_48: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_48: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %SOME_PROTECTED_CONSTANT: i32 = bind_name SOME_PROTECTED_CONSTANT, %.loc5_48 // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_38.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_38.2: type = converted %int.make_type_32.loc6, %.loc6_38.1 [template = i32] -// CHECK:STDOUT: %.loc6_44: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_44: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %SOME_PRIVATE_CONSTANT: i32 = bind_name SOME_PRIVATE_CONSTANT, %.loc6_44 -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -1009,9 +1009,9 @@ class B { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_36.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_36.2: type = converted %int.make_type_32, %.loc10_36.1 [template = i32] -// CHECK:STDOUT: %.loc10_42: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_42: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %INTERNAL_CONSTANT: i32 = bind_name INTERNAL_CONSTANT, %.loc10_42 -// CHECK:STDOUT: %.loc11: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Internal @@ -1020,7 +1020,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %Internal.ref: type = name_ref Internal, file.%Internal.decl [template = constants.%Internal] -// CHECK:STDOUT: %.loc14: %.6 = field_decl internal, element0 [template] +// CHECK:STDOUT: %.loc14: %.5 = field_decl internal, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param0 @@ -1046,7 +1046,7 @@ class B { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc46: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc46: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1069,7 +1069,7 @@ class B { // CHECK:STDOUT: fn @SomeFunc[%self.param_patt: %B]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %B = name_ref self, %self -// CHECK:STDOUT: %internal.ref: %.6 = name_ref internal, @B.%.loc14 [template = @B.%.loc14] +// CHECK:STDOUT: %internal.ref: %.5 = name_ref internal, @B.%.loc14 [template = @B.%.loc14] // CHECK:STDOUT: %.loc44_16.1: ref %Internal = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc44_16.2: %Internal = bind_value %.loc44_16.1 // CHECK:STDOUT: %INTERNAL_CONSTANT.ref: = name_ref INTERNAL_CONSTANT, [template = ] @@ -1081,20 +1081,20 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1121,8 +1121,8 @@ class B { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_32, %.loc5_18.1 [template = i32] -// CHECK:STDOUT: %.loc5_16: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_16: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -1131,7 +1131,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc9: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %B = binding_pattern self // CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 @@ -1140,7 +1140,7 @@ class B { // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1164,20 +1164,20 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // 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 = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1204,8 +1204,8 @@ class B { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_32, %.loc5_20.1 [template = i32] -// CHECK:STDOUT: %.loc5_18: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_18: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -1214,7 +1214,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9: %.6 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc9: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %B = binding_pattern self // CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 @@ -1223,7 +1223,7 @@ class B { // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1238,7 +1238,7 @@ class B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %B = name_ref self, %self // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %x.ref: %.2 = name_ref x, @A.%.loc5_18 [template = @A.%.loc5_18] +// CHECK:STDOUT: %x.ref: %.1 = name_ref x, @A.%.loc5_18 [template = @A.%.loc5_18] // CHECK:STDOUT: %.loc12_9.1: ref %A = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_9.2: ref %A = converted %self.ref, %.loc12_9.1 // CHECK:STDOUT: %.loc12_9.3: ref i32 = class_element_access %.loc12_9.2, element0 diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index 2e3ca575a314..cdd3bf27f398 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -26,19 +26,19 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Class [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %Class, %.3 [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: i32, .next: %.3} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %Class [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Class, %.2 [template] +// CHECK:STDOUT: %.4: type = struct_type {.n: i32, .next: %.2} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: %MakeReorder.type: type = fn_type @MakeReorder [template] // CHECK:STDOUT: %MakeReorder: %MakeReorder.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.next: %.3, .n: i32} [template] +// CHECK:STDOUT: %.7: type = struct_type {.next: %.2, .n: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,8 +62,8 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %n.patt: i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: i32 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %next.patt: %.3 = binding_pattern next -// CHECK:STDOUT: %next.param_patt: %.3 = value_param_pattern %next.patt, runtime_param1 +// CHECK:STDOUT: %next.patt: %.2 = binding_pattern next +// CHECK:STDOUT: %next.param_patt: %.2 = value_param_pattern %next.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { @@ -71,20 +71,20 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_32, %.loc16_12.1 [template = i32] // CHECK:STDOUT: %Class.ref.loc16_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16_28: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %.loc16_28: type = ptr_type %Class [template = constants.%.2] // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %n.param: i32 = value_param runtime_param0 // CHECK:STDOUT: %n: i32 = bind_name n, %n.param -// CHECK:STDOUT: %next.param: %.3 = value_param runtime_param1 -// CHECK:STDOUT: %next: %.3 = bind_name next, %next.param +// CHECK:STDOUT: %next.param: %.2 = value_param runtime_param1 +// CHECK:STDOUT: %next: %.2 = bind_name next, %next.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param2 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MakeReorder.decl: %MakeReorder.type = fn_decl @MakeReorder [template = constants.%MakeReorder] { // CHECK:STDOUT: %n.patt: i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: i32 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %next.patt: %.3 = binding_pattern next -// CHECK:STDOUT: %next.param_patt: %.3 = value_param_pattern %next.patt, runtime_param1 +// CHECK:STDOUT: %next.patt: %.2 = binding_pattern next +// CHECK:STDOUT: %next.param_patt: %.2 = value_param_pattern %next.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { @@ -92,12 +92,12 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_32, %.loc20_19.1 [template = i32] // CHECK:STDOUT: %Class.ref.loc20_30: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc20_35: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %.loc20_35: type = ptr_type %Class [template = constants.%.2] // CHECK:STDOUT: %Class.ref.loc20_41: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %n.param: i32 = value_param runtime_param0 // CHECK:STDOUT: %n: i32 = bind_name n, %n.param -// CHECK:STDOUT: %next.param: %.3 = value_param runtime_param1 -// CHECK:STDOUT: %next: %.3 = bind_name next, %next.param +// CHECK:STDOUT: %next.param: %.2 = value_param runtime_param1 +// CHECK:STDOUT: %next: %.2 = bind_name next, %next.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param2 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } @@ -107,11 +107,11 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl n, element0 [template] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc13_18: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %.loc13_11: %.4 = field_decl next, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_18: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc13_11: %.3 = field_decl next, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -121,29 +121,29 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make(%n.param_patt: i32, %next.param_patt: %.3) -> %return: %Class { +// CHECK:STDOUT: fn @Make(%n.param_patt: i32, %next.param_patt: %.2) -> %return: %Class { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %next.ref: %.3 = name_ref next, %next -// CHECK:STDOUT: %.loc17_31.1: %.5 = struct_literal (%n.ref, %next.ref) +// CHECK:STDOUT: %next.ref: %.2 = name_ref next, %next +// CHECK:STDOUT: %.loc17_31.1: %.4 = struct_literal (%n.ref, %next.ref) // CHECK:STDOUT: %.loc17_31.2: ref i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc17_31.3: init i32 = initialize_from %n.ref to %.loc17_31.2 -// CHECK:STDOUT: %.loc17_31.4: ref %.3 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc17_31.5: init %.3 = initialize_from %next.ref to %.loc17_31.4 +// CHECK:STDOUT: %.loc17_31.4: ref %.2 = class_element_access %return, element1 +// CHECK:STDOUT: %.loc17_31.5: init %.2 = initialize_from %next.ref to %.loc17_31.4 // CHECK:STDOUT: %.loc17_31.6: init %Class = class_init (%.loc17_31.3, %.loc17_31.5), %return // CHECK:STDOUT: %.loc17_32: init %Class = converted %.loc17_31.1, %.loc17_31.6 // CHECK:STDOUT: return %.loc17_32 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeReorder(%n.param_patt: i32, %next.param_patt: %.3) -> %return: %Class { +// CHECK:STDOUT: fn @MakeReorder(%n.param_patt: i32, %next.param_patt: %.2) -> %return: %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %next.ref: %.3 = name_ref next, %next +// CHECK:STDOUT: %next.ref: %.2 = name_ref next, %next // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %.loc21_31.1: %.8 = struct_literal (%next.ref, %n.ref) +// CHECK:STDOUT: %.loc21_31.1: %.7 = struct_literal (%next.ref, %n.ref) // CHECK:STDOUT: %.loc21_31.2: ref i32 = class_element_access %return, element1 // CHECK:STDOUT: %.loc21_31.3: init i32 = initialize_from %n.ref to %.loc21_31.2 -// CHECK:STDOUT: %.loc21_31.4: ref %.3 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc21_31.5: init %.3 = initialize_from %next.ref to %.loc21_31.4 +// CHECK:STDOUT: %.loc21_31.4: ref %.2 = class_element_access %return, element0 +// CHECK:STDOUT: %.loc21_31.5: init %.2 = initialize_from %next.ref to %.loc21_31.4 // CHECK:STDOUT: %.loc21_31.6: init %Class = class_init (%.loc21_31.3, %.loc21_31.5), %return // CHECK:STDOUT: %.loc21_32: init %Class = converted %.loc21_31.1, %.loc21_31.6 // CHECK:STDOUT: return %.loc21_32 to %return diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 88aaefa4e4f7..16164c450cd3 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -96,17 +96,17 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // 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 = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %C [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.7, %.8) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %C [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.6, %.7) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -169,12 +169,12 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -185,7 +185,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: class @AdaptC { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: adapt_decl %C -// CHECK:STDOUT: %.loc11: = complete_type_witness %C [template = constants.%.6] +// CHECK:STDOUT: %.loc11: = complete_type_witness %C [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC @@ -199,14 +199,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_18: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_26: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_27.1: %.3 = struct_literal (%.loc13_18, %.loc13_26) +// CHECK:STDOUT: %.loc13_18: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_26: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_27.1: %.2 = struct_literal (%.loc13_18, %.loc13_26) // CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.3: ref i32 = class_element_access %.loc13_27.2, element0 -// CHECK:STDOUT: %.loc13_27.4: init i32 = initialize_from %.loc13_18 to %.loc13_27.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_27.4: init i32 = initialize_from %.loc13_18 to %.loc13_27.3 [template = constants.%.6] // CHECK:STDOUT: %.loc13_27.5: ref i32 = class_element_access %.loc13_27.2, element1 -// CHECK:STDOUT: %.loc13_27.6: init i32 = initialize_from %.loc13_26 to %.loc13_27.5 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_27.6: init i32 = initialize_from %.loc13_26 to %.loc13_27.5 [template = constants.%.7] // CHECK:STDOUT: %.loc13_27.7: init %C = class_init (%.loc13_27.4, %.loc13_27.6), %.loc13_27.2 [template = constants.%struct] // CHECK:STDOUT: %.loc13_27.8: ref %C = temporary %.loc13_27.2, %.loc13_27.7 // CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.8 @@ -244,17 +244,17 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // 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 = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: = complete_type_witness %C [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.7, %.8) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: = complete_type_witness %C [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.6, %.7) [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] @@ -264,19 +264,19 @@ var e: C = MakeAdaptC(); // 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: %.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: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%AdaptC) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%AdaptC) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [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: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -293,7 +293,7 @@ var e: C = MakeAdaptC(); // 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 (%.9) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] // 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 @@ -351,8 +351,8 @@ var e: C = MakeAdaptC(); // 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.%.9)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -366,12 +366,12 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] -// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc7: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -382,7 +382,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: class @AdaptC { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: adapt_decl %C -// CHECK:STDOUT: %.loc11: = complete_type_witness %C [template = constants.%.6] +// CHECK:STDOUT: %.loc11: = complete_type_witness %C [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC @@ -404,14 +404,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_18: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_26: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_27.1: %.3 = struct_literal (%.loc13_18, %.loc13_26) +// CHECK:STDOUT: %.loc13_18: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_26: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_27.1: %.2 = struct_literal (%.loc13_18, %.loc13_26) // CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.3: ref i32 = class_element_access %.loc13_27.2, element0 -// CHECK:STDOUT: %.loc13_27.4: init i32 = initialize_from %.loc13_18 to %.loc13_27.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_27.4: init i32 = initialize_from %.loc13_18 to %.loc13_27.3 [template = constants.%.6] // CHECK:STDOUT: %.loc13_27.5: ref i32 = class_element_access %.loc13_27.2, element1 -// CHECK:STDOUT: %.loc13_27.6: init i32 = initialize_from %.loc13_26 to %.loc13_27.5 [template = constants.%.8] +// CHECK:STDOUT: %.loc13_27.6: init i32 = initialize_from %.loc13_26 to %.loc13_27.5 [template = constants.%.7] // CHECK:STDOUT: %.loc13_27.7: init %C = class_init (%.loc13_27.4, %.loc13_27.6), %.loc13_27.2 [template = constants.%struct] // CHECK:STDOUT: %.loc13_27.8: ref %C = temporary %.loc13_27.2, %.loc13_27.7 // CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.8 @@ -468,8 +468,8 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%C) { @@ -481,7 +481,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 483c6e8ba13b..ac18254c5699 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -22,17 +22,17 @@ fn F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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 = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.3 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,12 +68,12 @@ fn F() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -85,19 +85,19 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_17: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_25: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_26.1: %.3 = struct_literal (%.loc17_17, %.loc17_25) +// CHECK:STDOUT: %.loc17_17: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc17_25: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_26.1: %.2 = struct_literal (%.loc17_17, %.loc17_25) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc17_26.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc17_26.3: ref i32 = class_element_access %.loc17_26.2, element0 -// CHECK:STDOUT: %.loc17_26.4: init i32 = initialize_from %.loc17_17 to %.loc17_26.3 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_26.4: init i32 = initialize_from %.loc17_17 to %.loc17_26.3 [template = constants.%.4] // CHECK:STDOUT: %.loc17_26.5: ref i32 = class_element_access %.loc17_26.2, element1 -// CHECK:STDOUT: %.loc17_26.6: init i32 = initialize_from %.loc17_25 to %.loc17_26.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_26.6: init i32 = initialize_from %.loc17_25 to %.loc17_26.5 [template = constants.%.5] // CHECK:STDOUT: %.loc17_26.7: init %Class = class_init (%.loc17_26.4, %.loc17_26.6), %.loc17_26.2 [template = constants.%struct] // CHECK:STDOUT: %.loc17_26.8: ref %Class = temporary %.loc17_26.2, %.loc17_26.7 // CHECK:STDOUT: %.loc17_28: ref %Class = converted %.loc17_26.1, %.loc17_26.8 -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc17_37.1: ref i32 = class_element_access %.loc17_28, element0 // CHECK:STDOUT: %.loc17_37.2: i32 = bind_value %.loc17_37.1 // CHECK:STDOUT: return %.loc17_37.2 diff --git a/toolchain/check/testdata/class/init_nested.carbon b/toolchain/check/testdata/class/init_nested.carbon index e2afe42df3b6..a83584a8f0b1 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -29,23 +29,23 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Inner: type = class_type @Inner [template] // 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 = unbound_element_type %Inner, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Inner, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %MakeInner.type: type = fn_type @MakeInner [template] // CHECK:STDOUT: %MakeInner: %MakeInner.type = struct_value () [template] // CHECK:STDOUT: %Outer: type = class_type @Outer [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Outer, %Inner [template] -// CHECK:STDOUT: %.7: type = struct_type {.c: %Inner, .d: %Inner} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Outer, %Inner [template] +// CHECK:STDOUT: %.6: type = struct_type {.c: %Inner, .d: %Inner} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: %MakeOuter.type: type = fn_type @MakeOuter [template] // CHECK:STDOUT: %MakeOuter: %MakeOuter.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.c: %.5, .d: %.5} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.8: type = struct_type {.c: %.4, .d: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,12 +90,12 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner @@ -105,10 +105,10 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { // CHECK:STDOUT: %Inner.ref.loc19: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc19: %.6 = field_decl c, element0 [template] +// CHECK:STDOUT: %.loc19: %.5 = field_decl c, element0 [template] // CHECK:STDOUT: %Inner.ref.loc20: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc20: %.6 = field_decl d, element1 [template] -// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc20: %.5 = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer @@ -128,7 +128,7 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: %MakeInner.ref.loc24_34: %MakeInner.type = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] // CHECK:STDOUT: %.loc24_45.2: ref %Inner = class_element_access %return, element1 // CHECK:STDOUT: %MakeInner.call.loc24_43: init %Inner = call %MakeInner.ref.loc24_34() to %.loc24_45.2 -// CHECK:STDOUT: %.loc24_45.3: %.7 = struct_literal (%MakeInner.call.loc24_25, %MakeInner.call.loc24_43) +// CHECK:STDOUT: %.loc24_45.3: %.6 = struct_literal (%MakeInner.call.loc24_25, %MakeInner.call.loc24_43) // CHECK:STDOUT: %.loc24_45.4: init %Outer = class_init (%MakeInner.call.loc24_25, %MakeInner.call.loc24_43), %return // CHECK:STDOUT: %.loc24_46: init %Outer = converted %.loc24_45.3, %.loc24_45.4 // CHECK:STDOUT: return %.loc24_46 to %return diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 88da63abffb5..db0ba08143c7 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -63,25 +63,25 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %Class [template] +// CHECK:STDOUT: %.1: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.4: type = struct_type {.k: i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.3: type = struct_type {.k: i32} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: %CallAlias.type: type = fn_type @CallAlias [template] // CHECK:STDOUT: %CallAlias: %CallAlias.type = struct_value () [template] // CHECK:STDOUT: %CallOnConstBoundMethod.type: type = fn_type @CallOnConstBoundMethod [template] // CHECK:STDOUT: %CallOnConstBoundMethod: %CallOnConstBoundMethod.type = struct_value () [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.7) [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.6) [template] // CHECK:STDOUT: %CallWithAddr.type: type = fn_type @CallWithAddr [template] // CHECK:STDOUT: %CallWithAddr: %CallWithAddr.type = struct_value () [template] // CHECK:STDOUT: %CallFThroughPointer.type: type = fn_type @CallFThroughPointer [template] @@ -187,34 +187,34 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallFThroughPointer.decl: %CallFThroughPointer.type = fn_decl @CallFThroughPointer [template = constants.%CallFThroughPointer] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc43_32: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc43_32: type = ptr_type %Class [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc43_38.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc43_38.2: type = converted %int.make_type_32, %.loc43_38.1 [template = i32] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallGThroughPointer.decl: %CallGThroughPointer.type = fn_decl @CallGThroughPointer [template = constants.%CallGThroughPointer] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc47_32: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc47_32: type = ptr_type %Class [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc47_38.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc47_38.2: type = converted %int.make_type_32, %.loc47_38.1 [template = i32] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -265,19 +265,19 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %.loc12_22: ref i32 = return_slot %return.param.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc13_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32, %.loc13_31.1 [template = i32] -// CHECK:STDOUT: %self.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.2 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -286,8 +286,8 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32, %.loc17_10.1 [template = i32] -// CHECK:STDOUT: %.loc17_8: %.3 = field_decl k, element0 [template] -// CHECK:STDOUT: %.loc18: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_8: %.2 = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -302,13 +302,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc20 -// CHECK:STDOUT: %k.ref: %.3 = name_ref k, @Class.%.loc17_8 [template = @Class.%.loc17_8] +// CHECK:STDOUT: %k.ref: %.2 = name_ref k, @Class.%.loc17_8 [template = @Class.%.loc17_8] // CHECK:STDOUT: %.loc21_14.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc21_14.2: i32 = bind_value %.loc21_14.1 // CHECK:STDOUT: return %.loc21_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self.param_patt: %.2]() -> i32; +// CHECK:STDOUT: fn @G[addr %self.param_patt: %.1]() -> i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @Call(%c.param_patt: %Class) -> i32 { // CHECK:STDOUT: !entry: @@ -334,12 +334,12 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallOnConstBoundMethod() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc35_17: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc35_18.1: %.4 = struct_literal (%.loc35_17) +// CHECK:STDOUT: %.loc35_17: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc35_18.1: %.3 = struct_literal (%.loc35_17) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc35_18.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc35_18.3: ref i32 = class_element_access %.loc35_18.2, element0 -// CHECK:STDOUT: %.loc35_18.4: init i32 = initialize_from %.loc35_17 to %.loc35_18.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc35_18.4: init i32 = initialize_from %.loc35_17 to %.loc35_18.3 [template = constants.%.6] // CHECK:STDOUT: %.loc35_18.5: init %Class = class_init (%.loc35_18.4), %.loc35_18.2 [template = constants.%struct] // CHECK:STDOUT: %.loc35_18.6: ref %Class = temporary %.loc35_18.2, %.loc35_18.5 // CHECK:STDOUT: %.loc35_20.1: ref %Class = converted %.loc35_18.1, %.loc35_18.6 @@ -360,16 +360,16 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c // CHECK:STDOUT: %G.ref: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc40_11: = bound_method %c.ref, %G.ref -// CHECK:STDOUT: %.loc40_10: %.2 = addr_of %c.ref +// CHECK:STDOUT: %.loc40_10: %.1 = addr_of %c.ref // CHECK:STDOUT: %G.call: init i32 = call %.loc40_11(%.loc40_10) // CHECK:STDOUT: %.loc40_15.1: i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc40_15.2: i32 = converted %G.call, %.loc40_15.1 // CHECK:STDOUT: return %.loc40_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallFThroughPointer(%p.param_patt: %.2) -> i32 { +// CHECK:STDOUT: fn @CallFThroughPointer(%p.param_patt: %.1) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p // CHECK:STDOUT: %.loc44_11.1: ref %Class = deref %p.ref // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc44_14: = bound_method %.loc44_11.1, %F.ref @@ -380,13 +380,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: return %.loc44_18.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGThroughPointer(%p.param_patt: %.2) -> i32 { +// CHECK:STDOUT: fn @CallGThroughPointer(%p.param_patt: %.1) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p // CHECK:STDOUT: %.loc48_11.1: ref %Class = deref %p.ref // CHECK:STDOUT: %G.ref: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc48_14: = bound_method %.loc48_11.1, %G.ref -// CHECK:STDOUT: %.loc48_11.2: %.2 = addr_of %.loc48_11.1 +// CHECK:STDOUT: %.loc48_11.2: %.1 = addr_of %.loc48_11.1 // CHECK:STDOUT: %G.call: init i32 = call %.loc48_14(%.loc48_11.2) // CHECK:STDOUT: %.loc48_18.1: i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc48_18.2: i32 = converted %G.call, %.loc48_18.1 @@ -418,7 +418,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %.loc58_14.2: ref %Class = temporary %.loc58_14.1, %Make.call // CHECK:STDOUT: %G.ref: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc58_16: = bound_method %.loc58_14.2, %G.ref -// CHECK:STDOUT: %.loc58_14.3: %.2 = addr_of %.loc58_14.2 +// CHECK:STDOUT: %.loc58_14.3: %.1 = addr_of %.loc58_14.2 // CHECK:STDOUT: %G.call: init i32 = call %.loc58_16(%.loc58_14.3) // CHECK:STDOUT: %.loc58_20.1: i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc58_20.2: i32 = converted %G.call, %.loc58_20.1 diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index afde1cb442aa..372ce1084785 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -54,25 +54,25 @@ fn F(a: Outer*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [template] -// CHECK:STDOUT: %.2: type = ptr_type %Inner [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Inner, %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %Outer [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Inner, %.4 [template] +// CHECK:STDOUT: %.1: type = ptr_type %Inner [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Inner, %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %Outer [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Inner, %.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.pi: %.2, .po: %.4, .qi: %.2} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.5: type = struct_type {.pi: %.1, .po: %.3, .qi: %.1} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %Outer, %.4 [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %Outer, %.2 [template] -// CHECK:STDOUT: %.10: type = struct_type {.po: %.4, .qo: %.4, .pi: %.2} [template] -// CHECK:STDOUT: %.11: = complete_type_witness %.10 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.13: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %Outer, %.3 [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %Outer, %.1 [template] +// CHECK:STDOUT: %.9: type = struct_type {.po: %.3, .qo: %.3, .pi: %.1} [template] +// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.12: type = ptr_type %.5 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -93,13 +93,13 @@ fn F(a: Outer*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { -// CHECK:STDOUT: %a.patt: %.4 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.4 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.3 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Outer.ref.loc41: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %.loc41: type = ptr_type %Outer [template = constants.%.4] -// CHECK:STDOUT: %a.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.4 = bind_name a, %a.param +// CHECK:STDOUT: %.loc41: type = ptr_type %Outer [template = constants.%.3] +// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.3 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -108,15 +108,15 @@ fn F(a: Outer*) { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer [template = constants.%Outer] -// CHECK:STDOUT: %.loc36_15: type = ptr_type %Outer [template = constants.%.4] -// CHECK:STDOUT: %.loc36_9: %.8 = field_decl po, element0 [template] +// CHECK:STDOUT: %.loc36_15: type = ptr_type %Outer [template = constants.%.3] +// CHECK:STDOUT: %.loc36_9: %.7 = field_decl po, element0 [template] // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %.loc37_16: type = ptr_type %Outer [template = constants.%.4] -// CHECK:STDOUT: %.loc37_9: %.8 = field_decl qo, element1 [template] +// CHECK:STDOUT: %.loc37_16: type = ptr_type %Outer [template = constants.%.3] +// CHECK:STDOUT: %.loc37_9: %.7 = field_decl qo, element1 [template] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc38_16: type = ptr_type %Inner [template = constants.%.2] -// CHECK:STDOUT: %.loc38_9: %.9 = field_decl pi, element2 [template] -// CHECK:STDOUT: %.loc39: = complete_type_witness %.10 [template = constants.%.11] +// CHECK:STDOUT: %.loc38_16: type = ptr_type %Inner [template = constants.%.1] +// CHECK:STDOUT: %.loc38_9: %.8 = field_decl pi, element2 [template] +// CHECK:STDOUT: %.loc39: = complete_type_witness %.9 [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer @@ -130,16 +130,16 @@ fn F(a: Outer*) { // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Inner [template = constants.%Inner] -// CHECK:STDOUT: %.loc19_17: type = ptr_type %Inner [template = constants.%.2] -// CHECK:STDOUT: %.loc19_11: %.3 = field_decl pi, element0 [template] +// CHECK:STDOUT: %.loc19_17: type = ptr_type %Inner [template = constants.%.1] +// CHECK:STDOUT: %.loc19_11: %.2 = field_decl pi, element0 [template] // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %.loc20_18: type = ptr_type %Outer [template = constants.%.4] -// CHECK:STDOUT: %.loc20_11: %.5 = field_decl po, element1 [template] +// CHECK:STDOUT: %.loc20_18: type = ptr_type %Outer [template = constants.%.3] +// CHECK:STDOUT: %.loc20_11: %.4 = field_decl po, element1 [template] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc21_18: type = ptr_type %Inner [template = constants.%.2] -// CHECK:STDOUT: %.loc21_11: %.3 = field_decl qi, element2 [template] +// CHECK:STDOUT: %.loc21_18: type = ptr_type %Inner [template = constants.%.1] +// CHECK:STDOUT: %.loc21_11: %.2 = field_decl qi, element2 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// CHECK:STDOUT: %.loc28: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc28: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner @@ -182,64 +182,64 @@ fn F(a: Outer*) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%a.param_patt: %.4) { +// CHECK:STDOUT: fn @F.2(%a.param_patt: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Outer.ref.loc42: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %.loc42_21: type = ptr_type %Inner [template = constants.%.2] -// CHECK:STDOUT: %a.ref.loc42: %.4 = name_ref a, %a +// CHECK:STDOUT: %.loc42_21: type = ptr_type %Inner [template = constants.%.1] +// CHECK:STDOUT: %a.ref.loc42: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc42_26: ref %Outer = deref %a.ref.loc42 -// CHECK:STDOUT: %pi.ref.loc42: %.9 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc42_29.1: ref %.2 = class_element_access %.loc42_26, element2 -// CHECK:STDOUT: %.loc42_29.2: %.2 = bind_value %.loc42_29.1 -// CHECK:STDOUT: %b: %.2 = bind_name b, %.loc42_29.2 -// CHECK:STDOUT: %a.ref.loc44_3: %.4 = name_ref a, %a +// CHECK:STDOUT: %pi.ref.loc42: %.8 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] +// CHECK:STDOUT: %.loc42_29.1: ref %.1 = class_element_access %.loc42_26, element2 +// CHECK:STDOUT: %.loc42_29.2: %.1 = bind_value %.loc42_29.1 +// CHECK:STDOUT: %b: %.1 = bind_name b, %.loc42_29.2 +// CHECK:STDOUT: %a.ref.loc44_3: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc44_4.1: ref %Outer = deref %a.ref.loc44_3 -// CHECK:STDOUT: %po.ref.loc44: %.8 = name_ref po, @Outer.%.loc36_9 [template = @Outer.%.loc36_9] -// CHECK:STDOUT: %.loc44_4.2: ref %.4 = class_element_access %.loc44_4.1, element0 -// CHECK:STDOUT: %a.ref.loc44_11: %.4 = name_ref a, %a +// CHECK:STDOUT: %po.ref.loc44: %.7 = name_ref po, @Outer.%.loc36_9 [template = @Outer.%.loc36_9] +// CHECK:STDOUT: %.loc44_4.2: ref %.3 = class_element_access %.loc44_4.1, element0 +// CHECK:STDOUT: %a.ref.loc44_11: %.3 = name_ref a, %a // CHECK:STDOUT: assign %.loc44_4.2, %a.ref.loc44_11 -// CHECK:STDOUT: %a.ref.loc45_3: %.4 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc45_3: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc45_4.1: ref %Outer = deref %a.ref.loc45_3 -// CHECK:STDOUT: %qo.ref: %.8 = name_ref qo, @Outer.%.loc37_9 [template = @Outer.%.loc37_9] -// CHECK:STDOUT: %.loc45_4.2: ref %.4 = class_element_access %.loc45_4.1, element1 -// CHECK:STDOUT: %a.ref.loc45_11: %.4 = name_ref a, %a +// CHECK:STDOUT: %qo.ref: %.7 = name_ref qo, @Outer.%.loc37_9 [template = @Outer.%.loc37_9] +// CHECK:STDOUT: %.loc45_4.2: ref %.3 = class_element_access %.loc45_4.1, element1 +// CHECK:STDOUT: %a.ref.loc45_11: %.3 = name_ref a, %a // CHECK:STDOUT: assign %.loc45_4.2, %a.ref.loc45_11 -// CHECK:STDOUT: %a.ref.loc46_3: %.4 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc46_3: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc46_4.1: ref %Outer = deref %a.ref.loc46_3 -// CHECK:STDOUT: %pi.ref.loc46_4: %.9 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc46_4.2: ref %.2 = class_element_access %.loc46_4.1, element2 -// CHECK:STDOUT: %a.ref.loc46_11: %.4 = name_ref a, %a +// CHECK:STDOUT: %pi.ref.loc46_4: %.8 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] +// CHECK:STDOUT: %.loc46_4.2: ref %.1 = class_element_access %.loc46_4.1, element2 +// CHECK:STDOUT: %a.ref.loc46_11: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc46_12.1: ref %Outer = deref %a.ref.loc46_11 -// CHECK:STDOUT: %pi.ref.loc46_12: %.9 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc46_12.2: ref %.2 = class_element_access %.loc46_12.1, element2 -// CHECK:STDOUT: %.loc46_12.3: %.2 = bind_value %.loc46_12.2 +// CHECK:STDOUT: %pi.ref.loc46_12: %.8 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] +// CHECK:STDOUT: %.loc46_12.2: ref %.1 = class_element_access %.loc46_12.1, element2 +// CHECK:STDOUT: %.loc46_12.3: %.1 = bind_value %.loc46_12.2 // CHECK:STDOUT: assign %.loc46_4.2, %.loc46_12.3 -// CHECK:STDOUT: %b.ref.loc47: %.2 = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc47: %.1 = name_ref b, %b // CHECK:STDOUT: %.loc47_4.1: ref %Inner = deref %b.ref.loc47 -// CHECK:STDOUT: %po.ref.loc47: %.5 = name_ref po, @Inner.%.loc20_11 [template = @Inner.%.loc20_11] -// CHECK:STDOUT: %.loc47_4.2: ref %.4 = class_element_access %.loc47_4.1, element1 -// CHECK:STDOUT: %a.ref.loc47: %.4 = name_ref a, %a +// CHECK:STDOUT: %po.ref.loc47: %.4 = name_ref po, @Inner.%.loc20_11 [template = @Inner.%.loc20_11] +// CHECK:STDOUT: %.loc47_4.2: ref %.3 = class_element_access %.loc47_4.1, element1 +// CHECK:STDOUT: %a.ref.loc47: %.3 = name_ref a, %a // CHECK:STDOUT: assign %.loc47_4.2, %a.ref.loc47 -// CHECK:STDOUT: %b.ref.loc48: %.2 = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc48: %.1 = name_ref b, %b // CHECK:STDOUT: %.loc48_4.1: ref %Inner = deref %b.ref.loc48 -// CHECK:STDOUT: %pi.ref.loc48_4: %.3 = name_ref pi, @Inner.%.loc19_11 [template = @Inner.%.loc19_11] -// CHECK:STDOUT: %.loc48_4.2: ref %.2 = class_element_access %.loc48_4.1, element0 -// CHECK:STDOUT: %a.ref.loc48: %.4 = name_ref a, %a +// CHECK:STDOUT: %pi.ref.loc48_4: %.2 = name_ref pi, @Inner.%.loc19_11 [template = @Inner.%.loc19_11] +// CHECK:STDOUT: %.loc48_4.2: ref %.1 = class_element_access %.loc48_4.1, element0 +// CHECK:STDOUT: %a.ref.loc48: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc48_12.1: ref %Outer = deref %a.ref.loc48 -// CHECK:STDOUT: %pi.ref.loc48_12: %.9 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc48_12.2: ref %.2 = class_element_access %.loc48_12.1, element2 -// CHECK:STDOUT: %.loc48_12.3: %.2 = bind_value %.loc48_12.2 +// CHECK:STDOUT: %pi.ref.loc48_12: %.8 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] +// CHECK:STDOUT: %.loc48_12.2: ref %.1 = class_element_access %.loc48_12.1, element2 +// CHECK:STDOUT: %.loc48_12.3: %.1 = bind_value %.loc48_12.2 // CHECK:STDOUT: assign %.loc48_4.2, %.loc48_12.3 -// CHECK:STDOUT: %b.ref.loc49: %.2 = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc49: %.1 = name_ref b, %b // CHECK:STDOUT: %.loc49_4.1: ref %Inner = deref %b.ref.loc49 -// CHECK:STDOUT: %qi.ref: %.3 = name_ref qi, @Inner.%.loc21_11 [template = @Inner.%.loc21_11] -// CHECK:STDOUT: %.loc49_4.2: ref %.2 = class_element_access %.loc49_4.1, element2 -// CHECK:STDOUT: %a.ref.loc49: %.4 = name_ref a, %a +// CHECK:STDOUT: %qi.ref: %.2 = name_ref qi, @Inner.%.loc21_11 [template = @Inner.%.loc21_11] +// CHECK:STDOUT: %.loc49_4.2: ref %.1 = class_element_access %.loc49_4.1, element2 +// CHECK:STDOUT: %a.ref.loc49: %.3 = name_ref a, %a // CHECK:STDOUT: %.loc49_12.1: ref %Outer = deref %a.ref.loc49 -// CHECK:STDOUT: %pi.ref.loc49: %.9 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc49_12.2: ref %.2 = class_element_access %.loc49_12.1, element2 -// CHECK:STDOUT: %.loc49_12.3: %.2 = bind_value %.loc49_12.2 +// CHECK:STDOUT: %pi.ref.loc49: %.8 = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] +// CHECK:STDOUT: %.loc49_12.2: ref %.1 = class_element_access %.loc49_12.1, element2 +// CHECK:STDOUT: %.loc49_12.3: %.1 = bind_value %.loc49_12.2 // CHECK:STDOUT: assign %.loc49_4.2, %.loc49_12.3 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 958041c52583..b5f511e1e0ae 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -28,17 +28,17 @@ fn G(o: Outer) { // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [template] // 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 = unbound_element_type %Inner, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Inner, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -89,7 +89,7 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} {} -// CHECK:STDOUT: %.loc15: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer @@ -100,8 +100,8 @@ fn G(o: Outer) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32, %.loc13_12.1 [template = i32] -// CHECK:STDOUT: %.loc13_10: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_10: %.1 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner @@ -113,7 +113,7 @@ fn G(o: Outer) { // CHECK:STDOUT: fn @F(%oi.param_patt: %Inner) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %oi.ref: %Inner = name_ref oi, %oi -// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @Inner.%.loc13_10 [template = @Inner.%.loc13_10] +// CHECK:STDOUT: %n.ref: %.1 = name_ref n, @Inner.%.loc13_10 [template = @Inner.%.loc13_10] // CHECK:STDOUT: %.loc18_12.1: ref i32 = class_element_access %oi.ref, element0 // CHECK:STDOUT: %.loc18_12.2: i32 = bind_value %.loc18_12.1 // CHECK:STDOUT: return %.loc18_12.2 diff --git a/toolchain/check/testdata/class/no_prelude/export_name.carbon b/toolchain/check/testdata/class/no_prelude/export_name.carbon index 6c71eefa9b15..d4c820d0a33d 100644 --- a/toolchain/check/testdata/class/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/class/no_prelude/export_name.carbon @@ -92,8 +92,8 @@ var c: C = {}; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/no_prelude/extern.carbon b/toolchain/check/testdata/class/no_prelude/extern.carbon index 891ae2115c2f..dd80534c24da 100644 --- a/toolchain/check/testdata/class/no_prelude/extern.carbon +++ b/toolchain/check/testdata/class/no_prelude/extern.carbon @@ -353,8 +353,8 @@ extern class C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -362,7 +362,7 @@ extern class C; // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon index daf48107b031..d8bcc79d6bce 100644 --- a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon @@ -60,7 +60,7 @@ fn F(T:! type) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %NotGenericButParams.type: type = generic_class_type @NotGenericButParams [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NotGenericButParams.1: %NotGenericButParams.type = struct_value () [template] // CHECK:STDOUT: %NotGenericButParams.2: type = class_type @NotGenericButParams [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -80,7 +80,7 @@ fn F(T:! type) { // CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %GenericAndParams.4: type = class_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %NotGenericNoParams = struct_value () [template] // CHECK:STDOUT: %struct.2: %NotGenericButParams.2 = struct_value () [template] // CHECK:STDOUT: %GenericAndParams.5: type = class_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] @@ -312,11 +312,11 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.1: %A.type = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -327,7 +327,7 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.2 @@ -337,11 +337,11 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.1: %A.type = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -364,7 +364,7 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.2 diff --git a/toolchain/check/testdata/class/no_prelude/import_access.carbon b/toolchain/check/testdata/class/no_prelude/import_access.carbon index e0f42bdbd27f..b7746857377c 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -201,8 +201,8 @@ private class Redecl {} // CHECK:STDOUT: %Def: type = class_type @Def [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %Def = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,8 +297,8 @@ private class Redecl {} // CHECK:STDOUT: %ForwardWithDef: type = class_type @ForwardWithDef [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %ForwardWithDef = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -393,10 +393,10 @@ private class Redecl {} // CHECK:STDOUT: %Forward: type = class_type @Forward [template] // CHECK:STDOUT: %.1: type = ptr_type %Forward [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -423,7 +423,7 @@ private class Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Forward { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Forward @@ -438,7 +438,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -467,7 +467,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon index 5ccfdb35a5b1..5a6a5f51f7e0 100644 --- a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon +++ b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon @@ -105,10 +105,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -120,7 +120,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -242,11 +242,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: --- use_b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -263,10 +263,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -281,7 +281,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.3 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -289,11 +289,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: --- use_c.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -310,10 +310,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -328,7 +328,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.3 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -336,11 +336,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: --- use_d.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -357,10 +357,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -375,7 +375,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.3 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -383,11 +383,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: --- use_e.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -407,10 +407,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -432,7 +432,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.5 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -440,11 +440,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: --- use_f.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -464,10 +464,10 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -489,7 +489,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.5 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon index 6c0555b98c89..a4c3cd4bdd3e 100644 --- a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon @@ -188,7 +188,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] @@ -297,7 +297,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] @@ -362,13 +362,13 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -385,7 +385,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc14_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_11.1, runtime_param [symbolic = %a.patt.loc14_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -419,7 +419,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.5 +// CHECK:STDOUT: .Self = constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -442,7 +442,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] @@ -507,7 +507,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] @@ -584,7 +584,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] @@ -681,14 +681,14 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %b: %C = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt: %C = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%b) [symbolic] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%b) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -708,7 +708,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %b.patt.loc15_11.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_11.1, runtime_param [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)] // CHECK:STDOUT: } { @@ -742,7 +742,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.5 +// CHECK:STDOUT: .Self = constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -765,13 +765,13 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -791,7 +791,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param [symbolic = %a.patt.loc15_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -825,7 +825,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.5 +// CHECK:STDOUT: .Self = constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -848,13 +848,13 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -874,7 +874,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param [symbolic = %a.patt.loc15_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -908,7 +908,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.5 +// CHECK:STDOUT: .Self = constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -931,7 +931,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: } @@ -980,7 +980,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] @@ -1046,13 +1046,13 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a: %.3 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %.3 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.1: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Foo.2: type = class_type @Foo, @Foo(%a) [symbolic] // CHECK:STDOUT: %a.patt.2: %.3 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = class_type @.1, @.1(%a) [symbolic] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1070,7 +1070,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.param: %.3 = value_param runtime_param // CHECK:STDOUT: %a.loc6_11.1: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt.loc18_11.1: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt.loc18_11.1, runtime_param [symbolic = %a.patt.loc18_11.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -1106,7 +1106,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.loc18_33: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.6 +// CHECK:STDOUT: .Self = constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1124,17 +1124,17 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Base, %.1 [template] -// CHECK:STDOUT: %.3: type = ptr_type %Base [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = ptr_type %Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: %.1} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %empty_tuple.type} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.6: %.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.5: %.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1142,33 +1142,33 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .Base = %Base.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.6] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc16_11: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16_26: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %.loc16_26: type = ptr_type %Base [template = constants.%.2] +// CHECK:STDOUT: %self.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.2 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc5_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc7_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc7_23: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %.loc7_23: type = ptr_type %Base [template = constants.%.2] +// CHECK:STDOUT: %self.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.2 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -1176,17 +1176,17 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.param_patt: %.3](); +// CHECK:STDOUT: fn @F[addr %self.param_patt: %.2](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1[addr %self.param_patt: %.3]() { +// CHECK:STDOUT: fn @.1[addr %self.param_patt: %.2]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.3 = name_ref self, %self +// CHECK:STDOUT: %self.ref: %.2 = name_ref self, %self // CHECK:STDOUT: %.loc17_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc5_8 [template = @Base.%.loc5_8] -// CHECK:STDOUT: %.loc17_10: ref %.1 = class_element_access %.loc17_4, element0 -// CHECK:STDOUT: %.loc17_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc17_16.2: init %.1 = tuple_init () to %.loc17_10 [template = constants.%tuple] -// CHECK:STDOUT: %.loc17_13: init %.1 = converted %.loc17_16.1, %.loc17_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Base.%.loc5_8 [template = @Base.%.loc5_8] +// CHECK:STDOUT: %.loc17_10: ref %empty_tuple.type = class_element_access %.loc17_4, element0 +// CHECK:STDOUT: %.loc17_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc17_16.2: init %empty_tuple.type = tuple_init () to %.loc17_10 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc17_13: init %empty_tuple.type = converted %.loc17_16.1, %.loc17_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %.loc17_10, %.loc17_13 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index 70dea3b4d431..cece010af7ae 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -28,19 +28,19 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type %Class [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.9: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: type = ptr_type %tuple.type.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,8 +81,8 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %self.param_patt.loc21_16: %Class = value_param_pattern %self.patt.loc21_12, runtime_param0 // CHECK:STDOUT: %self.patt.loc21_24: i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc21_30: i32 = value_param_pattern %self.patt.loc21_24, runtime_param1 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int.make_type_32.loc21_32: init type = call constants.%Int32() [template = i32] @@ -90,18 +90,18 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %.loc21_32.2: type = converted %int.make_type_32.loc21_32, %.loc21_32.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc21_41: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc21_46: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc21_49.1: %.3 = tuple_literal (%int.make_type_32.loc21_41, %int.make_type_32.loc21_46) +// CHECK:STDOUT: %.loc21_49.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc21_41, %int.make_type_32.loc21_46) // CHECK:STDOUT: %.loc21_49.2: type = value_of_initializer %int.make_type_32.loc21_41 [template = i32] // CHECK:STDOUT: %.loc21_49.3: type = converted %int.make_type_32.loc21_41, %.loc21_49.2 [template = i32] // CHECK:STDOUT: %.loc21_49.4: type = value_of_initializer %int.make_type_32.loc21_46 [template = i32] // CHECK:STDOUT: %.loc21_49.5: type = converted %int.make_type_32.loc21_46, %.loc21_49.4 [template = i32] -// CHECK:STDOUT: %.loc21_49.6: type = converted %.loc21_49.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc21_49.6: type = converted %.loc21_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param.loc21_16: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc21_12: %Class = bind_name self, %self.param.loc21_16 // CHECK:STDOUT: %self.param.loc21_30: i32 = value_param runtime_param1 // CHECK:STDOUT: %self.loc21_24: i32 = bind_name r#self, %self.param.loc21_30 -// CHECK:STDOUT: %return.param.loc21: ref %.4 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param.loc21 +// CHECK:STDOUT: %return.param.loc21: ref %tuple.type.2 = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,8 +128,8 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %self.param_patt.loc21_16: %Class = value_param_pattern %self.patt.loc21_12, runtime_param0 // CHECK:STDOUT: %self.patt.loc21_24: i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc21_30: i32 = value_param_pattern %self.patt.loc21_24, runtime_param1 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int.make_type_32.loc13_28: init type = call constants.%Int32() [template = i32] @@ -137,24 +137,24 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %.loc13_28.2: type = converted %int.make_type_32.loc13_28, %.loc13_28.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc13_37: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc13_42: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc13_45.1: %.3 = tuple_literal (%int.make_type_32.loc13_37, %int.make_type_32.loc13_42) +// CHECK:STDOUT: %.loc13_45.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc13_37, %int.make_type_32.loc13_42) // CHECK:STDOUT: %.loc13_45.2: type = value_of_initializer %int.make_type_32.loc13_37 [template = i32] // CHECK:STDOUT: %.loc13_45.3: type = converted %int.make_type_32.loc13_37, %.loc13_45.2 [template = i32] // CHECK:STDOUT: %.loc13_45.4: type = value_of_initializer %int.make_type_32.loc13_42 [template = i32] // CHECK:STDOUT: %.loc13_45.5: type = converted %int.make_type_32.loc13_42, %.loc13_45.4 [template = i32] -// CHECK:STDOUT: %.loc13_45.6: type = converted %.loc13_45.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_45.6: type = converted %.loc13_45.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param.loc13_12: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc13_8: %Class = bind_name self, %self.param.loc13_12 // CHECK:STDOUT: %self.param.loc13_26: i32 = value_param runtime_param1 // CHECK:STDOUT: %self.loc13_20: i32 = bind_name r#self, %self.param.loc13_26 -// CHECK:STDOUT: %return.param.loc13: ref %.4 = out_param runtime_param2 -// CHECK:STDOUT: %.loc13_33: ref %.4 = return_slot %return.param.loc13 +// CHECK:STDOUT: %return.param.loc13: ref %tuple.type.2 = out_param runtime_param2 +// CHECK:STDOUT: %.loc13_33: ref %tuple.type.2 = return_slot %return.param.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32, %.loc14_10.1 [template = i32] -// CHECK:STDOUT: %.loc14_8: %.5 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc15: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc14_8: %.2 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -169,27 +169,27 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc18_5: %.1 = name_ref self, %self.loc17_17 // CHECK:STDOUT: %.loc18_4: ref %Class = deref %self.ref.loc18_5 -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] // CHECK:STDOUT: %.loc18_10: ref i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %self.ref.loc18_15: i32 = name_ref r#self, %self.loc17_30 // CHECK:STDOUT: assign %.loc18_10, %self.ref.loc18_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[%self.param_patt.loc21_16: %Class](%self.param_patt.loc21_30: i32) -> %return: %.4 { +// CHECK:STDOUT: fn @G[%self.param_patt.loc21_16: %Class](%self.param_patt.loc21_30: i32) -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc22_11: %Class = name_ref self, %self.loc21_12 -// CHECK:STDOUT: %n.ref: %.5 = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] // CHECK:STDOUT: %.loc22_15.1: ref i32 = class_element_access %self.ref.loc22_11, element0 // CHECK:STDOUT: %.loc22_15.2: i32 = bind_value %.loc22_15.1 // CHECK:STDOUT: %self.ref.loc22_19: i32 = name_ref r#self, %self.loc21_24 -// CHECK:STDOUT: %.loc22_25.1: %.4 = tuple_literal (%.loc22_15.2, %self.ref.loc22_19) +// CHECK:STDOUT: %.loc22_25.1: %tuple.type.2 = tuple_literal (%.loc22_15.2, %self.ref.loc22_19) // CHECK:STDOUT: %.loc22_25.2: ref i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc22_25.3: init i32 = initialize_from %.loc22_15.2 to %.loc22_25.2 // CHECK:STDOUT: %.loc22_25.4: ref i32 = tuple_access %return, element1 // CHECK:STDOUT: %.loc22_25.5: init i32 = initialize_from %self.ref.loc22_19 to %.loc22_25.4 -// CHECK:STDOUT: %.loc22_25.6: init %.4 = tuple_init (%.loc22_25.3, %.loc22_25.5) to %return -// CHECK:STDOUT: %.loc22_26: init %.4 = converted %.loc22_25.1, %.loc22_25.6 +// CHECK:STDOUT: %.loc22_25.6: init %tuple.type.2 = tuple_init (%.loc22_25.3, %.loc22_25.5) to %return +// CHECK:STDOUT: %.loc22_26: init %tuple.type.2 = converted %.loc22_25.1, %.loc22_25.6 // CHECK:STDOUT: return %.loc22_26 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index 22c8cd800d56..bfa15d64f9a8 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -28,12 +28,12 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %Class [template] -// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %Class [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %MemberNamedSelf: type = class_type @MemberNamedSelf [template] // CHECK:STDOUT: %Self: type = class_type @Self [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] @@ -73,7 +73,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -95,7 +95,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %y.param.loc21: %Self = value_param runtime_param1 // CHECK:STDOUT: %y.loc21: %Self = bind_name y, %y.param.loc21 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MemberNamedSelf @@ -104,7 +104,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Self { -// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Self @@ -113,15 +113,15 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: fn @F.1() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc13: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %Self.var: ref %.4 = var r#Self -// CHECK:STDOUT: %Self: ref %.4 = bind_name r#Self, %Self.var +// CHECK:STDOUT: %.loc13: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %Self.var: ref %.3 = var r#Self +// CHECK:STDOUT: %Self: ref %.3 = bind_name r#Self, %Self.var // CHECK:STDOUT: %Self.ref.loc14_12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc14_16: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.var: ref %.4 = var p -// CHECK:STDOUT: %p: ref %.4 = bind_name p, %p.var -// CHECK:STDOUT: %Self.ref.loc14_20: ref %.4 = name_ref r#Self, %Self -// CHECK:STDOUT: %.loc14_20: %.4 = bind_value %Self.ref.loc14_20 +// CHECK:STDOUT: %.loc14_16: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %p.var: ref %.3 = var p +// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var +// CHECK:STDOUT: %Self.ref.loc14_20: ref %.3 = name_ref r#Self, %Self +// CHECK:STDOUT: %.loc14_20: %.3 = bind_value %Self.ref.loc14_20 // CHECK:STDOUT: assign %p.var, %.loc14_20 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/redeclaration.carbon b/toolchain/check/testdata/class/redeclaration.carbon index b3518b7e1590..8df8fd2f6931 100644 --- a/toolchain/check/testdata/class/redeclaration.carbon +++ b/toolchain/check/testdata/class/redeclaration.carbon @@ -21,13 +21,13 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,7 +80,7 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %b.param.loc14: bool = value_param runtime_param1 // CHECK:STDOUT: %b.loc14: bool = bind_name b, %b.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/reenter_scope.carbon b/toolchain/check/testdata/class/reenter_scope.carbon index a816fd50ecec..89d18ec143b4 100644 --- a/toolchain/check/testdata/class/reenter_scope.carbon +++ b/toolchain/check/testdata/class/reenter_scope.carbon @@ -23,15 +23,15 @@ fn Class.F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %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: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,7 +83,7 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index ce66e2c87058..e612bd4c1ca5 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -23,16 +23,16 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,7 +74,7 @@ class Class { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -96,7 +96,7 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc17: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: return %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index e6f979c58b50..ab55febcc424 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -53,43 +53,43 @@ class A { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %BF.type: type = fn_type @BF [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %BF: %BF.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %B, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %B, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %DF.type: type = fn_type @DF [template] // CHECK:STDOUT: %DF: %DF.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %D, i32 [template] -// CHECK:STDOUT: %.6: type = struct_type {.d: i32} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %D, i32 [template] +// CHECK:STDOUT: %.5: type = struct_type {.d: i32} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %CF.type: type = fn_type @CF [template] // CHECK:STDOUT: %CF: %CF.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.9: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.8: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] // CHECK:STDOUT: %AF.type: type = fn_type @AF [template] // CHECK:STDOUT: %AF: %AF.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = unbound_element_type %A, i32 [template] -// CHECK:STDOUT: %.12: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.13: = complete_type_witness %.12 [template] -// CHECK:STDOUT: %.14: type = ptr_type %.12 [template] -// CHECK:STDOUT: %.15: i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %A = struct_value (%.15) [template] -// CHECK:STDOUT: %.16: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.17: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.2: %B = struct_value (%.17) [template] -// CHECK:STDOUT: %.18: type = ptr_type %.9 [template] -// CHECK:STDOUT: %.19: i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.3: %C = struct_value (%.19) [template] -// CHECK:STDOUT: %.20: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.21: i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.4: %D = struct_value (%.21) [template] +// CHECK:STDOUT: %.10: type = unbound_element_type %A, i32 [template] +// CHECK:STDOUT: %.11: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] +// CHECK:STDOUT: %.13: type = ptr_type %.11 [template] +// CHECK:STDOUT: %.14: i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.1: %A = struct_value (%.14) [template] +// CHECK:STDOUT: %.15: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.16: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct.2: %B = struct_value (%.16) [template] +// CHECK:STDOUT: %.17: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.18: i32 = int_value 3 [template] +// CHECK:STDOUT: %struct.3: %C = struct_value (%.18) [template] +// CHECK:STDOUT: %.19: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.20: i32 = int_value 4 [template] +// CHECK:STDOUT: %struct.4: %D = struct_value (%.20) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -117,8 +117,8 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc46_10.2: type = converted %int.make_type_32, %.loc46_10.1 [template = i32] -// CHECK:STDOUT: %.loc46_8: %.11 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc47: = complete_type_witness %.12 [template = constants.%.13] +// CHECK:STDOUT: %.loc46_8: %.10 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc47: = complete_type_witness %.11 [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -133,8 +133,8 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_32, %.loc16_12.1 [template = i32] -// CHECK:STDOUT: %.loc16_10: %.2 = field_decl b, element0 [template] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc16_10: %.1 = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -150,8 +150,8 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc42_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc42_12.2: type = converted %int.make_type_32, %.loc42_12.1 [template = i32] -// CHECK:STDOUT: %.loc42_10: %.8 = field_decl c, element0 [template] -// CHECK:STDOUT: %.loc43: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc42_10: %.7 = field_decl c, element0 [template] +// CHECK:STDOUT: %.loc43: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -166,8 +166,8 @@ class A { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_14.2: type = converted %int.make_type_32, %.loc24_14.1 [template = i32] -// CHECK:STDOUT: %.loc24_12: %.5 = field_decl d, element0 [template] -// CHECK:STDOUT: %.loc25: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_12: %.4 = field_decl d, element0 [template] +// CHECK:STDOUT: %.loc25: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -187,51 +187,51 @@ class A { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %a.var: ref %A = var a // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var -// CHECK:STDOUT: %.loc29_24: i32 = int_value 1 [template = constants.%.15] -// CHECK:STDOUT: %.loc29_25.1: %.12 = struct_literal (%.loc29_24) +// CHECK:STDOUT: %.loc29_24: i32 = int_value 1 [template = constants.%.14] +// CHECK:STDOUT: %.loc29_25.1: %.11 = struct_literal (%.loc29_24) // CHECK:STDOUT: %.loc29_25.2: ref i32 = class_element_access %a.var, element0 -// CHECK:STDOUT: %.loc29_25.3: init i32 = initialize_from %.loc29_24 to %.loc29_25.2 [template = constants.%.15] +// CHECK:STDOUT: %.loc29_25.3: init i32 = initialize_from %.loc29_24 to %.loc29_25.2 [template = constants.%.14] // CHECK:STDOUT: %.loc29_25.4: init %A = class_init (%.loc29_25.3), %a.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc29_26: init %A = converted %.loc29_25.1, %.loc29_25.4 [template = constants.%struct.1] // CHECK:STDOUT: assign %a.var, %.loc29_26 // CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref %B = var b // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var -// CHECK:STDOUT: %.loc30_24: i32 = int_value 2 [template = constants.%.17] -// CHECK:STDOUT: %.loc30_25.1: %.3 = struct_literal (%.loc30_24) +// CHECK:STDOUT: %.loc30_24: i32 = int_value 2 [template = constants.%.16] +// CHECK:STDOUT: %.loc30_25.1: %.2 = struct_literal (%.loc30_24) // CHECK:STDOUT: %.loc30_25.2: ref i32 = class_element_access %b.var, element0 -// CHECK:STDOUT: %.loc30_25.3: init i32 = initialize_from %.loc30_24 to %.loc30_25.2 [template = constants.%.17] +// CHECK:STDOUT: %.loc30_25.3: init i32 = initialize_from %.loc30_24 to %.loc30_25.2 [template = constants.%.16] // CHECK:STDOUT: %.loc30_25.4: init %B = class_init (%.loc30_25.3), %b.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc30_26: init %B = converted %.loc30_25.1, %.loc30_25.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %b.var, %.loc30_26 // CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc31_24: i32 = int_value 3 [template = constants.%.19] -// CHECK:STDOUT: %.loc31_25.1: %.9 = struct_literal (%.loc31_24) +// CHECK:STDOUT: %.loc31_24: i32 = int_value 3 [template = constants.%.18] +// CHECK:STDOUT: %.loc31_25.1: %.8 = struct_literal (%.loc31_24) // CHECK:STDOUT: %.loc31_25.2: ref i32 = class_element_access %c.var, element0 -// CHECK:STDOUT: %.loc31_25.3: init i32 = initialize_from %.loc31_24 to %.loc31_25.2 [template = constants.%.19] +// CHECK:STDOUT: %.loc31_25.3: init i32 = initialize_from %.loc31_24 to %.loc31_25.2 [template = constants.%.18] // CHECK:STDOUT: %.loc31_25.4: init %C = class_init (%.loc31_25.3), %c.var [template = constants.%struct.3] // CHECK:STDOUT: %.loc31_26: init %C = converted %.loc31_25.1, %.loc31_25.4 [template = constants.%struct.3] // CHECK:STDOUT: assign %c.var, %.loc31_26 // CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [template = constants.%D] // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var -// CHECK:STDOUT: %.loc32_24: i32 = int_value 4 [template = constants.%.21] -// CHECK:STDOUT: %.loc32_25.1: %.6 = struct_literal (%.loc32_24) +// CHECK:STDOUT: %.loc32_24: i32 = int_value 4 [template = constants.%.20] +// CHECK:STDOUT: %.loc32_25.1: %.5 = struct_literal (%.loc32_24) // CHECK:STDOUT: %.loc32_25.2: ref i32 = class_element_access %d.var, element0 -// CHECK:STDOUT: %.loc32_25.3: init i32 = initialize_from %.loc32_24 to %.loc32_25.2 [template = constants.%.21] +// CHECK:STDOUT: %.loc32_25.3: init i32 = initialize_from %.loc32_24 to %.loc32_25.2 [template = constants.%.20] // CHECK:STDOUT: %.loc32_25.4: init %D = class_init (%.loc32_25.3), %d.var [template = constants.%struct.4] // CHECK:STDOUT: %.loc32_26: init %D = converted %.loc32_25.1, %.loc32_25.4 [template = constants.%struct.4] // CHECK:STDOUT: assign %d.var, %.loc32_26 // CHECK:STDOUT: %AF.ref: %AF.type = name_ref AF, @A.%AF.decl [template = constants.%AF] -// CHECK:STDOUT: %AF.call: init %.1 = call %AF.ref() +// CHECK:STDOUT: %AF.call: init %empty_tuple.type = call %AF.ref() // CHECK:STDOUT: %BF.ref: %BF.type = name_ref BF, @B.%BF.decl [template = constants.%BF] -// CHECK:STDOUT: %BF.call: init %.1 = call %BF.ref() +// CHECK:STDOUT: %BF.call: init %empty_tuple.type = call %BF.ref() // CHECK:STDOUT: %CF.ref: %CF.type = name_ref CF, @C.%CF.decl [template = constants.%CF] -// CHECK:STDOUT: %CF.call: init %.1 = call %CF.ref() +// CHECK:STDOUT: %CF.call: init %empty_tuple.type = call %CF.ref() // CHECK:STDOUT: %DF.ref: %DF.type = name_ref DF, @D.%DF.decl [template = constants.%DF] -// CHECK:STDOUT: %DF.call: init %.1 = call %DF.ref() +// CHECK:STDOUT: %DF.call: init %empty_tuple.type = call %DF.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 66ea7fd31c93..f08b308590d0 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -32,21 +32,21 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,7 +101,7 @@ fn Run() { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -113,7 +113,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: return %.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,7 +128,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc22: i32 = int_value 2 [template = constants.%.4] // CHECK:STDOUT: return %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index 4d69b8052668..6fd49c1793eb 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -53,17 +53,17 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %Class [template] +// CHECK:STDOUT: %.1: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, i32 [template] -// CHECK:STDOUT: %.4: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, i32 [template] +// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -98,19 +98,19 @@ class Class { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc15_27: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc15_27: type = ptr_type %Class [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_35.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_35.2: type = converted %int.make_type_32.loc15, %.loc15_35.1 [template = i32] -// CHECK:STDOUT: %self.param.loc15: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc15: %.2 = bind_name self, %self.param.loc15 +// CHECK:STDOUT: %self.param.loc15: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc15: %.1 = bind_name self, %self.param.loc15 // CHECK:STDOUT: %return.param.loc15: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param.loc15 // CHECK:STDOUT: } @@ -133,27 +133,27 @@ class Class { // CHECK:STDOUT: %.loc5_22: ref i32 = return_slot %return.param.loc5 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %self.patt: %.2 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.2 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc6_23: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc6_23: type = ptr_type %Class [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_31.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_31.2: type = converted %int.make_type_32.loc6, %.loc6_31.1 [template = i32] -// CHECK:STDOUT: %self.param.loc6: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc6: %.2 = bind_name self, %self.param.loc6 +// CHECK:STDOUT: %self.param.loc6: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc6: %.1 = bind_name self, %self.param.loc6 // CHECK:STDOUT: %return.param.loc6: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %.loc6_28: ref i32 = return_slot %return.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32, %.loc8_10.1 [template = i32] -// CHECK:STDOUT: %.loc8_8: %.3 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_8: %.2 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -167,17 +167,17 @@ class Class { // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc11 -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] // CHECK:STDOUT: %.loc12_14.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_14.2: i32 = bind_value %.loc12_14.1 // CHECK:STDOUT: return %.loc12_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self.param_patt: %.2]() -> i32 { +// CHECK:STDOUT: fn @G[addr %self.param_patt: %.1]() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.2 = name_ref self, %self.loc15 +// CHECK:STDOUT: %self.ref: %.1 = name_ref self, %self.loc15 // CHECK:STDOUT: %.loc16_11: ref %Class = deref %self.ref -// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] +// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] // CHECK:STDOUT: %.loc16_17.1: ref i32 = class_element_access %.loc16_11, element0 // CHECK:STDOUT: %.loc16_17.2: i32 = bind_value %.loc16_17.1 // CHECK:STDOUT: return %.loc16_17.2 @@ -188,7 +188,7 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %.1: 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] @@ -197,18 +197,18 @@ class Class { // 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: %.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: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = 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: %.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: %.3: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.5: %.1 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -219,7 +219,7 @@ class Class { // 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 (%.2) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.6)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.1) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.5)] // 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 @@ -243,8 +243,8 @@ class Class { // 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.%.2)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.3)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -269,7 +269,7 @@ class Class { // CHECK:STDOUT: %return.param: ref = out_param runtime_param1 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -316,7 +316,7 @@ class Class { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.4 -// CHECK:STDOUT: %.2 => constants.%.5 +// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index c9e04feef970..b8e79024e6ff 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -37,27 +37,27 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // 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 = unbound_element_type %Base, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Base, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %SelfBase.type: type = fn_type @SelfBase [template] // CHECK:STDOUT: %SelfBase: %SelfBase.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Base [template] +// CHECK:STDOUT: %.6: type = ptr_type %Base [template] // CHECK:STDOUT: %AddrSelfBase.type: type = fn_type @AddrSelfBase [template] // CHECK:STDOUT: %AddrSelfBase: %AddrSelfBase.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %.11: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.9: i32 = int_value 1 [template] +// CHECK:STDOUT: %.10: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: %.5} [template] -// CHECK:STDOUT: %.13: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.11: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.12: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -95,28 +95,28 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc26_25: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc26_40: type = ptr_type %Base [template = constants.%.7] -// CHECK:STDOUT: %self.param.loc26: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc26: %.7 = bind_name self, %self.param.loc26 +// CHECK:STDOUT: %.loc26_40: type = ptr_type %Base [template = constants.%.6] +// CHECK:STDOUT: %self.param.loc26: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc26: %.6 = bind_name self, %self.param.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %p.patt: %.11 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.11 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.10 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.10 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.11] +// CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.10] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_32, %.loc30_25.1 [template = i32] -// CHECK:STDOUT: %p.param: %.11 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.11 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.10 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.10 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } @@ -126,8 +126,8 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -136,7 +136,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16: %.6 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc16: %.5 = base_decl %Base, element0 [template] // CHECK:STDOUT: %SelfBase.decl: %SelfBase.type = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %self.patt: %Base = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Base = value_param_pattern %self.patt, runtime_param0 @@ -153,16 +153,16 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %.loc18_29: ref i32 = return_slot %return.param.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { -// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc26_25: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc19: type = ptr_type %Base [template = constants.%.7] -// CHECK:STDOUT: %self.param.loc19: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %self.loc19: %.7 = bind_name self, %self.param.loc19 +// CHECK:STDOUT: %.loc19: type = ptr_type %Base [template = constants.%.6] +// CHECK:STDOUT: %self.param.loc19: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %self.loc19: %.6 = bind_name self, %self.param.loc19 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -177,36 +177,36 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: fn @SelfBase[%self.param_patt: %Base]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Base = name_ref self, %self.loc22 -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc23_14.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc23_14.2: i32 = bind_value %.loc23_14.1 // CHECK:STDOUT: return %.loc23_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AddrSelfBase[addr %self.param_patt: %.7]() { +// CHECK:STDOUT: fn @AddrSelfBase[addr %self.param_patt: %.6]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.7 = name_ref self, %self.loc26 +// CHECK:STDOUT: %self.ref: %.6 = name_ref self, %self.loc26 // CHECK:STDOUT: %.loc27_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc27_10: ref i32 = class_element_access %.loc27_4, element0 -// CHECK:STDOUT: %.loc27_15: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc27_15: i32 = int_value 1 [template = constants.%.9] // CHECK:STDOUT: assign %.loc27_10, %.loc27_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p.param_patt: %.11) -> i32 { +// CHECK:STDOUT: fn @Call(%p.param_patt: %.10) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref.loc31: %.11 = name_ref p, %p +// CHECK:STDOUT: %p.ref.loc31: %.10 = name_ref p, %p // CHECK:STDOUT: %.loc31_4.1: ref %Derived = deref %p.ref.loc31 // CHECK:STDOUT: %AddrSelfBase.ref: %AddrSelfBase.type = name_ref AddrSelfBase, @Derived.%AddrSelfBase.decl [template = constants.%AddrSelfBase] // CHECK:STDOUT: %.loc31_7: = bound_method %.loc31_4.1, %AddrSelfBase.ref -// CHECK:STDOUT: %.loc31_4.2: %.11 = addr_of %.loc31_4.1 +// CHECK:STDOUT: %.loc31_4.2: %.10 = addr_of %.loc31_4.1 // CHECK:STDOUT: %.loc31_4.3: ref %Derived = deref %.loc31_4.2 // CHECK:STDOUT: %.loc31_4.4: ref %Base = class_element_access %.loc31_4.3, element0 -// CHECK:STDOUT: %.loc31_4.5: %.7 = addr_of %.loc31_4.4 -// CHECK:STDOUT: %.loc31_4.6: %.7 = converted %.loc31_4.2, %.loc31_4.5 -// CHECK:STDOUT: %AddrSelfBase.call: init %.1 = call %.loc31_7(%.loc31_4.6) -// CHECK:STDOUT: %p.ref.loc32: %.11 = name_ref p, %p +// CHECK:STDOUT: %.loc31_4.5: %.6 = addr_of %.loc31_4.4 +// CHECK:STDOUT: %.loc31_4.6: %.6 = converted %.loc31_4.2, %.loc31_4.5 +// CHECK:STDOUT: %AddrSelfBase.call: init %empty_tuple.type = call %.loc31_7(%.loc31_4.6) +// CHECK:STDOUT: %p.ref.loc32: %.10 = name_ref p, %p // CHECK:STDOUT: %.loc32_11.1: ref %Derived = deref %p.ref.loc32 // CHECK:STDOUT: %SelfBase.ref: %SelfBase.type = name_ref SelfBase, @Derived.%SelfBase.decl [template = constants.%SelfBase] // CHECK:STDOUT: %.loc32_14: = bound_method %.loc32_11.1, %SelfBase.ref diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index 689cbcfb3c88..ae30ee1b6d48 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -27,17 +27,17 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %Class [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %Class, %.2 [template] -// CHECK:STDOUT: %.4: type = struct_type {.p: %.2} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.1: type = ptr_type %Class [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.p: %.1} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -98,9 +98,9 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc18_14: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %.loc18_8: %.3 = field_decl p, element0 [template] -// CHECK:STDOUT: %.loc19: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc18_14: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %.loc18_8: %.2 = field_decl p, element0 [template] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -114,9 +114,9 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc21 -// CHECK:STDOUT: %p.ref: %.3 = name_ref p, @Class.%.loc18_8 [template = @Class.%.loc18_8] -// CHECK:STDOUT: %.loc22_16.1: ref %.2 = class_element_access %self.ref, element0 -// CHECK:STDOUT: %.loc22_16.2: %.2 = bind_value %.loc22_16.1 +// CHECK:STDOUT: %p.ref: %.2 = name_ref p, @Class.%.loc18_8 [template = @Class.%.loc18_8] +// CHECK:STDOUT: %.loc22_16.1: ref %.1 = class_element_access %self.ref, element0 +// CHECK:STDOUT: %.loc22_16.2: %.1 = bind_value %.loc22_16.1 // CHECK:STDOUT: %.loc22_11.1: ref %Class = deref %.loc22_16.2 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc22_19: = bound_method %.loc22_11.1, %F.ref @@ -133,10 +133,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %s: ref %Class = bind_name s, %return // CHECK:STDOUT: %s.ref.loc15_5: ref %Class = name_ref s, %s // CHECK:STDOUT: %s.ref.loc15_16: ref %Class = name_ref s, %s -// CHECK:STDOUT: %.loc15_15: %.2 = addr_of %s.ref.loc15_16 -// CHECK:STDOUT: %.loc15_17.1: %.4 = struct_literal (%.loc15_15) -// CHECK:STDOUT: %.loc15_17.2: ref %.2 = class_element_access %s.ref.loc15_5, element0 -// CHECK:STDOUT: %.loc15_17.3: init %.2 = initialize_from %.loc15_15 to %.loc15_17.2 +// CHECK:STDOUT: %.loc15_15: %.1 = addr_of %s.ref.loc15_16 +// CHECK:STDOUT: %.loc15_17.1: %.3 = struct_literal (%.loc15_15) +// CHECK:STDOUT: %.loc15_17.2: ref %.1 = class_element_access %s.ref.loc15_5, element0 +// CHECK:STDOUT: %.loc15_17.3: init %.1 = initialize_from %.loc15_15 to %.loc15_17.2 // CHECK:STDOUT: %.loc15_17.4: init %Class = class_init (%.loc15_17.3), %s.ref.loc15_5 // CHECK:STDOUT: %.loc15_7: init %Class = converted %.loc15_17.1, %.loc15_17.4 // CHECK:STDOUT: assign %s.ref.loc15_5, %.loc15_7 diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index d3f8a9d70cbe..c8e63c5aceee 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -22,15 +22,15 @@ fn Run() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,7 +73,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 5b56eacc88a8..ce5778d13052 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -32,17 +32,17 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %a: i32 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: i32 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%a) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1000 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.4) [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1000 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.3) [template] // CHECK:STDOUT: %b: %C.3 = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt.1: %C.3 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] @@ -82,8 +82,8 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc4, runtime_param [symbolic = constants.%b.patt.2] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc3: i32 = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.4) [template = constants.%C.3] +// CHECK:STDOUT: %.loc3: i32 = int_value 1000 [template = constants.%.3] +// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] // CHECK:STDOUT: %b.param.loc3: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param.loc3 [symbolic = %b.loc3_9.2 (constants.%b)] // CHECK:STDOUT: } @@ -92,8 +92,8 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc4, runtime_param [symbolic = constants.%b.patt.2] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc4: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc4_15: i32 = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.4) [template = constants.%C.3] +// CHECK:STDOUT: %.loc4_15: i32 = int_value 1000 [template = constants.%.3] +// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] // CHECK:STDOUT: %b.param.loc4: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc4: %C.3 = bind_symbolic_name b, 0, %b.param.loc4 [symbolic = constants.%b] // CHECK:STDOUT: } @@ -106,7 +106,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc2_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc2_19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -120,7 +120,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_24: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_24: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D.2 @@ -134,9 +134,9 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.4) { -// CHECK:STDOUT: %a.loc2_9.2 => constants.%.4 -// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.4 +// CHECK:STDOUT: specific @C(constants.%.3) { +// CHECK:STDOUT: %a.loc2_9.2 => constants.%.3 +// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%b) { @@ -148,17 +148,17 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %a: i32 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: i32 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%a) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1000 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.4) [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1000 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.3) [template] // CHECK:STDOUT: %b: %C.3 = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt.1: %C.3 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] @@ -166,8 +166,8 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %D.2: type = class_type @D, @D(%b) [symbolic] // CHECK:STDOUT: %b.patt.2: %C.3 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = class_type @.1, @.1(%b) [symbolic] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = class_type @.1, @.1(%b) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -201,18 +201,18 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc3_9.1, runtime_param [symbolic = %b.patt.loc3_9.2 (constants.%b.patt.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc3: i32 = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.4) [template = constants.%C.3] +// CHECK:STDOUT: %.loc3: i32 = int_value 1000 [template = constants.%.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] // CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc3_9.2 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %b.patt.loc10_9.1: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt.2)] // CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc10_9.1, runtime_param [symbolic = %b.patt.loc10_9.2 (constants.%b.patt.2)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_15: i32 = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.4) [template = constants.%C.3] +// CHECK:STDOUT: %.loc10_15: i32 = int_value 1000 [template = constants.%.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] // CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc10_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_9.2 (constants.%b)] // CHECK:STDOUT: } @@ -225,7 +225,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc2_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc2_19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -246,10 +246,10 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc10_24: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_24: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.6 +// CHECK:STDOUT: .Self = constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -260,9 +260,9 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.4) { -// CHECK:STDOUT: %a.loc2_9.2 => constants.%.4 -// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.4 +// CHECK:STDOUT: specific @C(constants.%.3) { +// CHECK:STDOUT: %a.loc2_9.2 => constants.%.3 +// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%b) { diff --git a/toolchain/check/testdata/class/todo_access_modifiers.carbon b/toolchain/check/testdata/class/todo_access_modifiers.carbon index 18c9233e8c5f..4defd8cba739 100644 --- a/toolchain/check/testdata/class/todo_access_modifiers.carbon +++ b/toolchain/check/testdata/class/todo_access_modifiers.carbon @@ -24,15 +24,15 @@ class Access { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Access: type = class_type @Access [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %Access, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.k: i32, .l: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %Access, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.k: i32, .l: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,12 +59,12 @@ class Access { // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_32.loc17, %.loc17_18.1 [template = i32] -// CHECK:STDOUT: %.loc17_16: %.2 = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc17_16: %.1 = field_decl k, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_20.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_20.2: type = converted %int.make_type_32.loc19, %.loc19_20.1 [template = i32] -// CHECK:STDOUT: %.loc19_18: %.2 = field_decl l, element1 [template] -// CHECK:STDOUT: %.loc20: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc19_18: %.1 = field_decl l, element1 [template] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Access diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 3cf14070cd5d..6d7c8eeba9f1 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -52,13 +52,13 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %I.type: type = fn_type @I [template] // CHECK:STDOUT: %I: %I.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type [template] -// CHECK:STDOUT: %.3: type = struct_type {.: %.2} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = ptr_type [template] +// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] // CHECK:STDOUT: %J: %J.type = struct_value () [template] @@ -89,7 +89,7 @@ fn F() { // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} // CHECK:STDOUT: %I.decl: %I.type = fn_decl @I [template = constants.%I] {} {} -// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -101,7 +101,7 @@ fn F() { // CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [template = constants.%J] {} {} // CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [template = constants.%K] {} {} // CHECK:STDOUT: %L.decl: %L.type = fn_decl @L [template = constants.%L] {} {} -// CHECK:STDOUT: %.loc16: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract @@ -125,16 +125,16 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.2: type = ptr_type [template] -// CHECK:STDOUT: %.3: type = struct_type {.: %.2} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.7: type = struct_type {.: %.2, .base: %Base} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.1: type = ptr_type [template] +// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.6: type = struct_type {.: %.1, .base: %Base} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -167,8 +167,8 @@ fn F() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %Modifiers.ref: = name_ref Modifiers, imports.%Modifiers [template = imports.%Modifiers] // CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%import_ref.1 [template = constants.%Base] -// CHECK:STDOUT: %.loc8: %.6 = base_decl %Base, element0 [template] -// CHECK:STDOUT: %.loc9: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc8: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.6 [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -190,14 +190,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %.2: type = ptr_type [template] -// CHECK:STDOUT: %.3: type = struct_type {.: %.2} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %.1: type = ptr_type [template] +// CHECK:STDOUT: %.2: type = struct_type {.: %.1} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -239,7 +239,7 @@ fn F() { // CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%import_ref.1 [template = constants.%Base] // CHECK:STDOUT: %v.var: ref %Base = var v // CHECK:STDOUT: %v: ref %Base = bind_name v, %v.var -// CHECK:STDOUT: %.loc7_28.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc7_28.1: %.5 = struct_literal () // CHECK:STDOUT: %.loc7_28.2: init %Base = class_init (), %v.var [template = ] // CHECK:STDOUT: %.loc7_29: init %Base = converted %.loc7_28.1, %.loc7_28.2 [template = ] // CHECK:STDOUT: assign %v.var, %.loc7_29 diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index 5c796cd2a1fd..da0ffd6a49db 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -20,15 +20,15 @@ fn B(p: const (i32*)) -> const (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: type = const_type i32 [template] +// CHECK:STDOUT: %.1: type = const_type i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] // CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type i32 [template] -// CHECK:STDOUT: %.6: type = const_type %.5 [template] +// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %.5: type = const_type %.4 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -50,62 +50,62 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_15 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_15, %.loc11_9.1 [template = i32] -// CHECK:STDOUT: %.loc11_9.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_18: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_19: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_9.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_18: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_19: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32.loc11_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11_31 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11_31, %.loc11_25.1 [template = i32] -// CHECK:STDOUT: %.loc11_25.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_34: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_35: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc11_25.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_34: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_35: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc15_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32.loc15_16 [template = i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32.loc15_16, %.loc15_19.1 [template = i32] -// CHECK:STDOUT: %.loc15_19.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_9: type = const_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_19.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_9: type = const_type %.4 [template = constants.%.5] // CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_32.loc15_33 [template = i32] // CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_32.loc15_33, %.loc15_36.1 [template = i32] -// CHECK:STDOUT: %.loc15_36.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_26: type = const_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %.loc15_36.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_26: type = const_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @A(%p.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @A(%p.param_patt: %.3) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%p.param_patt: %.6) -> %.6 { +// CHECK:STDOUT: fn @B(%p.param_patt: %.5) -> %.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.5 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index 9ddde2d8c48f..a5bc31faf2c7 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -20,11 +20,11 @@ fn F(p: const i32**) -> const (const 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: type = const_type i32 [template] +// CHECK:STDOUT: %.1: type = const_type i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] // CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -45,36 +45,36 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc15_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_32.loc15_15 [template = i32] // CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_32.loc15_15, %.loc15_9.1 [template = i32] -// CHECK:STDOUT: %.loc15_9.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_18: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_19: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_9.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_18: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_19: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_32.loc15_38 [template = i32] // CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_32.loc15_38, %.loc15_32.1 [template = i32] -// CHECK:STDOUT: %.loc15_32.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_25: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_42: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_43: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc15_32.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_25: type = const_type %.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_42: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_43: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @F(%p.param_patt: %.3) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index 168b0d6239c0..25bc6b4b2e9f 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -26,13 +26,13 @@ fn G(p: const (const i32)**) -> 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: type = const_type i32 [template] +// CHECK:STDOUT: %.1: type = const_type i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] // CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -44,14 +44,14 @@ fn G(p: const (const i32)**) -> i32** { // 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: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.6) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.6) [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.5) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,7 +64,7 @@ fn G(p: const (const i32)**) -> i32** { // 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 (%.7) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] // 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 @@ -77,27 +77,27 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32] // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_32.loc15_22, %.loc15_16.1 [template = i32] -// CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_9: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_26: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_27: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_9: type = const_type %.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_26: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_27: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_32.loc15_33 [template = i32] // CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_32.loc15_33, %.loc15_36.1 [template = i32] -// CHECK:STDOUT: %.loc15_36.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_37: type = ptr_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %.loc15_36.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_37: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,8 +110,8 @@ fn G(p: const (const i32)**) -> i32** { // 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.%.7)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -123,10 +123,10 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.4) -> %.6 { +// CHECK:STDOUT: fn @G(%p.param_patt: %.3) -> %.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc22: %.6 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p +// CHECK:STDOUT: %.loc22: %.5 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -159,16 +159,16 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.6) { -// CHECK:STDOUT: %Dest => constants.%.6 -// CHECK:STDOUT: %Dest.patt => constants.%.6 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) { +// CHECK:STDOUT: %Dest => constants.%.5 +// CHECK:STDOUT: %Dest.patt => constants.%.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.9 -// CHECK:STDOUT: %.2 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index 1040d39a8597..2a94c70958f6 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -30,12 +30,12 @@ var a_ptr: const i32* = a_ptr_ref; // 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 = const_type i32 [template] +// CHECK:STDOUT: %.1: type = const_type i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,42 +56,42 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_11.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc4_11.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_12.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_12.2: type = converted %int.make_type_32.loc6, %.loc6_12.1 [template = i32] -// CHECK:STDOUT: %.loc6_12.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %a_ref.var: ref %.2 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.2 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %.loc6_12.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %a_ref.var: ref %.1 = var a_ref +// CHECK:STDOUT: %a_ref: ref %.1 = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7, %.loc7_16.1 [template = i32] -// CHECK:STDOUT: %.loc7_16.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_25: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %a_ptr_ref.var: ref %.3 = var a_ptr_ref -// CHECK:STDOUT: %a_ptr_ref: ref %.3 = bind_name a_ptr_ref, %a_ptr_ref.var +// CHECK:STDOUT: %.loc7_16.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_25: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %a_ptr_ref.var: ref %.2 = var a_ptr_ref +// CHECK:STDOUT: %a_ptr_ref: ref %.2 = bind_name a_ptr_ref, %a_ptr_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.2; +// CHECK:STDOUT: fn @F() -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.2 = call %F.ref() +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%a_ref.var, %F.call -// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, file.%a_ref -// CHECK:STDOUT: %.loc7: %.3 = addr_of %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %.1 = name_ref a_ref, file.%a_ref +// CHECK:STDOUT: %.loc7: %.2 = addr_of %a_ref.ref // CHECK:STDOUT: assign file.%a_ptr_ref.var, %.loc7 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -100,16 +100,16 @@ var a_ptr: const i32* = a_ptr_ref; // 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 = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = const_type i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+20, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref Implicit//default, inst+28, loaded -// CHECK:STDOUT: %import_ref.3: ref %.3 = import_ref Implicit//default, inst+39, loaded +// CHECK:STDOUT: %import_ref.2: ref %.1 = import_ref Implicit//default, inst+28, loaded +// CHECK:STDOUT: %import_ref.3: ref %.2 = import_ref Implicit//default, inst+39, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.4 // CHECK:STDOUT: import Core//prelude @@ -133,28 +133,28 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] -// CHECK:STDOUT: %.loc6_8.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_17: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref %.3 = var a -// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %.loc6_8.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_17: type = ptr_type %.1 [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.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_12.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_12.2: type = converted %int.make_type_32.loc7, %.loc7_12.1 [template = i32] -// CHECK:STDOUT: %.loc7_12.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_21: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %a_ptr.var: ref %.3 = var a_ptr -// CHECK:STDOUT: %a_ptr: ref %.3 = bind_name a_ptr, %a_ptr.var +// CHECK:STDOUT: %.loc7_12.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_21: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %a_ptr.var: ref %.2 = var a_ptr +// CHECK:STDOUT: %a_ptr: ref %.2 = bind_name a_ptr, %a_ptr.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: %a_ref.ref: ref %.2 = name_ref a_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc6: %.3 = addr_of %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %.1 = name_ref a_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc6: %.2 = addr_of %a_ref.ref // CHECK:STDOUT: assign file.%a.var, %.loc6 -// CHECK:STDOUT: %a_ptr_ref.ref: ref %.3 = name_ref a_ptr_ref, imports.%import_ref.3 -// CHECK:STDOUT: %.loc7: %.3 = bind_value %a_ptr_ref.ref +// CHECK:STDOUT: %a_ptr_ref.ref: ref %.2 = name_ref a_ptr_ref, imports.%import_ref.3 +// CHECK:STDOUT: %.loc7: %.2 = bind_value %a_ptr_ref.ref // CHECK:STDOUT: assign file.%a_ptr.var, %.loc7 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index e6ce41598146..271f709aff04 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -108,21 +108,21 @@ fn G() -> C { // CHECK:STDOUT: %.3: i32 = int_value 3 [template] // CHECK:STDOUT: %.4: type = array_type %.3, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [symbolic] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [symbolic] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.9: type = array_type %.3, %C [template] -// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] -// CHECK:STDOUT: %.11: type = tuple_type (%.1, %.1, %.1) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: type = array_type %.3, %C [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.12: i32 = int_value 1 [template] -// CHECK:STDOUT: %.13: i32 = int_value 2 [template] -// CHECK:STDOUT: %array: %.9 = tuple_value (%struct, %struct, %struct) [template] -// CHECK:STDOUT: %.14: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.10: i32 = int_value 1 [template] +// CHECK:STDOUT: %.11: i32 = int_value 2 [template] +// CHECK:STDOUT: %array: %.8 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.12: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -187,7 +187,7 @@ fn G() -> C { // CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a -// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref // CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43 // CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2 @@ -199,33 +199,33 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc9_14: i32 = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14, %C [template = constants.%.9] -// CHECK:STDOUT: %a.var: ref %.9 = var a -// CHECK:STDOUT: %a: ref %.9 = bind_name a, %a.var +// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14, %C [template = constants.%.8] +// CHECK:STDOUT: %a.var: ref %.8 = var a +// CHECK:STDOUT: %a: ref %.8 = bind_name a, %a.var // CHECK:STDOUT: %.loc9_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc9_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc9_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc9_30.1: %.11 = tuple_literal (%.loc9_21.1, %.loc9_25.1, %.loc9_29.1) -// CHECK:STDOUT: %.loc9_30.2: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_30.1: %tuple.type = tuple_literal (%.loc9_21.1, %.loc9_25.1, %.loc9_29.1) +// CHECK:STDOUT: %.loc9_30.2: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc9_30.3: ref %C = array_index %a.var, %.loc9_30.2 // CHECK:STDOUT: %.loc9_21.2: init %C = class_init (), %.loc9_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc9_30.4: init %C = converted %.loc9_21.1, %.loc9_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.5: i32 = int_value 1 [template = constants.%.12] +// CHECK:STDOUT: %.loc9_30.5: i32 = int_value 1 [template = constants.%.10] // CHECK:STDOUT: %.loc9_30.6: ref %C = array_index %a.var, %.loc9_30.5 // CHECK:STDOUT: %.loc9_25.2: init %C = class_init (), %.loc9_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc9_30.7: init %C = converted %.loc9_25.1, %.loc9_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.8: i32 = int_value 2 [template = constants.%.13] +// CHECK:STDOUT: %.loc9_30.8: i32 = int_value 2 [template = constants.%.11] // CHECK:STDOUT: %.loc9_30.9: ref %C = array_index %a.var, %.loc9_30.8 // CHECK:STDOUT: %.loc9_29.2: init %C = class_init (), %.loc9_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc9_30.10: init %C = converted %.loc9_29.1, %.loc9_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.11: init %.9 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc9_31: init %.9 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc9_30.11: init %.8 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc9_31: init %.8 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.9 = name_ref a, %a -// CHECK:STDOUT: %.loc10_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.14] +// CHECK:STDOUT: %a.ref: ref %.8 = name_ref a, %a +// CHECK:STDOUT: %.loc10_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.12] // CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc10_12: %.9 = bind_value %a.ref +// CHECK:STDOUT: %.loc10_12: %.8 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %C = call %.loc10_10(%.loc10_12) to %.loc8_8.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } @@ -239,7 +239,7 @@ fn G() -> C { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_24.2 => constants.%.9 +// CHECK:STDOUT: %.loc6_24.2 => constants.%.8 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -251,7 +251,7 @@ fn G() -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] @@ -259,16 +259,16 @@ fn G() -> C { // 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: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, %C [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.8: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 3 [template] +// CHECK:STDOUT: %.5: type = array_type %.4, %C [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %.11: i32 = int_value 2 [template] -// CHECK:STDOUT: %array: %.6 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.8: i32 = int_value 1 [template] +// CHECK:STDOUT: %.9: i32 = int_value 2 [template] +// CHECK:STDOUT: %array: %.5 = tuple_value (%struct, %struct, %struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -348,31 +348,31 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.6] -// CHECK:STDOUT: %a.var: ref %.6 = var a -// CHECK:STDOUT: %a: ref %.6 = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.5] +// CHECK:STDOUT: %a.var: ref %.5 = var a +// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_30.1: %.8 = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) +// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2 // CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.8] // CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5 // CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.9] // CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8 // CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.6 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.6 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc13_30.11: init %.5 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %.5 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -390,7 +390,7 @@ fn G() -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 1 [symbolic] @@ -398,16 +398,16 @@ fn G() -> C { // 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: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, %C [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.8: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 3 [template] +// CHECK:STDOUT: %.5: type = array_type %.4, %C [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %.11: i32 = int_value 2 [template] -// CHECK:STDOUT: %array: %.6 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.8: i32 = int_value 1 [template] +// CHECK:STDOUT: %.9: i32 = int_value 2 [template] +// CHECK:STDOUT: %array: %.5 = tuple_value (%struct, %struct, %struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -485,31 +485,31 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.6] -// CHECK:STDOUT: %a.var: ref %.6 = var a -// CHECK:STDOUT: %a: ref %.6 = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.5] +// CHECK:STDOUT: %a.var: ref %.5 = var a +// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_30.1: %.8 = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) +// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2 // CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.8] // CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5 // CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.9] // CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8 // CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.6 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.6 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc13_30.11: init %.5 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %.5 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -531,23 +531,23 @@ fn G() -> C { // CHECK:STDOUT: %.3: i32 = int_value 2 [template] // CHECK:STDOUT: %.4: type = array_type %.3, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [symbolic] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [symbolic] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.9: i32 = int_value 3 [template] -// CHECK:STDOUT: %.10: type = array_type %.9, %C [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: type = tuple_type (%.1, %.1, %.1) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: i32 = int_value 3 [template] +// CHECK:STDOUT: %.9: type = array_type %.8, %C [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.13: i32 = int_value 1 [template] -// CHECK:STDOUT: %array: %.10 = tuple_value (%struct, %struct, %struct) [template] -// CHECK:STDOUT: %.14: type = array_type %.3, %C [template] -// CHECK:STDOUT: %.15: = specific_function %F, @F(%C) [template] -// CHECK:STDOUT: %.16: type = ptr_type %.14 [template] +// CHECK:STDOUT: %.11: i32 = int_value 1 [template] +// CHECK:STDOUT: %array: %.9 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.12: type = array_type %.3, %C [template] +// CHECK:STDOUT: %.13: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.14: type = ptr_type %.12 [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] @@ -557,14 +557,14 @@ fn G() -> C { // 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: %.17: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.14) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.14) [template] +// CHECK:STDOUT: %.15: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.12) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.12) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.19: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.21: %.17 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.17: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.19: %.15 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -575,7 +575,7 @@ fn G() -> C { // 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 (%.17) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.21)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.15) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.19)] // 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 @@ -628,8 +628,8 @@ fn G() -> C { // 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.%.17)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.17) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.18)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.15)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.15) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -656,7 +656,7 @@ fn G() -> C { // CHECK:STDOUT: fn[%T.param_patt: type](%a.param_patt: @F.%.loc6_24.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a -// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc6_43: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref // CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43 // CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2 @@ -667,19 +667,19 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10_14: i32 = int_value 3 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14, %C [template = constants.%.10] -// CHECK:STDOUT: %a.var: ref %.10 = var a -// CHECK:STDOUT: %a: ref %.10 = bind_name a, %a.var +// CHECK:STDOUT: %.loc10_14: i32 = int_value 3 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14, %C [template = constants.%.9] +// CHECK:STDOUT: %a.var: ref %.9 = var a +// CHECK:STDOUT: %a: ref %.9 = bind_name a, %a.var // CHECK:STDOUT: %.loc10_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc10_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc10_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc10_30.1: %.12 = tuple_literal (%.loc10_21.1, %.loc10_25.1, %.loc10_29.1) -// CHECK:STDOUT: %.loc10_30.2: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_30.1: %tuple.type = tuple_literal (%.loc10_21.1, %.loc10_25.1, %.loc10_29.1) +// CHECK:STDOUT: %.loc10_30.2: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc10_30.3: ref %C = array_index %a.var, %.loc10_30.2 // CHECK:STDOUT: %.loc10_21.2: init %C = class_init (), %.loc10_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc10_30.4: init %C = converted %.loc10_21.1, %.loc10_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.5: i32 = int_value 1 [template = constants.%.13] +// CHECK:STDOUT: %.loc10_30.5: i32 = int_value 1 [template = constants.%.11] // CHECK:STDOUT: %.loc10_30.6: ref %C = array_index %a.var, %.loc10_30.5 // CHECK:STDOUT: %.loc10_25.2: init %C = class_init (), %.loc10_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc10_30.7: init %C = converted %.loc10_25.1, %.loc10_25.2 [template = constants.%struct] @@ -687,14 +687,14 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_30.9: ref %C = array_index %a.var, %.loc10_30.8 // CHECK:STDOUT: %.loc10_29.2: init %C = class_init (), %.loc10_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc10_30.10: init %C = converted %.loc10_29.1, %.loc10_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.11: init %.10 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc10_31: init %.10 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc10_30.11: init %.9 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc10_31: init %.9 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc10_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.10 = name_ref a, %a -// CHECK:STDOUT: %.loc21_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.15] +// CHECK:STDOUT: %a.ref: ref %.9 = name_ref a, %a +// CHECK:STDOUT: %.loc21_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.13] // CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc21_12: %.14 = converted %a.ref, [template = ] +// CHECK:STDOUT: %.loc21_12: %.12 = converted %a.ref, [template = ] // CHECK:STDOUT: %F.call: init %C = call %.loc21_10() to %.loc8_8.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } @@ -716,7 +716,7 @@ fn G() -> C { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_24.2 => constants.%.14 +// CHECK:STDOUT: %.loc6_24.2 => constants.%.12 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -742,17 +742,17 @@ fn G() -> C { // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.14) { -// CHECK:STDOUT: %Dest => constants.%.14 -// CHECK:STDOUT: %Dest.patt => constants.%.14 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.12) { +// CHECK:STDOUT: %Dest => constants.%.12 +// CHECK:STDOUT: %Dest.patt => constants.%.12 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.19 -// CHECK:STDOUT: %.2 => constants.%.20 +// CHECK:STDOUT: %.1 => constants.%.17 +// CHECK:STDOUT: %.2 => constants.%.18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_type_mismatch.carbon @@ -763,7 +763,7 @@ fn G() -> C { // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] @@ -771,16 +771,16 @@ fn G() -> C { // 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: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, %D [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.8: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 3 [template] +// CHECK:STDOUT: %.5: type = array_type %.4, %D [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] // CHECK:STDOUT: %struct: %D = struct_value () [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %.11: i32 = int_value 2 [template] -// CHECK:STDOUT: %array: %.6 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.8: i32 = int_value 1 [template] +// CHECK:STDOUT: %.9: i32 = int_value 2 [template] +// CHECK:STDOUT: %array: %.5 = tuple_value (%struct, %struct, %struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -869,31 +869,31 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %D [template = constants.%.6] -// CHECK:STDOUT: %a.var: ref %.6 = var a -// CHECK:STDOUT: %a: ref %.6 = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_14: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %D [template = constants.%.5] +// CHECK:STDOUT: %a.var: ref %.5 = var a +// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc13_30.1: %.8 = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) +// CHECK:STDOUT: %.loc13_30.2: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc13_30.3: ref %D = array_index %a.var, %.loc13_30.2 // CHECK:STDOUT: %.loc13_21.2: init %D = class_init (), %.loc13_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.4: init %D = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_30.5: i32 = int_value 1 [template = constants.%.8] // CHECK:STDOUT: %.loc13_30.6: ref %D = array_index %a.var, %.loc13_30.5 // CHECK:STDOUT: %.loc13_25.2: init %D = class_init (), %.loc13_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.7: init %D = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc13_30.8: i32 = int_value 2 [template = constants.%.9] // CHECK:STDOUT: %.loc13_30.9: ref %D = array_index %a.var, %.loc13_30.8 // CHECK:STDOUT: %.loc13_29.2: init %D = class_init (), %.loc13_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.10: init %D = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.6 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.6 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc13_30.11: init %.5 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %.5 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index e206bf2ec37d..cbb46b5b218d 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -71,21 +71,21 @@ fn G() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: = specific_function %F, @F(%D) [template] +// CHECK:STDOUT: %.5: = specific_function %F, @F(%D) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -155,7 +155,7 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -163,7 +163,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -175,13 +175,13 @@ fn G() -> i32 { // CHECK:STDOUT: %C.loc7_20.2: type = class_type @C, @C(%T.loc7_6.2) [symbolic = %C.loc7_20.2 (constants.%C.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%C.loc7_20.2 (%C.2)) -> @F.%T.loc7_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: @F.%C.loc7_20.2 (%C.2) = name_ref p, %p -// CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: %F.call: init @F.%T.loc7_6.2 (%T) = call %.loc7_39.1(%p.ref) // CHECK:STDOUT: %.loc7_43.1: @F.%T.loc7_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_43.2: @F.%T.loc7_6.2 (%T) = converted %F.call, %.loc7_43.1 @@ -193,7 +193,7 @@ fn G() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %C.3 = name_ref p, %p -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%D) [template = constants.%.6] +// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%D) [template = constants.%.5] // CHECK:STDOUT: %.loc9_15.2: ref %D = splice_block %return {} // CHECK:STDOUT: %F.call: init %D = call %.loc10(%p.ref) to %.loc9_15.2 // CHECK:STDOUT: return %F.call to %return @@ -217,7 +217,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.loc7_20.2 => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.5 +// CHECK:STDOUT: %.loc7_39.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc7_6.2) { @@ -239,7 +239,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.loc7_20.2 => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.6 +// CHECK:STDOUT: %.loc7_39.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- interface.carbon @@ -248,21 +248,21 @@ fn G() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type: type = generic_class_type @I [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I.1: %I.type = struct_value () [template] // CHECK:STDOUT: %I.2: type = class_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: %I.3: type = class_type @I, @I(%C) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.5: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -332,7 +332,7 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%I.2 @@ -340,7 +340,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -352,13 +352,13 @@ fn G() -> i32 { // CHECK:STDOUT: %I.loc7_20.2: type = class_type @I, @I(%T.loc7_6.2) [symbolic = %I.loc7_20.2 (constants.%I.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%I.loc7_20.2 (%I.2)) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: @F.%I.loc7_20.2 (%I.2) = name_ref p, %p -// CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: %.loc7_25.2: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %.loc7_39.1(%p.ref) to %.loc7_25.2 // CHECK:STDOUT: return %F.call to %return @@ -369,7 +369,7 @@ fn G() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %I.3 = name_ref p, %p -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.6] +// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.5] // CHECK:STDOUT: %.loc9_15.2: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %.loc10(%p.ref) to %.loc9_15.2 // CHECK:STDOUT: return %F.call to %return @@ -393,7 +393,7 @@ fn G() -> i32 { // CHECK:STDOUT: %I.loc7_20.2 => constants.%I.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.5 +// CHECK:STDOUT: %.loc7_39.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc7_6.2) { @@ -415,7 +415,7 @@ fn G() -> i32 { // CHECK:STDOUT: %I.loc7_20.2 => constants.%I.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_39.2 => constants.%.6 +// CHECK:STDOUT: %.loc7_39.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nested.carbon @@ -424,7 +424,7 @@ fn G() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Outer.1: %Outer.type = struct_value () [template] // CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -432,29 +432,29 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.type.1: type = generic_class_type @Inner, @Outer(%T) [symbolic] // CHECK:STDOUT: %Inner.1: %Inner.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %U) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.6: type = tuple_type (%T, %U) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %U) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [symbolic] -// CHECK:STDOUT: %.8: = specific_function %F, @F(%T, %U) [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %tuple.type.2 [symbolic] +// CHECK:STDOUT: %.5: = specific_function %F, @F(%T, %U) [symbolic] // CHECK:STDOUT: %Outer.3: type = class_type @Outer, @Outer(%C) [template] // CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%C) [template] // CHECK:STDOUT: %Inner.3: %Inner.type.2 = struct_value () [template] // CHECK:STDOUT: %Inner.4: type = class_type @Inner, @Inner(%C, %D) [template] -// CHECK:STDOUT: %.9: type = tuple_type (%C, %D) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%C, %D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = tuple_type (%.4, %.4) [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: = specific_function %F, @F(%C, %D) [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.3, %.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %tuple.type.4 [template] +// CHECK:STDOUT: %.7: = specific_function %F, @F(%C, %D) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -490,8 +490,8 @@ fn G() -> i32 { // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_16.1, runtime_param [symbolic = %U.patt.loc13_16.2 (constants.%U.patt.2)] // CHECK:STDOUT: %p.patt: @F.%Inner.loc13_43.2 (%Inner.2) = binding_pattern p // CHECK:STDOUT: %p.param_patt: @F.%Inner.loc13_43.2 (%Inner.2) = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%.loc13_56.3 (%.6) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%.loc13_56.3 (%.6) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.%tuple.type (%tuple.type.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%tuple.type (%tuple.type.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] // CHECK:STDOUT: %T.ref.loc13_35: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] @@ -502,22 +502,22 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.loc13_43.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_43.2 (constants.%Inner.2)] // CHECK:STDOUT: %T.ref.loc13_52: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc13_55: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %.loc13_56.1: %.5 = tuple_literal (%T.ref.loc13_52, %U.ref.loc13_55) -// CHECK:STDOUT: %.loc13_56.2: type = converted %.loc13_56.1, constants.%.6 [symbolic = %.loc13_56.3 (constants.%.6)] +// CHECK:STDOUT: %.loc13_56.1: %tuple.type.1 = tuple_literal (%T.ref.loc13_52, %U.ref.loc13_55) +// CHECK:STDOUT: %.loc13_56.2: type = converted %.loc13_56.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %p.param: @F.%Inner.loc13_43.2 (%Inner.2) = value_param runtime_param0 // CHECK:STDOUT: %p: @F.%Inner.loc13_43.2 (%Inner.2) = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref @F.%.loc13_56.3 (%.6) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%.loc13_56.3 (%.6) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %p.patt: %Inner.4 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %Inner.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.9 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.9 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] // CHECK:STDOUT: %C.ref.loc15_15: type = name_ref C, file.%C.decl [template = constants.%C] @@ -528,12 +528,12 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%C, constants.%D) [template = constants.%Inner.4] // CHECK:STDOUT: %C.ref.loc15_32: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %D.ref.loc15_35: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc15_36.1: %.5 = tuple_literal (%C.ref.loc15_32, %D.ref.loc15_35) -// CHECK:STDOUT: %.loc15_36.2: type = converted %.loc15_36.1, constants.%.9 [template = constants.%.9] +// CHECK:STDOUT: %.loc15_36.1: %tuple.type.1 = tuple_literal (%C.ref.loc15_32, %D.ref.loc15_35) +// CHECK:STDOUT: %.loc15_36.2: type = converted %.loc15_36.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %p.param: %Inner.4 = value_param runtime_param0 // CHECK:STDOUT: %p: %Inner.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.9 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.9 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -553,7 +553,7 @@ fn G() -> i32 { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc5_15.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc5_15.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer.2 @@ -568,7 +568,7 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc5: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc5: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner.2 @@ -576,14 +576,14 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -598,19 +598,19 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc13_6.2) [symbolic = %Inner.type (constants.%Inner.type.1)] // CHECK:STDOUT: %Inner.loc13_37: @F.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc13_37 (constants.%Inner.1)] // CHECK:STDOUT: %Inner.loc13_43.2: type = class_type @Inner, @Inner(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %Inner.loc13_43.2 (constants.%Inner.2)] -// CHECK:STDOUT: %.loc13_56.3: type = tuple_type (@F.%T.loc13_6.2 (%T), @F.%U.loc13_16.2 (%U)) [symbolic = %.loc13_56.3 (constants.%.6)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%T.loc13_6.2 (%T), @F.%U.loc13_16.2 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %.loc13_67.2 (constants.%.8)] +// CHECK:STDOUT: %.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %.loc13_67.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%p.param_patt: @F.%Inner.loc13_43.2 (%Inner.2)) -> %return: @F.%.loc13_56.3 (%.6) { +// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%p.param_patt: @F.%Inner.loc13_43.2 (%Inner.2)) -> %return: @F.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: @F.%Inner.loc13_43.2 (%Inner.2) = name_ref p, %p -// CHECK:STDOUT: %.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc13_67.2 (constants.%.8)] -// CHECK:STDOUT: %.loc13_68.1: ref @F.%.loc13_56.3 (%.6) = temporary_storage -// CHECK:STDOUT: %F.call: init @F.%.loc13_56.3 (%.6) = call %.loc13_67.1(%p.ref) to %.loc13_68.1 -// CHECK:STDOUT: %.loc13_68.2: ref @F.%.loc13_56.3 (%.6) = temporary %.loc13_68.1, %F.call +// CHECK:STDOUT: %.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc13_67.2 (constants.%.5)] +// CHECK:STDOUT: %.loc13_68.1: ref @F.%tuple.type (%tuple.type.2) = temporary_storage +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.2) = call %.loc13_67.1(%p.ref) to %.loc13_68.1 +// CHECK:STDOUT: %.loc13_68.2: ref @F.%tuple.type (%tuple.type.2) = temporary %.loc13_68.1, %F.call // CHECK:STDOUT: %.loc13_68.3: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_68.2, element0 // CHECK:STDOUT: %.loc13_68.4: @F.%T.loc13_6.2 (%T) = bind_value %.loc13_68.3 // CHECK:STDOUT: %.loc13_68.5: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0 @@ -619,19 +619,19 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc13_68.8: @F.%U.loc13_16.2 (%U) = bind_value %.loc13_68.7 // CHECK:STDOUT: %.loc13_68.9: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1 // CHECK:STDOUT: %.loc13_68.10: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_68.8 to %.loc13_68.9 -// CHECK:STDOUT: %.loc13_68.11: init @F.%.loc13_56.3 (%.6) = tuple_init (%.loc13_68.6, %.loc13_68.10) to %return -// CHECK:STDOUT: %.loc13_71: init @F.%.loc13_56.3 (%.6) = converted %F.call, %.loc13_68.11 +// CHECK:STDOUT: %.loc13_68.11: init @F.%tuple.type (%tuple.type.2) = tuple_init (%.loc13_68.6, %.loc13_68.10) to %return +// CHECK:STDOUT: %.loc13_71: init @F.%tuple.type (%tuple.type.2) = converted %F.call, %.loc13_68.11 // CHECK:STDOUT: return %.loc13_71 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %Inner.4) -> %return: %.9 { +// CHECK:STDOUT: fn @G(%p.param_patt: %Inner.4) -> %return: %tuple.type.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %Inner.4 = name_ref p, %p -// CHECK:STDOUT: %.loc16: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%.12] -// CHECK:STDOUT: %.loc15_28.2: ref %.9 = splice_block %return {} -// CHECK:STDOUT: %F.call: init %.9 = call %.loc16(%p.ref) to %.loc15_28.2 +// CHECK:STDOUT: %.loc16: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%.7] +// CHECK:STDOUT: %.loc15_28.2: ref %tuple.type.3 = splice_block %return {} +// CHECK:STDOUT: %F.call: init %tuple.type.3 = call %.loc16(%p.ref) to %.loc15_28.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -675,10 +675,10 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 // CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.1 // CHECK:STDOUT: %Inner.loc13_43.2 => constants.%Inner.2 -// CHECK:STDOUT: %.loc13_56.3 => constants.%.6 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_67.2 => constants.%.8 +// CHECK:STDOUT: %.loc13_67.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc13_6.2, @F.%U.loc13_16.2) { @@ -690,7 +690,7 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 // CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.1 // CHECK:STDOUT: %Inner.loc13_43.2 => constants.%Inner.2 -// CHECK:STDOUT: %.loc13_56.3 => constants.%.6 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%C) { @@ -718,35 +718,35 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 // CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.3 // CHECK:STDOUT: %Inner.loc13_43.2 => constants.%Inner.4 -// CHECK:STDOUT: %.loc13_56.3 => constants.%.9 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_67.2 => constants.%.12 +// CHECK:STDOUT: %.loc13_67.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nontype.carbon // 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: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.1: i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %WithNontype.type: type = generic_class_type @WithNontype [template] // CHECK:STDOUT: %WithNontype.1: %WithNontype.type = struct_value () [template] // CHECK:STDOUT: %WithNontype.2: type = class_type @WithNontype, @WithNontype(%N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %N.patt.2: i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] -// CHECK:STDOUT: %WithNontype.3: type = class_type @WithNontype, @WithNontype(%.5) [template] +// CHECK:STDOUT: %.4: i32 = int_value 0 [template] +// CHECK:STDOUT: %WithNontype.3: type = class_type @WithNontype, @WithNontype(%.4) [template] // CHECK:STDOUT: %struct: %WithNontype.3 = struct_value () [template] -// CHECK:STDOUT: %.6: = specific_function %F, @F(%.5) [template] +// CHECK:STDOUT: %.5: = specific_function %F, @F(%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -819,7 +819,7 @@ fn G() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_29: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_29: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%WithNontype.2 @@ -845,15 +845,15 @@ 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: %.loc9_13.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc9_13.1: %.1 = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.1] -// CHECK:STDOUT: %.loc9_30: i32 = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%.5) [template = constants.%WithNontype.3] +// CHECK:STDOUT: %.loc9_30: i32 = int_value 0 [template = constants.%.4] +// CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%.4) [template = constants.%WithNontype.3] // CHECK:STDOUT: %.loc9_13.2: ref %WithNontype.3 = temporary_storage // CHECK:STDOUT: %.loc9_13.3: init %WithNontype.3 = class_init (), %.loc9_13.2 [template = constants.%struct] // CHECK:STDOUT: %.loc9_13.4: ref %WithNontype.3 = temporary %.loc9_13.2, %.loc9_13.3 // CHECK:STDOUT: %.loc9_15.1: ref %WithNontype.3 = converted %.loc9_13.1, %.loc9_13.4 -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.5) [template = constants.%.6] +// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.4) [template = constants.%.5] // CHECK:STDOUT: %.loc9_15.2: %WithNontype.3 = bind_value %.loc9_15.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc9_10(%.loc9_15.2) // CHECK:STDOUT: %.loc9_33.1: i32 = value_of_initializer %F.call @@ -879,16 +879,16 @@ fn G() -> i32 { // CHECK:STDOUT: %WithNontype.loc6_29.2 => constants.%WithNontype.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithNontype(constants.%.5) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%.5 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.5 +// CHECK:STDOUT: specific @WithNontype(constants.%.4) { +// CHECK:STDOUT: %N.loc4_19.2 => constants.%.4 +// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.5) { -// CHECK:STDOUT: %N.loc6_6.2 => constants.%.5 -// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%.5 +// CHECK:STDOUT: specific @F(constants.%.4) { +// CHECK:STDOUT: %N.loc6_6.2 => constants.%.4 +// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%.4 // CHECK:STDOUT: %WithNontype.loc6_29.2 => constants.%WithNontype.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index f31a5c350733..7aa37c41bd79 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -40,20 +40,20 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %.4: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.3: type = int_type signed, %.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%.3) [template] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,8 +77,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %N.patt.loc4_6.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_6.1, runtime_param [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %n.patt: @F.%.loc4_40 (%.2) = binding_pattern n -// CHECK:STDOUT: %n.param_patt: @F.%.loc4_40 (%.2) = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %n.patt: @F.%.loc4_40 (%.1) = binding_pattern n +// CHECK:STDOUT: %n.param_patt: @F.%.loc4_40 (%.1) = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { @@ -90,9 +90,9 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %Core.ref.loc4_32: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %.loc4_40 (constants.%.2)] -// CHECK:STDOUT: %.loc4_42.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc4_40 (constants.%.2)] -// CHECK:STDOUT: %.loc4_42.2: type = converted %int.make_type_signed, %.loc4_42.1 [symbolic = %.loc4_40 (constants.%.2)] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %.loc4_40 (constants.%.1)] +// CHECK:STDOUT: %.loc4_42.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc4_40 (constants.%.1)] +// CHECK:STDOUT: %.loc4_42.2: type = converted %int.make_type_signed, %.loc4_42.1 [symbolic = %.loc4_40 (constants.%.1)] // CHECK:STDOUT: %Core.ref.loc4_48: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref.loc4_52: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc4_63: init type = call %IntLiteral.ref.loc4_52() [template = Core.IntLiteral] @@ -100,28 +100,28 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %.loc4_64.2: type = converted %int_literal.make_type.loc4_63, %.loc4_64.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param // CHECK:STDOUT: %N.loc4_6.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %n.param: @F.%.loc4_40 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %n: @F.%.loc4_40 (%.2) = bind_name n, %n.param +// CHECK:STDOUT: %n.param: @F.%.loc4_40 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %n: @F.%.loc4_40 (%.1) = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %a.patt: %.4 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.4 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.3 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_9.1: Core.IntLiteral = int_value 64 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_9.1) [template = constants.%.4] -// CHECK:STDOUT: %.loc8_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%.4] -// CHECK:STDOUT: %.loc8_9.3: type = converted %int.make_type_signed, %.loc8_9.2 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_9.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_9.1) [template = constants.%.3] +// CHECK:STDOUT: %.loc8_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%.3] +// CHECK:STDOUT: %.loc8_9.3: type = converted %int.make_type_signed, %.loc8_9.2 [template = constants.%.3] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_33.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_33.2: type = converted %int_literal.make_type, %.loc8_33.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %a.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.4 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.3 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } @@ -134,22 +134,22 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: generic fn @F(%N.loc4_6.1: Core.IntLiteral) { // CHECK:STDOUT: %N.loc4_6.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_6.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc4_6.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %.loc4_40: type = int_type signed, %N.loc4_6.2 [symbolic = %.loc4_40 (constants.%.2)] +// CHECK:STDOUT: %.loc4_40: type = int_type signed, %N.loc4_6.2 [symbolic = %.loc4_40 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%N.param_patt: Core.IntLiteral](%n.param_patt: @F.%.loc4_40 (%.2)) -> Core.IntLiteral { +// CHECK:STDOUT: fn[%N.param_patt: Core.IntLiteral](%n.param_patt: @F.%.loc4_40 (%.1)) -> Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] // CHECK:STDOUT: return %N.ref.loc5 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%a.param_patt: %.4) -> Core.IntLiteral { +// CHECK:STDOUT: fn @G(%a.param_patt: %.3) -> Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: %.4 = name_ref a, %a -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.3) [template = constants.%.5] +// CHECK:STDOUT: %a.ref: %.3 = name_ref a, %a +// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.2) [template = constants.%.4] // CHECK:STDOUT: %F.call: init Core.IntLiteral = call %.loc9_10(%a.ref) // CHECK:STDOUT: %.loc9_14.1: Core.IntLiteral = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_14.2: Core.IntLiteral = converted %F.call, %.loc9_14.1 @@ -159,13 +159,13 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.loc4_6.2 => constants.%N // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%N -// CHECK:STDOUT: %.loc4_40 => constants.%.2 +// CHECK:STDOUT: %.loc4_40 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.3) { -// CHECK:STDOUT: %N.loc4_6.2 => constants.%.3 -// CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%.3 -// CHECK:STDOUT: %.loc4_40 => constants.%.4 +// CHECK:STDOUT: specific @F(constants.%.2) { +// CHECK:STDOUT: %N.loc4_6.2 => constants.%.2 +// CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%.2 +// CHECK:STDOUT: %.loc4_40 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -174,7 +174,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] @@ -182,7 +182,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -242,7 +242,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] // 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] diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index bcfd1ffb9b07..78270741bfec 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -63,20 +63,20 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (%T, %U) [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %U) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [symbolic] -// CHECK:STDOUT: %.7: = specific_function %F, @F(%T, %U) [symbolic] -// CHECK:STDOUT: %.8: type = tuple_type (%C, %D) [template] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.2 [symbolic] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%T, %U) [symbolic] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%C, %D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.10: type = tuple_type (%.9, %.9) [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %.12: = specific_function %F, @F(%C, %D) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.5, %.5) [template] +// CHECK:STDOUT: %.6: type = ptr_type %tuple.type.4 [template] +// CHECK:STDOUT: %.7: = specific_function %F, @F(%C, %D) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,38 +102,38 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_6.1, runtime_param [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc7_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_16.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc7_16.1, runtime_param [symbolic = %U.patt.loc7_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %pair.patt: @F.%.loc7_37.3 (%.4) = binding_pattern pair -// CHECK:STDOUT: %pair.param_patt: @F.%.loc7_37.3 (%.4) = value_param_pattern %pair.patt, runtime_param0 +// CHECK:STDOUT: %pair.patt: @F.%tuple.type (%tuple.type.2) = binding_pattern pair +// CHECK:STDOUT: %pair.param_patt: @F.%tuple.type (%tuple.type.2) = value_param_pattern %pair.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%U.loc7_16.2 (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%U.loc7_16.2 (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc7_36: type = name_ref U, %U.loc7_16.1 [symbolic = %U.loc7_16.2 (constants.%U)] -// CHECK:STDOUT: %.loc7_37.1: %.3 = tuple_literal (%T.ref, %U.ref.loc7_36) -// CHECK:STDOUT: %.loc7_37.2: type = converted %.loc7_37.1, constants.%.4 [symbolic = %.loc7_37.3 (constants.%.4)] +// CHECK:STDOUT: %.loc7_37.1: %tuple.type.1 = tuple_literal (%T.ref, %U.ref.loc7_36) +// CHECK:STDOUT: %.loc7_37.2: type = converted %.loc7_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %U.ref.loc7_43: type = name_ref U, %U.loc7_16.1 [symbolic = %U.loc7_16.2 (constants.%U)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc7_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc7_16.2 (constants.%U)] -// CHECK:STDOUT: %pair.param: @F.%.loc7_37.3 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %pair: @F.%.loc7_37.3 (%.4) = bind_name pair, %pair.param +// CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %pair: @F.%tuple.type (%tuple.type.2) = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref @F.%U.loc7_16.2 (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%U.loc7_16.2 (%U) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %pair.patt: %.8 = binding_pattern pair -// CHECK:STDOUT: %pair.param_patt: %.8 = value_param_pattern %pair.patt, runtime_param0 +// CHECK:STDOUT: %pair.patt: %tuple.type.3 = binding_pattern pair +// CHECK:STDOUT: %pair.param_patt: %tuple.type.3 = value_param_pattern %pair.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %D.ref.loc9_16: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc9_17.1: %.3 = tuple_literal (%C.ref, %D.ref.loc9_16) -// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%.8 [template = constants.%.8] +// CHECK:STDOUT: %.loc9_17.1: %tuple.type.1 = tuple_literal (%C.ref, %D.ref.loc9_16) +// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %D.ref.loc9_23: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %pair.param: %.8 = value_param runtime_param0 -// CHECK:STDOUT: %pair: %.8 = bind_name pair, %pair.param +// CHECK:STDOUT: %pair.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %pair: %tuple.type.3 = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } @@ -158,16 +158,16 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.loc7_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc7_16.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc7_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %.loc7_37.3: type = tuple_type (@F.%T.loc7_6.2 (%T), @F.%U.loc7_16.2 (%U)) [symbolic = %.loc7_37.3 (constants.%.4)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%T.loc7_6.2 (%T), @F.%U.loc7_16.2 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.2: = specific_function constants.%F, @F(%T.loc7_6.2, %U.loc7_16.2) [symbolic = %.loc7_54.2 (constants.%.7)] +// CHECK:STDOUT: %.loc7_54.2: = specific_function constants.%F, @F(%T.loc7_6.2, %U.loc7_16.2) [symbolic = %.loc7_54.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%pair.param_patt: @F.%.loc7_37.3 (%.4)) -> @F.%U.loc7_16.2 (%U) { +// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%pair.param_patt: @F.%tuple.type (%tuple.type.2)) -> @F.%U.loc7_16.2 (%U) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %pair.ref: @F.%.loc7_37.3 (%.4) = name_ref pair, %pair -// CHECK:STDOUT: %.loc7_54.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc7_54.2 (constants.%.7)] +// CHECK:STDOUT: %pair.ref: @F.%tuple.type (%tuple.type.2) = name_ref pair, %pair +// CHECK:STDOUT: %.loc7_54.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc7_54.2 (constants.%.4)] // CHECK:STDOUT: %F.call: init @F.%U.loc7_16.2 (%U) = call %.loc7_54.1(%pair.ref) // CHECK:STDOUT: %.loc7_61.1: @F.%U.loc7_16.2 (%U) = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_61.2: @F.%U.loc7_16.2 (%U) = converted %F.call, %.loc7_61.1 @@ -175,11 +175,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%pair.param_patt: %.8) -> %return: %D { +// CHECK:STDOUT: fn @G(%pair.param_patt: %tuple.type.3) -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %pair.ref: %.8 = name_ref pair, %pair -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%.12] +// CHECK:STDOUT: %pair.ref: %tuple.type.3 = name_ref pair, %pair +// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C, constants.%D) [template = constants.%.7] // CHECK:STDOUT: %.loc9_20.2: ref %D = splice_block %return {} // CHECK:STDOUT: %F.call: init %D = call %.loc10(%pair.ref) to %.loc9_20.2 // CHECK:STDOUT: return %F.call to %return @@ -190,10 +190,10 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T // CHECK:STDOUT: %U.loc7_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc7_16.2 => constants.%U -// CHECK:STDOUT: %.loc7_37.3 => constants.%.4 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.2 => constants.%.7 +// CHECK:STDOUT: %.loc7_54.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc7_6.2, @F.%U.loc7_16.2) { @@ -201,7 +201,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T // CHECK:STDOUT: %U.loc7_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc7_16.2 => constants.%U -// CHECK:STDOUT: %.loc7_37.3 => constants.%.4 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C, constants.%D) { @@ -209,44 +209,44 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%C // CHECK:STDOUT: %U.loc7_16.2 => constants.%D // CHECK:STDOUT: %U.patt.loc7_16.2 => constants.%D -// CHECK:STDOUT: %.loc7_37.3 => constants.%.8 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_54.2 => constants.%.12 +// CHECK:STDOUT: %.loc7_54.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- tuple_value.carbon // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %Pair: %.3 = bind_symbolic_name Pair, 0 [symbolic] -// CHECK:STDOUT: %Pair.patt: %.3 = symbolic_binding_pattern Pair, 0 [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %Pair: %tuple.type.2 = bind_symbolic_name Pair, 0 [symbolic] +// CHECK:STDOUT: %Pair.patt: %tuple.type.2 = symbolic_binding_pattern Pair, 0 [symbolic] // CHECK:STDOUT: %HasPair.type: type = generic_class_type @HasPair [template] // CHECK:STDOUT: %HasPair.1: %HasPair.type = struct_value () [template] // CHECK:STDOUT: %HasPair.2: type = class_type @HasPair, @HasPair(%Pair) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %A: i32 = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %A.patt: i32 = symbolic_binding_pattern A, 0 [symbolic] // CHECK:STDOUT: %B: i32 = bind_symbolic_name B, 1 [symbolic] // CHECK:STDOUT: %B.patt: i32 = symbolic_binding_pattern B, 1 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] -// CHECK:STDOUT: %tuple.1: %.3 = tuple_value (%A, %B) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%A, %B) [symbolic] // CHECK:STDOUT: %HasPair.3: type = class_type @HasPair, @HasPair(%tuple.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.8: i32 = int_value 1 [template] -// CHECK:STDOUT: %.9: i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.2: %.3 = tuple_value (%.8, %.9) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %HasPair.4: type = class_type @HasPair, @HasPair(%tuple.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.10: = specific_function %F, @F(%.8, %.9) [template] +// CHECK:STDOUT: %.7: = specific_function %F, @F(%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -267,19 +267,19 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasPair.decl: %HasPair.type = class_decl @HasPair [template = constants.%HasPair.1] { -// CHECK:STDOUT: %Pair.patt.loc4_15.1: %.3 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] -// CHECK:STDOUT: %Pair.param_patt: %.3 = value_param_pattern %Pair.patt.loc4_15.1, runtime_param [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] +// CHECK:STDOUT: %Pair.patt.loc4_15.1: %tuple.type.2 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] +// CHECK:STDOUT: %Pair.param_patt: %tuple.type.2 = value_param_pattern %Pair.patt.loc4_15.1, runtime_param [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc4_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc4_28: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_31.1: %.2 = tuple_literal (%int.make_type_32.loc4_23, %int.make_type_32.loc4_28) +// CHECK:STDOUT: %.loc4_31.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc4_23, %int.make_type_32.loc4_28) // CHECK:STDOUT: %.loc4_31.2: type = value_of_initializer %int.make_type_32.loc4_23 [template = i32] // CHECK:STDOUT: %.loc4_31.3: type = converted %int.make_type_32.loc4_23, %.loc4_31.2 [template = i32] // CHECK:STDOUT: %.loc4_31.4: type = value_of_initializer %int.make_type_32.loc4_28 [template = i32] // CHECK:STDOUT: %.loc4_31.5: type = converted %int.make_type_32.loc4_28, %.loc4_31.4 [template = i32] -// CHECK:STDOUT: %.loc4_31.6: type = converted %.loc4_31.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %Pair.param: %.3 = value_param runtime_param -// CHECK:STDOUT: %Pair.loc4_15.1: %.3 = bind_symbolic_name Pair, 0, %Pair.param [symbolic = %Pair.loc4_15.2 (constants.%Pair)] +// CHECK:STDOUT: %.loc4_31.6: type = converted %.loc4_31.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %Pair.param: %tuple.type.2 = value_param runtime_param +// CHECK:STDOUT: %Pair.loc4_15.1: %tuple.type.2 = bind_symbolic_name Pair, 0, %Pair.param [symbolic = %Pair.loc4_15.2 (constants.%Pair)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %A.patt.loc6_6.1: i32 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc6_6.2 (constants.%A.patt)] @@ -300,9 +300,9 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.1] // CHECK:STDOUT: %A.ref: i32 = name_ref A, %A.loc6_6.1 [symbolic = %A.loc6_6.2 (constants.%A)] // CHECK:STDOUT: %B.ref.loc6_39: i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] -// CHECK:STDOUT: %.loc6_40: %.3 = tuple_literal (%A.ref, %B.ref.loc6_39) -// CHECK:STDOUT: %tuple.loc6_40.1: %.3 = tuple_value (%A.ref, %B.ref.loc6_39) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %.loc6_34: %.3 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] +// CHECK:STDOUT: %.loc6_40: %tuple.type.2 = tuple_literal (%A.ref, %B.ref.loc6_39) +// CHECK:STDOUT: %tuple.loc6_40.1: %tuple.type.2 = tuple_value (%A.ref, %B.ref.loc6_39) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] +// CHECK:STDOUT: %.loc6_34: %tuple.type.2 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] // CHECK:STDOUT: %HasPair.loc6_34.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_34.2 (constants.%HasPair.3)] // CHECK:STDOUT: %int.make_type_32.loc6_47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_47.1: type = value_of_initializer %int.make_type_32.loc6_47 [template = i32] @@ -323,11 +323,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.1] -// CHECK:STDOUT: %.loc8_18: i32 = int_value 1 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_21: i32 = int_value 2 [template = constants.%.9] -// CHECK:STDOUT: %.loc8_22: %.3 = tuple_literal (%.loc8_18, %.loc8_21) -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc8_18, %.loc8_21) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc8_16: %.3 = converted %.loc8_22, %tuple [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc8_18: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc8_21: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc8_22: %tuple.type.2 = tuple_literal (%.loc8_18, %.loc8_21) +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_18, %.loc8_21) [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc8_16: %tuple.type.2 = converted %.loc8_22, %tuple [template = constants.%tuple.2] // CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.4] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_29.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -339,14 +339,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @HasPair(%Pair.loc4_15.1: %.3) { -// CHECK:STDOUT: %Pair.loc4_15.2: %.3 = bind_symbolic_name Pair, 0 [symbolic = %Pair.loc4_15.2 (constants.%Pair)] -// CHECK:STDOUT: %Pair.patt.loc4_15.2: %.3 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] +// CHECK:STDOUT: generic class @HasPair(%Pair.loc4_15.1: %tuple.type.2) { +// CHECK:STDOUT: %Pair.loc4_15.2: %tuple.type.2 = bind_symbolic_name Pair, 0 [symbolic = %Pair.loc4_15.2 (constants.%Pair)] +// CHECK:STDOUT: %Pair.patt.loc4_15.2: %tuple.type.2 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4_35: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc4_35: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%HasPair.2 @@ -360,7 +360,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %A.patt.loc6_6.2: i32 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc6_6.2 (constants.%A.patt)] // CHECK:STDOUT: %B.loc6_15.2: i32 = bind_symbolic_name B, 1 [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: %B.patt.loc6_15.2: i32 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] -// CHECK:STDOUT: %tuple.loc6_40.2: %.3 = tuple_value (%A.loc6_6.2, %B.loc6_15.2) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] +// CHECK:STDOUT: %tuple.loc6_40.2: %tuple.type.2 = tuple_value (%A.loc6_6.2, %B.loc6_15.2) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] // CHECK:STDOUT: %HasPair.loc6_34.2: type = class_type @HasPair, @HasPair(%tuple.loc6_40.2) [symbolic = %HasPair.loc6_34.2 (constants.%HasPair.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -376,7 +376,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %h.ref: %HasPair.4 = name_ref h, %h -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.8, constants.%.9) [template = constants.%.10] +// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.5, constants.%.6) [template = constants.%.7] // CHECK:STDOUT: %F.call: init i32 = call %.loc9_10(%h.ref) // CHECK:STDOUT: %.loc9_14.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_14.2: i32 = converted %F.call, %.loc9_14.1 @@ -416,11 +416,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.8, constants.%.9) { -// CHECK:STDOUT: %A.loc6_6.2 => constants.%.8 -// CHECK:STDOUT: %A.patt.loc6_6.2 => constants.%.8 -// CHECK:STDOUT: %B.loc6_15.2 => constants.%.9 -// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%.9 +// CHECK:STDOUT: specific @F(constants.%.5, constants.%.6) { +// CHECK:STDOUT: %A.loc6_6.2 => constants.%.5 +// CHECK:STDOUT: %A.patt.loc6_6.2 => constants.%.5 +// CHECK:STDOUT: %B.loc6_15.2 => constants.%.6 +// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%.6 // CHECK:STDOUT: %tuple.loc6_40.2 => constants.%tuple.2 // CHECK:STDOUT: %HasPair.loc6_34.2 => constants.%HasPair.4 // CHECK:STDOUT: @@ -436,17 +436,17 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (%T, %T) [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %T) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = tuple_type (%C, %D) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%C, %D) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.8: type = tuple_type (%.7, %.7) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.3, %.3) [template] +// CHECK:STDOUT: %.4: type = ptr_type %tuple.type.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -470,36 +470,36 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_6.1, runtime_param [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %pair.patt: @F.%.loc7_27.3 (%.4) = binding_pattern pair -// CHECK:STDOUT: %pair.param_patt: @F.%.loc7_27.3 (%.4) = value_param_pattern %pair.patt, runtime_param0 +// CHECK:STDOUT: %pair.patt: @F.%tuple.type (%tuple.type.2) = binding_pattern pair +// CHECK:STDOUT: %pair.param_patt: @F.%tuple.type (%tuple.type.2) = value_param_pattern %pair.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc7_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc7_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc7_23: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc7_26: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_27.1: %.3 = tuple_literal (%T.ref.loc7_23, %T.ref.loc7_26) -// CHECK:STDOUT: %.loc7_27.2: type = converted %.loc7_27.1, constants.%.4 [symbolic = %.loc7_27.3 (constants.%.4)] +// CHECK:STDOUT: %.loc7_27.1: %tuple.type.1 = tuple_literal (%T.ref.loc7_23, %T.ref.loc7_26) +// CHECK:STDOUT: %.loc7_27.2: type = converted %.loc7_27.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %T.ref.loc7_33: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %pair.param: @F.%.loc7_27.3 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %pair: @F.%.loc7_27.3 (%.4) = bind_name pair, %pair.param +// CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %pair: @F.%tuple.type (%tuple.type.2) = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref @F.%T.loc7_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc7_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %pair.patt: %.6 = binding_pattern pair -// CHECK:STDOUT: %pair.param_patt: %.6 = value_param_pattern %pair.patt, runtime_param0 +// CHECK:STDOUT: %pair.patt: %tuple.type.3 = binding_pattern pair +// CHECK:STDOUT: %pair.param_patt: %tuple.type.3 = value_param_pattern %pair.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %D.ref.loc9_16: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc9_17.1: %.3 = tuple_literal (%C.ref, %D.ref.loc9_16) -// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%.6 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_17.1: %tuple.type.1 = tuple_literal (%C.ref, %D.ref.loc9_16) +// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %D.ref.loc9_23: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %pair.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %pair: %.6 = bind_name pair, %pair.param +// CHECK:STDOUT: %pair.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %pair: %tuple.type.3 = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } @@ -522,21 +522,21 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type) { // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc7_27.3: type = tuple_type (@F.%T.loc7_6.2 (%T), @F.%T.loc7_6.2 (%T)) [symbolic = %.loc7_27.3 (constants.%.4)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%T.loc7_6.2 (%T), @F.%T.loc7_6.2 (%T)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%pair.param_patt: @F.%.loc7_27.3 (%.4)) -> @F.%T.loc7_6.2 (%T); +// CHECK:STDOUT: fn[%T.param_patt: type](%pair.param_patt: @F.%tuple.type (%tuple.type.2)) -> @F.%T.loc7_6.2 (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%pair.param_patt: %.6) -> %return: %D { +// CHECK:STDOUT: fn @G(%pair.param_patt: %tuple.type.3) -> %return: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %pair.ref: %.6 = name_ref pair, %pair +// CHECK:STDOUT: %pair.ref: %tuple.type.3 = name_ref pair, %pair // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %.loc7_27.3 => constants.%.4 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 06b8fafecb9b..f3f11d258b54 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -72,14 +72,285 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.7: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .C = %C.decl +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: .G = %G.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] +// CHECK:STDOUT: %p.patt: @F.%.loc6_20.2 (%.3) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%.loc6_20.2 (%.3) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %.loc6_20.1: type = ptr_type %T [symbolic = %.loc6_20.2 (constants.%.3)] +// CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.param: type = value_param runtime_param +// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %p.param: @F.%.loc6_20.2 (%.3) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%.loc6_20.2 (%.3) = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %C = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %.loc8_10: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %C = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @C { +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { +// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] +// CHECK:STDOUT: %.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_20.2 (constants.%.3)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_37.2 (constants.%.4)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_20.2 (%.3)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %p.ref: @F.%.loc6_20.2 (%.3) = name_ref p, %p +// CHECK:STDOUT: %.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_37.2 (constants.%.4)] +// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_37.1(%p.ref) +// CHECK:STDOUT: %.loc6_41.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call +// CHECK:STDOUT: %.loc6_41.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_41.1 +// CHECK:STDOUT: return %.loc6_41.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @G(%p.param_patt: %.5) -> %return: %C { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %p.ref: %.5 = name_ref p, %p +// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %.loc8_13.2: ref %C = splice_block %return {} +// CHECK:STDOUT: %F.call: init %C = call %.loc9(%p.ref) to %.loc8_13.2 +// CHECK:STDOUT: return %F.call to %return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T +// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc6_37.2 => constants.%.4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(@F.%T.loc6_6.2) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T +// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%C) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%C +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C +// CHECK:STDOUT: %.loc6_20.2 => constants.%.5 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc6_37.2 => constants.%.7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- const.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %C: type = class_type @C [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.3: type = const_type %T [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.6: type = const_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.9: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .C = %C.decl +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: .G = %G.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] +// CHECK:STDOUT: %p.patt: @F.%.loc6_26.2 (%.4) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%.loc6_26.2 (%.4) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %.loc6_19.1: type = const_type %T [symbolic = %.loc6_19.2 (constants.%.3)] +// CHECK:STDOUT: %.loc6_26.1: type = ptr_type %.3 [symbolic = %.loc6_26.2 (constants.%.4)] +// CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.param: type = value_param runtime_param +// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %p.param: @F.%.loc6_26.2 (%.4) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%.loc6_26.2 (%.4) = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %C = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %.loc8_9: type = const_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc8_16: type = ptr_type %.6 [template = constants.%.7] +// CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %C = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @C { +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { +// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] +// CHECK:STDOUT: %.loc6_19.2: type = const_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_19.2 (constants.%.3)] +// CHECK:STDOUT: %.loc6_26.2: type = ptr_type @F.%.loc6_19.2 (%.3) [symbolic = %.loc6_26.2 (constants.%.4)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_43.2 (constants.%.5)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_26.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %p.ref: @F.%.loc6_26.2 (%.4) = name_ref p, %p +// CHECK:STDOUT: %.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_43.2 (constants.%.5)] +// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_43.1(%p.ref) +// CHECK:STDOUT: %.loc6_47.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call +// CHECK:STDOUT: %.loc6_47.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_47.1 +// CHECK:STDOUT: return %.loc6_47.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @G(%p.param_patt: %.7) -> %return: %C { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%C) [template = constants.%.9] +// CHECK:STDOUT: %.loc8_19.2: ref %C = splice_block %return {} +// CHECK:STDOUT: %F.call: init %C = call %.loc9(%p.ref) to %.loc8_19.2 +// CHECK:STDOUT: return %F.call to %return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T +// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 +// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc6_43.2 => constants.%.5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(@F.%T.loc6_6.2) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T +// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 +// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%C) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%C +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C +// CHECK:STDOUT: %.loc6_19.2 => constants.%.6 +// CHECK:STDOUT: %.loc6_26.2 => constants.%.7 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc6_43.2 => constants.%.9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- nonconst_from_const.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %C: type = class_type @C [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.5: type = const_type %C [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.8: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.8: = specific_function %F, @F(%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,16 +390,18 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %p.patt: %.6 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %C = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_10: type = ptr_type %C [template = constants.%.6] -// CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %.loc8_9: type = const_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc8_16: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %.loc8_22: type = const_type %C [template = constants.%.5] // CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 // CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,13 +418,13 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_20.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_37.2 (constants.%.5)] +// CHECK:STDOUT: %.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_37.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_20.2 (%.3)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: @F.%.loc6_20.2 (%.3) = name_ref p, %p -// CHECK:STDOUT: %.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_37.2 (constants.%.5)] +// CHECK:STDOUT: %.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_37.2 (constants.%.4)] // CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_37.1(%p.ref) // CHECK:STDOUT: %.loc6_41.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc6_41.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_41.1 @@ -159,13 +432,13 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.6) -> %return: %C { +// CHECK:STDOUT: fn @G(%p.param_patt: %.6) -> %return: %.5 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p -// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%C) [template = constants.%.8] -// CHECK:STDOUT: %.loc8_13.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %.loc9(%p.ref) to %.loc8_13.2 +// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%.5) [template = constants.%.8] +// CHECK:STDOUT: %.loc8_19.2: ref %.5 = splice_block %return {} +// CHECK:STDOUT: %F.call: init %.5 = call %.loc9(%p.ref) to %.loc8_19.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -175,7 +448,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %.loc6_20.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.5 +// CHECK:STDOUT: %.loc6_37.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc6_6.2) { @@ -184,288 +457,15 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %.loc6_20.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%C) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%C -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C +// CHECK:STDOUT: specific @F(constants.%.5) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%.5 +// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%.5 // CHECK:STDOUT: %.loc6_20.2 => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc6_37.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: --- const.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = const_type %T [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] -// CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] -// CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.7: type = const_type %C [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] -// CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.10: = specific_function %F, @F(%C) [template] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [template] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc6_26.2 (%.4) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc6_26.2 (%.4) = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_19.1: type = const_type %T [symbolic = %.loc6_19.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_26.1: type = ptr_type %.3 [symbolic = %.loc6_26.2 (constants.%.4)] -// CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %T.param: type = value_param runtime_param -// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc6_26.2 (%.4) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc6_26.2 (%.4) = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.8 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.8 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %C = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_9: type = const_type %C [template = constants.%.7] -// CHECK:STDOUT: %.loc8_16: type = ptr_type %.7 [template = constants.%.8] -// CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %p.param: %.8 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.8 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { -// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_19.2: type = const_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_19.2 (constants.%.3)] -// CHECK:STDOUT: %.loc6_26.2: type = ptr_type @F.%.loc6_19.2 (%.3) [symbolic = %.loc6_26.2 (constants.%.4)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_43.2 (constants.%.6)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_26.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%.loc6_26.2 (%.4) = name_ref p, %p -// CHECK:STDOUT: %.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_43.2 (constants.%.6)] -// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_43.1(%p.ref) -// CHECK:STDOUT: %.loc6_47.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call -// CHECK:STDOUT: %.loc6_47.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_47.1 -// CHECK:STDOUT: return %.loc6_47.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.8) -> %return: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p -// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%C) [template = constants.%.10] -// CHECK:STDOUT: %.loc8_19.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %.loc9(%p.ref) to %.loc8_19.2 -// CHECK:STDOUT: return %F.call to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%T -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2 => constants.%.6 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@F.%T.loc6_6.2) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%T -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_19.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.4 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%C) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%C -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_19.2 => constants.%.7 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.8 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2 => constants.%.10 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- nonconst_from_const.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.6: type = const_type %C [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] -// CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.9: = specific_function %F, @F(%.6) [template] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [template] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_6.1, runtime_param [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%.loc6_20.2 (%.3) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%.loc6_20.2 (%.3) = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc6_20.1: type = ptr_type %T [symbolic = %.loc6_20.2 (constants.%.3)] -// CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %T.param: type = value_param runtime_param -// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%.loc6_20.2 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%.loc6_20.2 (%.3) = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_9: type = const_type %C [template = constants.%.6] -// CHECK:STDOUT: %.loc8_16: type = ptr_type %.6 [template = constants.%.7] -// CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_22: type = const_type %C [template = constants.%.6] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { -// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %T.patt.loc6_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc6_20.2: type = ptr_type @F.%T.loc6_6.2 (%T) [symbolic = %.loc6_20.2 (constants.%.3)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_37.2 (constants.%.5)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_20.2 (%.3)) -> @F.%T.loc6_6.2 (%T) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%.loc6_20.2 (%.3) = name_ref p, %p -// CHECK:STDOUT: %.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_37.2 (constants.%.5)] -// CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_37.1(%p.ref) -// CHECK:STDOUT: %.loc6_41.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call -// CHECK:STDOUT: %.loc6_41.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_41.1 -// CHECK:STDOUT: return %.loc6_41.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.7) -> %return: %.6 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p -// CHECK:STDOUT: %.loc9: = specific_function %F.ref, @F(constants.%.6) [template = constants.%.9] -// CHECK:STDOUT: %.loc8_19.2: ref %.6 = splice_block %return {} -// CHECK:STDOUT: %F.call: init %.6 = call %.loc9(%p.ref) to %.loc8_19.2 -// CHECK:STDOUT: return %F.call to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%T -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.5 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(@F.%T.loc6_6.2) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%T -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%T -// CHECK:STDOUT: %.loc6_20.2 => constants.%.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.6) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%.6 -// CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%.6 -// CHECK:STDOUT: %.loc6_20.2 => constants.%.7 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_37.2 => constants.%.9 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_const_from_nonconst.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -477,14 +477,14 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %.3: type = const_type %T [symbolic] // CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.5: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %C [template] -// CHECK:STDOUT: %.8: type = const_type %C [template] +// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = const_type %C [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -523,19 +523,19 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.8 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.8 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.7 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.7 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_10: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %.loc8_10: type = ptr_type %C [template = constants.%.6] // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8_16: type = const_type %C [template = constants.%.8] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.8 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.8 = return_slot %return.param +// CHECK:STDOUT: %.loc8_16: type = const_type %C [template = constants.%.7] +// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.7 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.7 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -553,13 +553,13 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %.loc6_26.2: type = ptr_type @F.%.loc6_19.2 (%.3) [symbolic = %.loc6_26.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_43.2 (constants.%.6)] +// CHECK:STDOUT: %.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_6.2) [symbolic = %.loc6_43.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%.loc6_26.2 (%.4)) -> @F.%T.loc6_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: @F.%.loc6_26.2 (%.4) = name_ref p, %p -// CHECK:STDOUT: %.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_43.2 (constants.%.6)] +// CHECK:STDOUT: %.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc6_43.2 (constants.%.5)] // CHECK:STDOUT: %F.call: init @F.%T.loc6_6.2 (%T) = call %.loc6_43.1(%p.ref) // CHECK:STDOUT: %.loc6_47.1: @F.%T.loc6_6.2 (%T) = value_of_initializer %F.call // CHECK:STDOUT: %.loc6_47.2: @F.%T.loc6_6.2 (%T) = converted %F.call, %.loc6_47.1 @@ -567,10 +567,10 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p.param_patt: %.7) -> %return: %.8 { +// CHECK:STDOUT: fn @G(%p.param_patt: %.6) -> %return: %.7 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -581,7 +581,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %.loc6_26.2 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc6_43.2 => constants.%.6 +// CHECK:STDOUT: %.loc6_43.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc6_6.2) { diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index 0881d8371d55..ffa0ce3a91a7 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -20,36 +20,36 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (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: %tuple.1: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: i32, .b: i32, .c: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] -// CHECK:STDOUT: %.9: i32 = int_value 3 [template] -// CHECK:STDOUT: %.10: type = struct_type {.c: i32, .b: i32, .a: i32} [template] -// CHECK:STDOUT: %.11: type = struct_type {.b: i32, .a: i32, .c: i32} [template] -// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] -// CHECK:STDOUT: %struct.1: %.11 = struct_value (%.6, %.5, %.9) [template] -// CHECK:STDOUT: %struct.2: %.7 = struct_value (%.5, %.6, %.9) [template] -// CHECK:STDOUT: %.13: type = array_type %.5, i32 [template] -// CHECK:STDOUT: %.14: type = ptr_type %.13 [template] -// CHECK:STDOUT: %.15: i32 = int_value 0 [template] -// CHECK:STDOUT: %.16: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.17: i32 = int_value 5 [template] -// CHECK:STDOUT: %.18: i32 = int_value 7 [template] -// CHECK:STDOUT: %.19: i32 = int_value 9 [template] -// CHECK:STDOUT: %.20: type = tuple_type (i32, i32, i32, i32) [template] -// CHECK:STDOUT: %.21: type = ptr_type %.20 [template] -// CHECK:STDOUT: %tuple.2: %.20 = tuple_value (%.17, %.18, %.5, %.19) [template] -// CHECK:STDOUT: %array: %.13 = tuple_value (%.15) [template] -// CHECK:STDOUT: %.22: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.23: type = ptr_type %.22 [template] -// CHECK:STDOUT: %struct.3: %.22 = struct_value (%.9, %.5) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (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: %tuple.1: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: type = struct_type {.a: i32, .b: i32, .c: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.6: i32 = int_value 3 [template] +// CHECK:STDOUT: %.7: type = struct_type {.c: i32, .b: i32, .a: i32} [template] +// CHECK:STDOUT: %.8: type = struct_type {.b: i32, .a: i32, .c: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %struct.1: %.8 = struct_value (%.3, %.2, %.6) [template] +// CHECK:STDOUT: %struct.2: %.4 = struct_value (%.2, %.3, %.6) [template] +// CHECK:STDOUT: %.10: type = array_type %.2, i32 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] +// CHECK:STDOUT: %.12: i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.13: i32 = int_value 5 [template] +// CHECK:STDOUT: %.14: i32 = int_value 7 [template] +// CHECK:STDOUT: %.15: i32 = int_value 9 [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (i32, i32, i32, i32) [template] +// CHECK:STDOUT: %.16: type = ptr_type %tuple.type.4 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%.13, %.14, %.2, %.15) [template] +// CHECK:STDOUT: %array: %.10 = tuple_value (%.12) [template] +// CHECK:STDOUT: %.17: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.18: type = ptr_type %.17 [template] +// CHECK:STDOUT: %struct.3: %.17 = struct_value (%.6, %.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,14 +72,14 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_26.1: %.2 = tuple_literal (%int.make_type_32.loc11_18, %int.make_type_32.loc11_23) +// CHECK:STDOUT: %.loc11_26.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_18, %int.make_type_32.loc11_23) // CHECK:STDOUT: %.loc11_26.2: type = value_of_initializer %int.make_type_32.loc11_18 [template = i32] // CHECK:STDOUT: %.loc11_26.3: type = converted %int.make_type_32.loc11_18, %.loc11_26.2 [template = i32] // CHECK:STDOUT: %.loc11_26.4: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32] // CHECK:STDOUT: %.loc11_26.5: type = converted %int.make_type_32.loc11_23, %.loc11_26.4 [template = i32] -// CHECK:STDOUT: %.loc11_26.6: type = converted %.loc11_26.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %tuple_copy.var: ref %.3 = var tuple_copy -// CHECK:STDOUT: %tuple_copy: ref %.3 = bind_name tuple_copy, %tuple_copy.var +// CHECK:STDOUT: %.loc11_26.6: type = converted %.loc11_26.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.2 = var tuple_copy +// CHECK:STDOUT: %tuple_copy: ref %tuple.type.2 = bind_name tuple_copy, %tuple_copy.var // CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] @@ -89,51 +89,51 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int.make_type_32.loc13_41: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_41.1: type = value_of_initializer %int.make_type_32.loc13_41 [template = i32] // CHECK:STDOUT: %.loc13_41.2: type = converted %int.make_type_32.loc13_41, %.loc13_41.1 [template = i32] -// CHECK:STDOUT: %.loc13_44: type = struct_type {.a: i32, .b: i32, .c: i32} [template = constants.%.7] -// CHECK:STDOUT: %struct_copy.var: ref %.7 = var struct_copy -// CHECK:STDOUT: %struct_copy: ref %.7 = bind_name struct_copy, %struct_copy.var +// CHECK:STDOUT: %.loc13_44: type = struct_type {.a: i32, .b: i32, .c: i32} [template = constants.%.4] +// CHECK:STDOUT: %struct_copy.var: ref %.4 = var struct_copy +// CHECK:STDOUT: %struct_copy: ref %.4 = bind_name struct_copy, %struct_copy.var // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_24: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_24: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32.loc15, %.loc15_19.1 [template = i32] -// CHECK:STDOUT: %.loc15_25: type = array_type %.loc15_24, i32 [template = constants.%.13] -// CHECK:STDOUT: %tuple_index.var: ref %.13 = var tuple_index -// CHECK:STDOUT: %tuple_index: ref %.13 = bind_name tuple_index, %tuple_index.var +// CHECK:STDOUT: %.loc15_25: type = array_type %.loc15_24, i32 [template = constants.%.10] +// CHECK:STDOUT: %tuple_index.var: ref %.10 = var tuple_index +// CHECK:STDOUT: %tuple_index: ref %.10 = bind_name tuple_index, %tuple_index.var // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_26: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_26: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_21.2: type = converted %int.make_type_32.loc17, %.loc17_21.1 [template = i32] -// CHECK:STDOUT: %.loc17_27: type = array_type %.loc17_26, i32 [template = constants.%.13] -// CHECK:STDOUT: %struct_access.var: ref %.13 = var struct_access -// CHECK:STDOUT: %struct_access: ref %.13 = bind_name struct_access, %struct_access.var +// CHECK:STDOUT: %.loc17_27: type = array_type %.loc17_26, i32 [template = constants.%.10] +// CHECK:STDOUT: %struct_access.var: ref %.10 = var struct_access +// CHECK:STDOUT: %struct_access: ref %.10 = bind_name struct_access, %struct_access.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_31: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_34: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_35.1: %.3 = tuple_literal (%.loc11_31, %.loc11_34) +// CHECK:STDOUT: %.loc11_31: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_34: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_35.1: %tuple.type.2 = tuple_literal (%.loc11_31, %.loc11_34) // CHECK:STDOUT: %int.make_type_32.loc11_41: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc11_46: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_49.1: %.2 = tuple_literal (%int.make_type_32.loc11_41, %int.make_type_32.loc11_46) +// CHECK:STDOUT: %.loc11_49.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_41, %int.make_type_32.loc11_46) // CHECK:STDOUT: %.loc11_49.2: type = value_of_initializer %int.make_type_32.loc11_41 [template = i32] // CHECK:STDOUT: %.loc11_49.3: type = converted %int.make_type_32.loc11_41, %.loc11_49.2 [template = i32] // CHECK:STDOUT: %.loc11_49.4: type = value_of_initializer %int.make_type_32.loc11_46 [template = i32] // CHECK:STDOUT: %.loc11_49.5: type = converted %int.make_type_32.loc11_46, %.loc11_49.4 [template = i32] -// CHECK:STDOUT: %.loc11_49.6: type = converted %.loc11_49.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_49.6: type = converted %.loc11_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc11_35.2: ref i32 = tuple_access file.%tuple_copy.var, element0 -// CHECK:STDOUT: %.loc11_35.3: init i32 = initialize_from %.loc11_31 to %.loc11_35.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_35.3: init i32 = initialize_from %.loc11_31 to %.loc11_35.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_35.4: ref i32 = tuple_access file.%tuple_copy.var, element1 -// CHECK:STDOUT: %.loc11_35.5: init i32 = initialize_from %.loc11_34 to %.loc11_35.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_35.6: init %.3 = tuple_init (%.loc11_35.3, %.loc11_35.5) to file.%tuple_copy.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_50: init %.3 = converted %.loc11_35.1, %.loc11_35.6 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_35.5: init i32 = initialize_from %.loc11_34 to %.loc11_35.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_35.6: init %tuple.type.2 = tuple_init (%.loc11_35.3, %.loc11_35.5) to file.%tuple_copy.var [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_50: init %tuple.type.2 = converted %.loc11_35.1, %.loc11_35.6 [template = constants.%tuple.1] // CHECK:STDOUT: assign file.%tuple_copy.var, %.loc11_50 -// CHECK:STDOUT: %.loc13_54: i32 = int_value 3 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_62: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_70: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_71: %.10 = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) +// CHECK:STDOUT: %.loc13_54: i32 = int_value 3 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_62: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_70: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_71: %.7 = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) // CHECK:STDOUT: %int.make_type_32.loc13_81: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_81.1: type = value_of_initializer %int.make_type_32.loc13_81 [template = i32] // CHECK:STDOUT: %.loc13_81.2: type = converted %int.make_type_32.loc13_81, %.loc13_81.1 [template = i32] @@ -143,61 +143,61 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int.make_type_32.loc13_99: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_99.1: type = value_of_initializer %int.make_type_32.loc13_99 [template = i32] // CHECK:STDOUT: %.loc13_99.2: type = converted %int.make_type_32.loc13_99, %.loc13_99.1 [template = i32] -// CHECK:STDOUT: %.loc13_102: type = struct_type {.b: i32, .a: i32, .c: i32} [template = constants.%.11] -// CHECK:STDOUT: %struct.loc13: %.11 = struct_value (%.loc13_62, %.loc13_70, %.loc13_54) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.1: %.11 = converted %.loc13_71, %struct.loc13 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.2: i32 = struct_access %.loc13_73.1, element1 [template = constants.%.5] +// CHECK:STDOUT: %.loc13_102: type = struct_type {.b: i32, .a: i32, .c: i32} [template = constants.%.8] +// CHECK:STDOUT: %struct.loc13: %.8 = struct_value (%.loc13_62, %.loc13_70, %.loc13_54) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.1: %.8 = converted %.loc13_71, %struct.loc13 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.2: i32 = struct_access %.loc13_73.1, element1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_73.3: ref i32 = struct_access file.%struct_copy.var, element1 -// CHECK:STDOUT: %.loc13_73.4: init i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_73.5: i32 = struct_access %.loc13_73.1, element0 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_73.4: init i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_73.5: i32 = struct_access %.loc13_73.1, element0 [template = constants.%.3] // CHECK:STDOUT: %.loc13_73.6: ref i32 = struct_access file.%struct_copy.var, element0 -// CHECK:STDOUT: %.loc13_73.7: init i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_73.8: i32 = struct_access %.loc13_73.1, element2 [template = constants.%.9] +// CHECK:STDOUT: %.loc13_73.7: init i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_73.8: i32 = struct_access %.loc13_73.1, element2 [template = constants.%.6] // CHECK:STDOUT: %.loc13_73.9: ref i32 = struct_access file.%struct_copy.var, element2 -// CHECK:STDOUT: %.loc13_73.10: init i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_73.11: init %.7 = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc13_103: init %.7 = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_73.10: init i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_73.11: init %.4 = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_103: init %.4 = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%struct_copy.var, %.loc13_103 -// CHECK:STDOUT: %.loc15_30: i32 = int_value 0 [template = constants.%.15] -// CHECK:STDOUT: %.loc15_32.1: %.16 = tuple_literal (%.loc15_30) +// CHECK:STDOUT: %.loc15_30: i32 = int_value 0 [template = constants.%.12] +// CHECK:STDOUT: %.loc15_32.1: %tuple.type.3 = tuple_literal (%.loc15_30) // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_44: i32 = int_value 5 [template = constants.%.17] -// CHECK:STDOUT: %.loc15_47: i32 = int_value 7 [template = constants.%.18] -// CHECK:STDOUT: %.loc15_50: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_53: i32 = int_value 9 [template = constants.%.19] -// CHECK:STDOUT: %.loc15_54.1: %.20 = tuple_literal (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) -// CHECK:STDOUT: %.loc15_56: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %tuple: %.20 = tuple_value (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc15_54.2: %.20 = converted %.loc15_54.1, %tuple [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc15_55: i32 = tuple_access %.loc15_54.2, element2 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_44: i32 = int_value 5 [template = constants.%.13] +// CHECK:STDOUT: %.loc15_47: i32 = int_value 7 [template = constants.%.14] +// CHECK:STDOUT: %.loc15_50: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_53: i32 = int_value 9 [template = constants.%.15] +// CHECK:STDOUT: %.loc15_54.1: %tuple.type.4 = tuple_literal (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) +// CHECK:STDOUT: %.loc15_56: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc15_54.2: %tuple.type.4 = converted %.loc15_54.1, %tuple [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc15_55: i32 = tuple_access %.loc15_54.2, element2 [template = constants.%.2] // CHECK:STDOUT: %.loc15_38.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_38.2: type = converted %int.make_type_32.loc15, %.loc15_38.1 [template = i32] -// CHECK:STDOUT: %.loc15_57: type = array_type %.loc15_55, i32 [template = constants.%.13] -// CHECK:STDOUT: %.loc15_5: ref %.13 = splice_block file.%tuple_index.var {} -// CHECK:STDOUT: %.loc15_32.2: i32 = int_value 0 [template = constants.%.15] +// CHECK:STDOUT: %.loc15_57: type = array_type %.loc15_55, i32 [template = constants.%.10] +// CHECK:STDOUT: %.loc15_5: ref %.10 = splice_block file.%tuple_index.var {} +// CHECK:STDOUT: %.loc15_32.2: i32 = int_value 0 [template = constants.%.12] // CHECK:STDOUT: %.loc15_32.3: ref i32 = array_index %.loc15_5, %.loc15_32.2 -// CHECK:STDOUT: %.loc15_32.4: init i32 = initialize_from %.loc15_30 to %.loc15_32.3 [template = constants.%.15] -// CHECK:STDOUT: %.loc15_32.5: init %.13 = array_init (%.loc15_32.4) to %.loc15_5 [template = constants.%array] -// CHECK:STDOUT: %.loc15_34: init %.13 = converted %.loc15_32.1, %.loc15_32.5 [template = constants.%array] +// CHECK:STDOUT: %.loc15_32.4: init i32 = initialize_from %.loc15_30 to %.loc15_32.3 [template = constants.%.12] +// CHECK:STDOUT: %.loc15_32.5: init %.10 = array_init (%.loc15_32.4) to %.loc15_5 [template = constants.%array] +// CHECK:STDOUT: %.loc15_34: init %.10 = converted %.loc15_32.1, %.loc15_32.5 [template = constants.%array] // CHECK:STDOUT: assign file.%tuple_index.var, %.loc15_34 -// CHECK:STDOUT: %.loc17_32: i32 = int_value 0 [template = constants.%.15] -// CHECK:STDOUT: %.loc17_34.1: %.16 = tuple_literal (%.loc17_32) +// CHECK:STDOUT: %.loc17_32: i32 = int_value 0 [template = constants.%.12] +// CHECK:STDOUT: %.loc17_34.1: %tuple.type.3 = tuple_literal (%.loc17_32) // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_51: i32 = int_value 3 [template = constants.%.9] -// CHECK:STDOUT: %.loc17_59: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_60.1: %.22 = struct_literal (%.loc17_51, %.loc17_59) -// CHECK:STDOUT: %struct.loc17: %.22 = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_60.2: %.22 = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_61: i32 = struct_access %.loc17_60.2, element1 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_51: i32 = int_value 3 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_59: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc17_60.1: %.17 = struct_literal (%.loc17_51, %.loc17_59) +// CHECK:STDOUT: %struct.loc17: %.17 = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_60.2: %.17 = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_61: i32 = struct_access %.loc17_60.2, element1 [template = constants.%.2] // CHECK:STDOUT: %.loc17_40.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_40.2: type = converted %int.make_type_32.loc17, %.loc17_40.1 [template = i32] -// CHECK:STDOUT: %.loc17_63: type = array_type %.loc17_61, i32 [template = constants.%.13] -// CHECK:STDOUT: %.loc17_5: ref %.13 = splice_block file.%struct_access.var {} -// CHECK:STDOUT: %.loc17_34.2: i32 = int_value 0 [template = constants.%.15] +// CHECK:STDOUT: %.loc17_63: type = array_type %.loc17_61, i32 [template = constants.%.10] +// CHECK:STDOUT: %.loc17_5: ref %.10 = splice_block file.%struct_access.var {} +// CHECK:STDOUT: %.loc17_34.2: i32 = int_value 0 [template = constants.%.12] // CHECK:STDOUT: %.loc17_34.3: ref i32 = array_index %.loc17_5, %.loc17_34.2 -// CHECK:STDOUT: %.loc17_34.4: init i32 = initialize_from %.loc17_32 to %.loc17_34.3 [template = constants.%.15] -// CHECK:STDOUT: %.loc17_34.5: init %.13 = array_init (%.loc17_34.4) to %.loc17_5 [template = constants.%array] -// CHECK:STDOUT: %.loc17_36: init %.13 = converted %.loc17_34.1, %.loc17_34.5 [template = constants.%array] +// CHECK:STDOUT: %.loc17_34.4: init i32 = initialize_from %.loc17_32 to %.loc17_34.3 [template = constants.%.12] +// CHECK:STDOUT: %.loc17_34.5: init %.10 = array_init (%.loc17_34.4) to %.loc17_5 [template = constants.%array] +// CHECK:STDOUT: %.loc17_36: init %.10 = converted %.loc17_34.1, %.loc17_34.5 [template = constants.%array] // CHECK:STDOUT: assign file.%struct_access.var, %.loc17_36 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 98e6d2e0a88d..cd27e7ff7d90 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -19,23 +19,23 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.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 0 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.7: i32 = int_value 5 [template] -// CHECK:STDOUT: %.8: i32 = int_value 7 [template] -// CHECK:STDOUT: %.9: i32 = int_value 9 [template] -// CHECK:STDOUT: %.10: type = tuple_type (i32, i32, i32, i32) [template] -// CHECK:STDOUT: %.11: i32 = int_value 4 [template] -// CHECK:STDOUT: %.12: type = array_type %.11, i32 [template] -// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] -// CHECK:STDOUT: %.14: i32 = int_value 2 [template] -// CHECK:STDOUT: %.15: i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.12 = tuple_value (%.7, %.8, %.2, %.9) [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 0 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.5: i32 = int_value 5 [template] +// CHECK:STDOUT: %.6: i32 = int_value 7 [template] +// CHECK:STDOUT: %.7: i32 = int_value 9 [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32, i32, i32) [template] +// CHECK:STDOUT: %.8: i32 = int_value 4 [template] +// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: i32 = int_value 2 [template] +// CHECK:STDOUT: %.12: i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %.9 = tuple_value (%.5, %.6, %.1, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,48 +54,48 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc16_24: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc16_24: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32, %.loc16_19.1 [template = i32] -// CHECK:STDOUT: %.loc16_25: type = array_type %.loc16_24, i32 [template = constants.%.3] -// CHECK:STDOUT: %array_index.var: ref %.3 = var array_index -// CHECK:STDOUT: %array_index: ref %.3 = bind_name array_index, %array_index.var +// CHECK:STDOUT: %.loc16_25: type = array_type %.loc16_24, i32 [template = constants.%.2] +// CHECK:STDOUT: %array_index.var: ref %.2 = var array_index +// CHECK:STDOUT: %array_index: ref %.2 = bind_name array_index, %array_index.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: %.loc16_30: i32 = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_32: %.6 = tuple_literal (%.loc16_30) +// CHECK:STDOUT: %.loc16_30: i32 = int_value 0 [template = constants.%.4] +// CHECK:STDOUT: %.loc16_32: %tuple.type.1 = tuple_literal (%.loc16_30) // CHECK:STDOUT: %int.make_type_32.loc16_38: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc16_45: i32 = int_value 5 [template = constants.%.7] -// CHECK:STDOUT: %.loc16_48: i32 = int_value 7 [template = constants.%.8] -// CHECK:STDOUT: %.loc16_51: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_54: i32 = int_value 9 [template = constants.%.9] -// CHECK:STDOUT: %.loc16_55.1: %.10 = tuple_literal (%.loc16_45, %.loc16_48, %.loc16_51, %.loc16_54) +// CHECK:STDOUT: %.loc16_45: i32 = int_value 5 [template = constants.%.5] +// CHECK:STDOUT: %.loc16_48: i32 = int_value 7 [template = constants.%.6] +// CHECK:STDOUT: %.loc16_51: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_54: i32 = int_value 9 [template = constants.%.7] +// CHECK:STDOUT: %.loc16_55.1: %tuple.type.2 = tuple_literal (%.loc16_45, %.loc16_48, %.loc16_51, %.loc16_54) // CHECK:STDOUT: %int.make_type_32.loc16_61: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc16_66: i32 = int_value 4 [template = constants.%.11] +// CHECK:STDOUT: %.loc16_66: i32 = int_value 4 [template = constants.%.8] // CHECK:STDOUT: %.loc16_61.1: type = value_of_initializer %int.make_type_32.loc16_61 [template = i32] // CHECK:STDOUT: %.loc16_61.2: type = converted %int.make_type_32.loc16_61, %.loc16_61.1 [template = i32] -// CHECK:STDOUT: %.loc16_67: type = array_type %.loc16_66, i32 [template = constants.%.12] -// CHECK:STDOUT: %.loc16_55.2: ref %.12 = temporary_storage -// CHECK:STDOUT: %.loc16_55.3: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc16_67: type = array_type %.loc16_66, i32 [template = constants.%.9] +// CHECK:STDOUT: %.loc16_55.2: ref %.9 = temporary_storage +// CHECK:STDOUT: %.loc16_55.3: i32 = int_value 0 [template = constants.%.4] // CHECK:STDOUT: %.loc16_55.4: ref i32 = array_index %.loc16_55.2, %.loc16_55.3 -// CHECK:STDOUT: %.loc16_55.5: init i32 = initialize_from %.loc16_45 to %.loc16_55.4 [template = constants.%.7] -// CHECK:STDOUT: %.loc16_55.6: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc16_55.5: init i32 = initialize_from %.loc16_45 to %.loc16_55.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc16_55.6: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc16_55.7: ref i32 = array_index %.loc16_55.2, %.loc16_55.6 -// CHECK:STDOUT: %.loc16_55.8: init i32 = initialize_from %.loc16_48 to %.loc16_55.7 [template = constants.%.8] -// CHECK:STDOUT: %.loc16_55.9: i32 = int_value 2 [template = constants.%.14] +// CHECK:STDOUT: %.loc16_55.8: init i32 = initialize_from %.loc16_48 to %.loc16_55.7 [template = constants.%.6] +// CHECK:STDOUT: %.loc16_55.9: i32 = int_value 2 [template = constants.%.11] // CHECK:STDOUT: %.loc16_55.10: ref i32 = array_index %.loc16_55.2, %.loc16_55.9 -// CHECK:STDOUT: %.loc16_55.11: init i32 = initialize_from %.loc16_51 to %.loc16_55.10 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_55.12: i32 = int_value 3 [template = constants.%.15] +// CHECK:STDOUT: %.loc16_55.11: init i32 = initialize_from %.loc16_51 to %.loc16_55.10 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_55.12: i32 = int_value 3 [template = constants.%.12] // CHECK:STDOUT: %.loc16_55.13: ref i32 = array_index %.loc16_55.2, %.loc16_55.12 -// CHECK:STDOUT: %.loc16_55.14: init i32 = initialize_from %.loc16_54 to %.loc16_55.13 [template = constants.%.9] -// CHECK:STDOUT: %.loc16_55.15: init %.12 = array_init (%.loc16_55.5, %.loc16_55.8, %.loc16_55.11, %.loc16_55.14) to %.loc16_55.2 [template = constants.%array] -// CHECK:STDOUT: %.loc16_57.1: init %.12 = converted %.loc16_55.1, %.loc16_55.15 [template = constants.%array] -// CHECK:STDOUT: %.loc16_70: i32 = int_value 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc16_57.2: ref %.12 = temporary %.loc16_55.2, %.loc16_57.1 +// CHECK:STDOUT: %.loc16_55.14: init i32 = initialize_from %.loc16_54 to %.loc16_55.13 [template = constants.%.7] +// CHECK:STDOUT: %.loc16_55.15: init %.9 = array_init (%.loc16_55.5, %.loc16_55.8, %.loc16_55.11, %.loc16_55.14) to %.loc16_55.2 [template = constants.%array] +// CHECK:STDOUT: %.loc16_57.1: init %.9 = converted %.loc16_55.1, %.loc16_55.15 [template = constants.%array] +// CHECK:STDOUT: %.loc16_70: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc16_57.2: ref %.9 = temporary %.loc16_55.2, %.loc16_57.1 // CHECK:STDOUT: %.loc16_71.1: ref i32 = array_index %.loc16_57.2, %.loc16_70 // CHECK:STDOUT: %.loc16_71.2: i32 = bind_value %.loc16_71.1 // CHECK:STDOUT: assign file.%array_index.var, diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 0608fc145025..4a12df4ec758 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -20,7 +20,7 @@ fn G(N:! 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: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index ea0ff53d1147..776fff3dc5d5 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -21,18 +21,18 @@ fn F(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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %.3: type = const_type %T [symbolic] -// CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%.2, %.3) [symbolic] -// CHECK:STDOUT: %.6: type = tuple_type (%.2, %T) [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.2: type = const_type %T [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.1, %.2) [symbolic] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.1, %T) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.3 [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %.5: i32 = int_value 5 [template] +// CHECK:STDOUT: %.6: type = array_type %.5, %T [symbolic] // CHECK:STDOUT: %.7: type = ptr_type %.6 [symbolic] -// CHECK:STDOUT: %.8: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.9: i32 = int_value 5 [template] -// CHECK:STDOUT: %.10: type = array_type %.9, %T [symbolic] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,31 +62,31 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt.loc12_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_12.2: type = ptr_type @F.%T.loc12_6.2 (%T) [symbolic = %.loc13_12.2 (constants.%.2)] -// CHECK:STDOUT: %.loc13_15.2: type = const_type @F.%T.loc12_6.2 (%T) [symbolic = %.loc13_15.2 (constants.%.3)] -// CHECK:STDOUT: %.loc13_22.3: type = tuple_type (@F.%.loc13_12.2 (%.2), @F.%.loc13_15.2 (%.3)) [symbolic = %.loc13_22.3 (constants.%.5)] -// CHECK:STDOUT: %.loc14_16.2: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %.loc14_16.2 (constants.%.8)] -// CHECK:STDOUT: %.loc15_15.2: type = array_type constants.%.9, @F.%T.loc12_6.2 (%T) [symbolic = %.loc15_15.2 (constants.%.10)] +// CHECK:STDOUT: %.loc13_12.2: type = ptr_type @F.%T.loc12_6.2 (%T) [symbolic = %.loc13_12.2 (constants.%.1)] +// CHECK:STDOUT: %.loc13_15.2: type = const_type @F.%T.loc12_6.2 (%T) [symbolic = %.loc13_15.2 (constants.%.2)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%.loc13_12.2 (%.1), @F.%.loc13_15.2 (%.2)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %.loc14_16.2: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %.loc14_16.2 (constants.%.4)] +// CHECK:STDOUT: %.loc15_15.2: type = array_type constants.%.5, @F.%T.loc12_6.2 (%T) [symbolic = %.loc15_15.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc13_11: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_12.1: type = ptr_type %T [symbolic = %.loc13_12.2 (constants.%.2)] +// CHECK:STDOUT: %.loc13_12.1: type = ptr_type %T [symbolic = %.loc13_12.2 (constants.%.1)] // CHECK:STDOUT: %T.ref.loc13_21: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_15.1: type = const_type %T [symbolic = %.loc13_15.2 (constants.%.3)] -// CHECK:STDOUT: %.loc13_22.1: %.4 = tuple_literal (%.loc13_12.1, %.loc13_15.1) -// CHECK:STDOUT: %.loc13_22.2: type = converted %.loc13_22.1, constants.%.5 [symbolic = %.loc13_22.3 (constants.%.5)] -// CHECK:STDOUT: %u.var: ref @F.%.loc13_22.3 (%.5) = var u -// CHECK:STDOUT: %u: ref @F.%.loc13_22.3 (%.5) = bind_name u, %u.var +// CHECK:STDOUT: %.loc13_15.1: type = const_type %T [symbolic = %.loc13_15.2 (constants.%.2)] +// CHECK:STDOUT: %.loc13_22.1: %tuple.type.1 = tuple_literal (%.loc13_12.1, %.loc13_15.1) +// CHECK:STDOUT: %.loc13_22.2: type = converted %.loc13_22.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.2) = var u +// CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.2) = bind_name u, %u.var // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc14_16.1: type = struct_type {.a: %T} [symbolic = %.loc14_16.2 (constants.%.8)] -// CHECK:STDOUT: %v.var: ref @F.%.loc14_16.2 (%.8) = var v -// CHECK:STDOUT: %v: ref @F.%.loc14_16.2 (%.8) = bind_name v, %v.var +// CHECK:STDOUT: %.loc14_16.1: type = struct_type {.a: %T} [symbolic = %.loc14_16.2 (constants.%.4)] +// CHECK:STDOUT: %v.var: ref @F.%.loc14_16.2 (%.4) = var v +// CHECK:STDOUT: %v: ref @F.%.loc14_16.2 (%.4) = bind_name v, %v.var // CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc15_14: i32 = int_value 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc15_15.1: type = array_type %.loc15_14, %T [symbolic = %.loc15_15.2 (constants.%.10)] -// CHECK:STDOUT: %w.var: ref @F.%.loc15_15.2 (%.10) = var w -// CHECK:STDOUT: %w: ref @F.%.loc15_15.2 (%.10) = bind_name w, %w.var +// CHECK:STDOUT: %.loc15_14: i32 = int_value 5 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_15.1: type = array_type %.loc15_14, %T [symbolic = %.loc15_15.2 (constants.%.6)] +// CHECK:STDOUT: %w.var: ref @F.%.loc15_15.2 (%.6) = var w +// CHECK:STDOUT: %w: ref @F.%.loc15_15.2 (%.6) = bind_name w, %w.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon index 03caf8a6bab7..939da0f650a8 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -24,18 +24,18 @@ fn H() -> 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: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (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: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,34 +56,34 @@ fn H() -> i32 { // 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: %.loc11_20.1: %.2 = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17) +// CHECK:STDOUT: %.loc11_20.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17) // CHECK:STDOUT: %.loc11_20.2: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_20.3: type = converted %int.make_type_32.loc11_12, %.loc11_20.2 [template = i32] // CHECK:STDOUT: %.loc11_20.4: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] // CHECK:STDOUT: %.loc11_20.5: type = converted %int.make_type_32.loc11_17, %.loc11_20.4 [template = i32] -// CHECK:STDOUT: %.loc11_20.6: type = converted %.loc11_20.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_20.6: type = converted %.loc11_20.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: %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.loc13_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc13_17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc13_20.1: %.2 = tuple_literal (%int.make_type_32.loc13_12, %int.make_type_32.loc13_17) +// CHECK:STDOUT: %.loc13_20.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc13_12, %int.make_type_32.loc13_17) // CHECK:STDOUT: %.loc13_20.2: type = value_of_initializer %int.make_type_32.loc13_12 [template = i32] // CHECK:STDOUT: %.loc13_20.3: type = converted %int.make_type_32.loc13_12, %.loc13_20.2 [template = i32] // CHECK:STDOUT: %.loc13_20.4: type = value_of_initializer %int.make_type_32.loc13_17 [template = i32] // CHECK:STDOUT: %.loc13_20.5: type = converted %int.make_type_32.loc13_17, %.loc13_20.4 [template = i32] -// CHECK:STDOUT: %.loc13_20.6: type = converted %.loc13_20.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: %.loc13_20.6: type = converted %.loc13_20.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: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern @@ -99,42 +99,42 @@ fn H() -> i32 { // 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() -> %return: %.3 { +// CHECK:STDOUT: fn @G() -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: // 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: %.loc14_19.1: %.2 = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16) +// CHECK:STDOUT: %.loc14_19.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16) // CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_32.loc14_11, %.loc14_19.2 [template = i32] // CHECK:STDOUT: %.loc14_19.4: type = value_of_initializer %int.make_type_32.loc14_16 [template = i32] // CHECK:STDOUT: %.loc14_19.5: type = converted %int.make_type_32.loc14_16, %.loc14_19.4 [template = i32] -// CHECK:STDOUT: %.loc14_19.6: type = converted %.loc14_19.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %v.var: ref %.3 = var v -// CHECK:STDOUT: %v: ref %.3 = bind_name v, %v.var +// CHECK:STDOUT: %.loc14_19.6: type = converted %.loc14_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v +// CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_7: ref %.3 = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc14: init %.3 = call %F.ref.loc14() to %.loc14_7 +// CHECK:STDOUT: %.loc14_7: ref %tuple.type.2 = splice_block %v.var {} +// CHECK:STDOUT: %F.call.loc14: init %tuple.type.2 = call %F.ref.loc14() to %.loc14_7 // CHECK:STDOUT: assign %v.var, %F.call.loc14 -// CHECK:STDOUT: %v.ref: ref %.3 = name_ref v, %v +// CHECK:STDOUT: %v.ref: ref %tuple.type.2 = name_ref v, %v // CHECK:STDOUT: %F.ref.loc15: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc15: ref %.3 = splice_block %v.ref {} -// CHECK:STDOUT: %F.call.loc15: init %.3 = call %F.ref.loc15() to %.loc15 +// CHECK:STDOUT: %.loc15: ref %tuple.type.2 = splice_block %v.ref {} +// CHECK:STDOUT: %F.call.loc15: init %tuple.type.2 = call %F.ref.loc15() to %.loc15 // CHECK:STDOUT: assign %v.ref, %F.call.loc15 // CHECK:STDOUT: %F.ref.loc16: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc13_8.2: ref %.3 = splice_block %return {} -// CHECK:STDOUT: %F.call.loc16: init %.3 = call %F.ref.loc16() to %.loc13_8.2 +// CHECK:STDOUT: %.loc13_8.2: ref %tuple.type.2 = splice_block %return {} +// CHECK:STDOUT: %F.call.loc16: init %tuple.type.2 = call %F.ref.loc16() to %.loc13_8.2 // CHECK:STDOUT: return %F.call.loc16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc20_11.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %G.call: init %.3 = call %G.ref() to %.loc20_11.1 -// CHECK:STDOUT: %.loc20_14: i32 = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc20_11.2: ref %.3 = temporary %.loc20_11.1, %G.call +// CHECK:STDOUT: %.loc20_11.1: ref %tuple.type.2 = temporary_storage +// CHECK:STDOUT: %G.call: init %tuple.type.2 = call %G.ref() to %.loc20_11.1 +// CHECK:STDOUT: %.loc20_14: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_11.2: ref %tuple.type.2 = temporary %.loc20_11.1, %G.call // CHECK:STDOUT: %.loc20_13.1: ref i32 = tuple_access %.loc20_11.2, element0 // CHECK:STDOUT: %.loc20_13.2: i32 = bind_value %.loc20_13.1 // CHECK:STDOUT: return %.loc20_13.2 diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index d55073e095ac..b4c6e2664964 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -16,15 +16,15 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 3 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,14 +69,14 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] -// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.4] +// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.3] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32, %.loc13_11.1 [template = i32] -// CHECK:STDOUT: %.loc13_25: type = array_type %int.sadd, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc13_25: type = array_type %int.sadd, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index 3b9595398bf7..6cb9e7b7c5a1 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -14,7 +14,7 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index dd2cdcaf59ce..ddc6f9ecb0b8 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -41,7 +41,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/builtin/fail_unknown.carbon b/toolchain/check/testdata/function/builtin/fail_unknown.carbon index 5f1a24adecf1..05955e38cbb1 100644 --- a/toolchain/check/testdata/function/builtin/fail_unknown.carbon +++ b/toolchain/check/testdata/function/builtin/fail_unknown.carbon @@ -17,7 +17,7 @@ fn UnknownBuiltin() = "unknown.builtin.name"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %UnknownBuiltin.type: type = fn_type @UnknownBuiltin [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UnknownBuiltin: %UnknownBuiltin.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index a92497c01c0f..2b60600f1c0f 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -24,21 +24,21 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: = bound_method %.5, %F.2 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %.8: i32 = int_value 3 [template] -// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template] -// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: = bound_method %.4, %F.2 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %.7: i32 = int_value 3 [template] +// CHECK:STDOUT: %.8: type = array_type %.7, i32 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,18 +65,18 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc19_16: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_16: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_24: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.8] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_24: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.7] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32, %.loc19_11.1 [template = i32] -// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.9] -// CHECK:STDOUT: %arr.var: ref %.9 = var arr -// CHECK:STDOUT: %arr: ref %.9 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.8] +// CHECK:STDOUT: %arr.var: ref %.8 = var arr +// CHECK:STDOUT: %arr: ref %.8 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -105,7 +105,7 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @F.1.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -138,7 +138,7 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index 45ed823849f5..99f145b00981 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -34,14 +34,14 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,7 +85,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %return.param: ref @Op.%Self (%Self) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @Op.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %Op.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -109,7 +109,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] @@ -117,21 +117,21 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.2: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.7: = bound_method %.3, %Op.1 [template] -// CHECK:STDOUT: %.8: i32 = int_value 3 [template] -// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template] -// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] -// CHECK:STDOUT: %.11: i32 = int_value 4 [template] -// CHECK:STDOUT: %.12: = bound_method %.8, %Op.1 [template] -// CHECK:STDOUT: %.13: i32 = int_value 7 [template] -// CHECK:STDOUT: %.14: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.15: i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.9 = tuple_value (%.8, %.11, %.13) [template] +// CHECK:STDOUT: %.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.6: = bound_method %.2, %Op.1 [template] +// CHECK:STDOUT: %.7: i32 = int_value 3 [template] +// CHECK:STDOUT: %.8: type = array_type %.7, i32 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: i32 = int_value 4 [template] +// CHECK:STDOUT: %.11: = bound_method %.7, %Op.1 [template] +// CHECK:STDOUT: %.12: i32 = int_value 7 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template] +// CHECK:STDOUT: %.13: i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.8 = tuple_value (%.7, %.10, %.12) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -143,7 +143,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//default, inst+5, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//default, inst+9, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+11, unloaded -// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//default, inst+39, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//default, inst+39, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.5: %Op.type.2 = import_ref Core//default, inst+34, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+34, unloaded // CHECK:STDOUT: } @@ -162,16 +162,16 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.2 [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc10_16: i32 = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_20: i32 = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc10_18.2: = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.7] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.8] +// CHECK:STDOUT: %.loc10_16: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_20: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc10_18.2: = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.6] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.7] // CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_11.2: type = converted %int.make_type_32, %.loc10_11.1 [template = i32] -// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.9] -// CHECK:STDOUT: %arr.var: ref %.9 = var arr -// CHECK:STDOUT: %arr: ref %.9 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.8] +// CHECK:STDOUT: %arr.var: ref %.8 = var arr +// CHECK:STDOUT: %arr: ref %.8 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { @@ -200,7 +200,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_22: = interface_witness (%Op.decl) [template = constants.%.2] +// CHECK:STDOUT: %.loc6_22: = interface_witness (%Op.decl) [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -219,25 +219,25 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_26: i32 = int_value 3 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_29: i32 = int_value 4 [template = constants.%.11] -// CHECK:STDOUT: %.loc10_32: i32 = int_value 3 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_36: i32 = int_value 4 [template = constants.%.11] -// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.12] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.13] -// CHECK:STDOUT: %.loc10_37.1: %.14 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) -// CHECK:STDOUT: %.loc10_37.2: i32 = int_value 0 [template = constants.%.15] +// CHECK:STDOUT: %.loc10_26: i32 = int_value 3 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_29: i32 = int_value 4 [template = constants.%.10] +// CHECK:STDOUT: %.loc10_32: i32 = int_value 3 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_36: i32 = int_value 4 [template = constants.%.10] +// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.11] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.12] +// CHECK:STDOUT: %.loc10_37.1: %tuple.type = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) +// CHECK:STDOUT: %.loc10_37.2: i32 = int_value 0 [template = constants.%.13] // CHECK:STDOUT: %.loc10_37.3: ref i32 = array_index file.%arr.var, %.loc10_37.2 -// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_37.5: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_37.5: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_37.6: ref i32 = array_index file.%arr.var, %.loc10_37.5 -// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.11] -// CHECK:STDOUT: %.loc10_37.8: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.10] +// CHECK:STDOUT: %.loc10_37.8: i32 = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc10_37.9: ref i32 = array_index file.%arr.var, %.loc10_37.8 -// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.13] -// CHECK:STDOUT: %.loc10_37.11: init %.9 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc10_38: init %.9 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array] +// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.12] +// CHECK:STDOUT: %.loc10_37.11: init %.8 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc10_38: init %.8 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc10_38 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon index 4447f0601a1c..c89e29779b9a 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -25,7 +25,7 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] // CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template] @@ -77,18 +77,18 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] // CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 3 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.5 = tuple_value (%.2, %.3, %.4) [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.4 = tuple_value (%.1, %.2, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -110,14 +110,14 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, imports.%import_ref.2 [template = constants.%TestAdd] -// CHECK:STDOUT: %.loc4_29: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_32: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_29: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_32: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.3] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_34: type = array_type %int.sadd, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref %.5 = var arr -// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_34: type = array_type %int.sadd, i32 [template = constants.%.4] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -126,21 +126,21 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_39: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_42: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_45: i32 = int_value 3 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_46.1: %.7 = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45) -// CHECK:STDOUT: %.loc4_46.2: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc4_39: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_42: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_45: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_46.1: %tuple.type = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45) +// CHECK:STDOUT: %.loc4_46.2: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc4_46.3: ref i32 = array_index file.%arr.var, %.loc4_46.2 -// CHECK:STDOUT: %.loc4_46.4: init i32 = initialize_from %.loc4_39 to %.loc4_46.3 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_46.5: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_46.4: init i32 = initialize_from %.loc4_39 to %.loc4_46.3 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_46.5: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc4_46.6: ref i32 = array_index file.%arr.var, %.loc4_46.5 -// CHECK:STDOUT: %.loc4_46.7: init i32 = initialize_from %.loc4_42 to %.loc4_46.6 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_46.8: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_46.7: init i32 = initialize_from %.loc4_42 to %.loc4_46.6 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_46.8: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %.loc4_46.9: ref i32 = array_index file.%arr.var, %.loc4_46.8 -// CHECK:STDOUT: %.loc4_46.10: init i32 = initialize_from %.loc4_45 to %.loc4_46.9 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_46.11: init %.5 = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc4_47: init %.5 = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array] +// CHECK:STDOUT: %.loc4_46.10: init i32 = initialize_from %.loc4_45 to %.loc4_46.9 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_46.11: init %.4 = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc4_47: init %.4 = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_47 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index 02c3ae3618b6..87809431bff1 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -19,12 +19,12 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type String [template] -// CHECK:STDOUT: %.3: String = string_literal "hello" [template] +// CHECK:STDOUT: %.1: type = ptr_type String [template] +// CHECK:STDOUT: %.2: String = string_literal "hello" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,7 +52,7 @@ fn Run() { // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32, %.loc15_10.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_16: String = string_literal "hello" [template = constants.%.3] +// CHECK:STDOUT: %.loc15_16: String = string_literal "hello" [template = constants.%.2] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 52b6df1ead32..2b47c2ea4ce5 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -68,7 +68,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run0: %Run0.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] @@ -78,8 +78,8 @@ fn Main() { // CHECK:STDOUT: %Run2: %Run2.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -151,17 +151,17 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] -// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] -// CHECK:STDOUT: %.loc31_8: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc31_11: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc31_8: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc31_11: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] // CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] -// CHECK:STDOUT: %.loc48_8: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc48_11: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc48_8: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc48_11: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] // CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] -// CHECK:STDOUT: %.loc64: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc64: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index 42b2bce7d964..e2fd57a327e0 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -27,13 +27,13 @@ fn F() { // 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: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.1: f64 = float_literal 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] @@ -43,14 +43,14 @@ fn F() { // 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(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: %.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 { @@ -63,7 +63,7 @@ fn F() { // 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 @@ -98,8 +98,8 @@ fn F() { // 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: @@ -119,9 +119,9 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc23_5.1: f64 = float_literal 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc23_5.1: f64 = float_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc23_5.2: i32 = converted %.loc23_5.1, [template = ] -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,7 +163,7 @@ fn F() { // 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: diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index a46cb9129ae9..4d3f5b473188 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -25,11 +25,11 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.3: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] @@ -43,14 +43,14 @@ fn Run() { // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [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.7 [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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.7 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.8 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.8 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,7 +65,7 @@ fn Run() { // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.3: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // 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 // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -101,8 +101,8 @@ fn Run() { // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.2 (constants.%.5)] +// 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.7 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -116,7 +116,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.2] // CHECK:STDOUT: return %.loc11_26 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -176,7 +176,7 @@ fn Run() { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 132ed40e12f3..d66001c53e47 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -20,13 +20,13 @@ fn Main() { // 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: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,7 +81,7 @@ fn Main() { // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] -// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %Echo.call: init i32 = call %Echo.ref(%.loc16_21) // CHECK:STDOUT: assign %b.var, %Echo.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 8fd65972d34f..0912e3e378a9 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -20,18 +20,18 @@ fn Main() { // 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] -// CHECK:STDOUT: %.6: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.1) [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,24 +80,24 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_15.1: %.2 = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc14_15.1: %tuple.type.1 = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_32, %.loc14_15.2 [template = i32] -// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var -// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_22.1: %.3 = tuple_literal (%.loc14_20) -// CHECK:STDOUT: %.loc14_22.2: init %.3 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_23: init %.3 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x +// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_22.1: %tuple.type.2 = tuple_literal (%.loc14_20) +// CHECK:STDOUT: %.loc14_22.2: init %tuple.type.2 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_23: init %tuple.type.2 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple] // CHECK:STDOUT: assign %x.var, %.loc14_23 // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, %x -// CHECK:STDOUT: %.loc16_9: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, %x +// CHECK:STDOUT: %.loc16_9: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc16_8.1: ref i32 = tuple_access %x.ref, element0 -// CHECK:STDOUT: %.loc16_12: i32 = int_value 6 [template = constants.%.6] +// CHECK:STDOUT: %.loc16_12: i32 = int_value 6 [template = constants.%.3] // CHECK:STDOUT: %.loc16_8.2: i32 = bind_value %.loc16_8.1 -// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc16_8.2, %.loc16_12) +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc16_8.2, %.loc16_12) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/alias.carbon b/toolchain/check/testdata/function/call/no_prelude/alias.carbon index fbe156319303..a4c6d5cf89b1 100644 --- a/toolchain/check/testdata/function/call/no_prelude/alias.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/alias.carbon @@ -19,10 +19,10 @@ fn Main() { // CHECK:STDOUT: --- alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } @@ -34,35 +34,35 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc11_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %B: %A.type = bind_alias B, %A.decl [template = constants.%A] // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @A() -> %.1 { +// CHECK:STDOUT: fn @A() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_25: %.1 = converted %.loc11_24, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_24: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_25: %empty_tuple.type = converted %.loc11_24, %empty_tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc11_25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %.loc16_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %B.ref: %A.type = name_ref B, file.%B [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %B.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %B.ref() // CHECK:STDOUT: assign %b.var, %A.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon index 25f283d36af3..759686f88af0 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon @@ -21,7 +21,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon index c32582080b12..531e91e3b8e8 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon @@ -19,12 +19,12 @@ fn Main() { // CHECK:STDOUT: --- empty_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,36 +33,36 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { -// CHECK:STDOUT: %a.patt: %.1 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.1 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %a.patt: %empty_tuple.type = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %empty_tuple.type = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_20.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.1 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc11_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_20.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %a.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Echo(%a.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @Echo(%a.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, %a // CHECK:STDOUT: return %a.ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] -// CHECK:STDOUT: %.loc16_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_9.2: %.1 = converted %.loc16_9.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_9.2) +// CHECK:STDOUT: %.loc16_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_9.2: %empty_tuple.type = converted %.loc16_9.1, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %Echo.call: init %empty_tuple.type = call %Echo.ref(%.loc16_9.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon b/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon index f46752123815..589fa3171a00 100644 --- a/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon @@ -20,12 +20,12 @@ fn Run() { // CHECK:STDOUT: --- fail_explicit_self_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,26 +34,26 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_13.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param +// CHECK:STDOUT: %.loc14_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%self.param_patt: %.1); +// CHECK:STDOUT: fn @F(%self.param_patt: %empty_tuple.type); // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc17_6.1: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc17_6.2: %.1 = converted %.loc17_6.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(%.loc17_6.2) +// CHECK:STDOUT: %.loc17_6.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc17_6.2: %empty_tuple.type = converted %.loc17_6.1, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc17_6.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon b/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon index 6d48a2c8d7ca..620bc55ded00 100644 --- a/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon @@ -20,7 +20,7 @@ fn Run() { // CHECK:STDOUT: --- fail_runtime_implicit_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] @@ -33,8 +33,8 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} { -// CHECK:STDOUT: %.loc14_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_10.2: type = converted %.loc14_10.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_10.2: type = converted %.loc14_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {} // CHECK:STDOUT: } @@ -44,7 +44,7 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon b/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon index db69331745e6..643702fb91a8 100644 --- a/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon @@ -18,7 +18,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] @@ -41,7 +41,7 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref() +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon index b0a855d8ebc1..185d75371285 100644 --- a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon @@ -19,7 +19,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %MakeImplicitEmptyTuple.type: type = fn_type @MakeImplicitEmptyTuple [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %MakeImplicitEmptyTuple: %MakeImplicitEmptyTuple.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] @@ -41,12 +41,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: %MakeImplicitEmptyTuple.type = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple] -// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init %.1 = call %MakeImplicitEmptyTuple.ref() +// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init %empty_tuple.type = call %MakeImplicitEmptyTuple.ref() // CHECK:STDOUT: assign %b.var, %MakeImplicitEmptyTuple.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 73c6afc6d6d5..3b6efb0ed256 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -18,13 +18,13 @@ fn Main() { // 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,8 +66,8 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14) +// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 1050ce085843..09e7c907d68b 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -19,13 +19,13 @@ fn Main() { // 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,11 +67,11 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14) +// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15) +// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 7bc14fb42221..13cebae1da8e 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -18,14 +18,14 @@ fn Main() { // 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,9 +74,9 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14_7, %.loc14_10) +// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7, %.loc14_10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index b72a77cf739b..24e76acd68be 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -19,14 +19,14 @@ fn Main() { // 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,13 +75,13 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14_7, %.loc14_10) +// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7, %.loc14_10) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %.loc15_7: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_10: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15_7, %.loc15_10) +// CHECK:STDOUT: %.loc15_7: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_10: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7, %.loc15_10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index 584b79fd7751..359f6e7d8a9d 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -17,7 +17,7 @@ fn F(n: i32, a: [i32; n]*); // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index 6b61ee72c542..180c69da4f87 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -20,7 +20,7 @@ fn F(n: i32, n: 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 560059ad57b7..9f39502f3b84 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -259,15 +259,15 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -314,24 +314,24 @@ import library "extern_api"; // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { -// CHECK:STDOUT: %c.patt: %.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.3 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %tuple.type.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %tuple.type.2 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10) +// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] -// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32] -// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %NS: = namespace [template] { @@ -346,7 +346,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %.3) -> %.4; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -356,15 +356,15 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -411,24 +411,24 @@ import library "extern_api"; // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { -// CHECK:STDOUT: %c.patt: %.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.3 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %tuple.type.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %tuple.type.2 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc6_45: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_49.1: %.2 = tuple_literal (%int.make_type_32.loc6_45) +// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc6_45) // CHECK:STDOUT: %.loc6_49.2: type = value_of_initializer %int.make_type_32.loc6_45 [template = i32] // CHECK:STDOUT: %.loc6_49.3: type = converted %int.make_type_32.loc6_45, %.loc6_49.2 [template = i32] -// CHECK:STDOUT: %.loc6_49.4: type = converted %.loc6_49.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_49.4: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc6_60: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_60.1: type = value_of_initializer %int.make_type_32.loc6_60 [template = i32] // CHECK:STDOUT: %.loc6_60.2: type = converted %int.make_type_32.loc6_60, %.loc6_60.1 [template = i32] -// CHECK:STDOUT: %.loc6_63: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc6_63: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %NS: = namespace [template] { @@ -443,7 +443,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %.3) -> %.4; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.2) -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -452,19 +452,19 @@ import library "extern_api"; // CHECK:STDOUT: --- basics.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.1) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -505,10 +505,10 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] @@ -517,17 +517,17 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] -// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var -// CHECK:STDOUT: %.loc9_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.2] +// CHECK:STDOUT: %c.var: ref %.2 = var c +// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var +// CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -536,7 +536,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %.4) -> %.3; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type) -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -545,25 +545,25 @@ import library "extern_api"; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc7: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc7: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc8_23: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25.1: %.4 = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_25.2: %.4 = converted %.loc8_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_25.2) +// CHECK:STDOUT: %.loc8_23: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_25.1: %tuple.type = tuple_literal (%.loc8_23) +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc8_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_25.2: %tuple.type = converted %.loc8_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc8_25.2) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() +// CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %E.ref: %E.type = name_ref E, imports.%import_ref.6 [template = constants.%E] -// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() +// CHECK:STDOUT: %E.call: init %empty_tuple.type = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -572,23 +572,23 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] // CHECK:STDOUT: %E: %E.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -640,25 +640,25 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { // CHECK:STDOUT: %int.make_type_32.loc32_17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc32_21.1: %.2 = tuple_literal (%int.make_type_32.loc32_17) +// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc32_17) // CHECK:STDOUT: %.loc32_21.2: type = value_of_initializer %int.make_type_32.loc32_17 [template = i32] // CHECK:STDOUT: %.loc32_21.3: type = converted %int.make_type_32.loc32_17, %.loc32_21.2 [template = i32] -// CHECK:STDOUT: %.loc32_21.4: type = converted %.loc32_21.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc32_21.4: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc32_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_32.1: type = value_of_initializer %int.make_type_32.loc32_32 [template = i32] // CHECK:STDOUT: %.loc32_32.2: type = converted %int.make_type_32.loc32_32, %.loc32_32.1 [template = i32] -// CHECK:STDOUT: %.loc32_35: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %.loc32_24: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc32_35: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %.loc32_24: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {} -// CHECK:STDOUT: %.loc52_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc52_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_8.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_8.2: type = converted %int.make_type_32.loc53, %.loc53_8.1 [template = i32] @@ -667,17 +667,17 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc54: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_13.1: type = value_of_initializer %int.make_type_32.loc54 [template = i32] // CHECK:STDOUT: %.loc54_13.2: type = converted %int.make_type_32.loc54, %.loc54_13.1 [template = i32] -// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.var: ref %.4 = var c -// CHECK:STDOUT: %c: ref %.4 = bind_name c, %c.var -// CHECK:STDOUT: %.loc55_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc56_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.var: ref %.1 = var c +// CHECK:STDOUT: %c: ref %.1 = bind_name c, %c.var +// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc56_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -686,7 +686,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %.3) -> %.4; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -695,25 +695,25 @@ import library "extern_api"; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc53: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc53: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc53) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc54_23: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc54_25.1: %.3 = tuple_literal (%.loc54_23) -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc54_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc54_25.2: %.3 = converted %.loc54_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc54_25.2) +// CHECK:STDOUT: %.loc54_23: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc54_25.1: %tuple.type.2 = tuple_literal (%.loc54_23) +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc54_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc54_25.2: %tuple.type.2 = converted %.loc54_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.1 = call %C.ref(%.loc54_25.2) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() +// CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [template = constants.%E] -// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() +// CHECK:STDOUT: %E.call: init %empty_tuple.type = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -722,23 +722,23 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] // CHECK:STDOUT: %E: %E.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -790,25 +790,25 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { // CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc8_21.1: %.2 = tuple_literal (%int.make_type_32.loc8_17) +// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc8_17) // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32] // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32] -// CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32] // CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_32.loc8_32, %.loc8_32.1 [template = i32] -// CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %.loc8_24: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %.loc8_24: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {} -// CHECK:STDOUT: %.loc12_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc12_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] @@ -817,17 +817,17 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14, %.loc14_13.1 [template = i32] -// CHECK:STDOUT: %.loc14_16: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.var: ref %.4 = var c -// CHECK:STDOUT: %c: ref %.4 = bind_name c, %c.var -// CHECK:STDOUT: %.loc15_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc16_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_9.2: type = converted %.loc16_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc14_16: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.var: ref %.1 = var c +// CHECK:STDOUT: %c: ref %.1 = bind_name c, %c.var +// CHECK:STDOUT: %.loc15_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc16_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_9.2: type = converted %.loc16_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -836,7 +836,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %.3) -> %.4; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.2) -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -845,25 +845,25 @@ import library "extern_api"; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc14_23: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25.1: %.3 = tuple_literal (%.loc14_23) -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_25.2: %.3 = converted %.loc14_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_25.2) +// CHECK:STDOUT: %.loc14_23: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_25.1: %tuple.type.2 = tuple_literal (%.loc14_23) +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_25.2: %tuple.type.2 = converted %.loc14_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.1 = call %C.ref(%.loc14_25.2) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() +// CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [template = constants.%E] -// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() +// CHECK:STDOUT: %E.call: init %empty_tuple.type = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -871,19 +871,19 @@ import library "extern_api"; // CHECK:STDOUT: --- fail_merge.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.1) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -929,10 +929,10 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc52_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc52_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_8.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_8.2: type = converted %int.make_type_32.loc53, %.loc53_8.1 [template = i32] @@ -941,17 +941,17 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc54: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_13.1: type = value_of_initializer %int.make_type_32.loc54 [template = i32] // CHECK:STDOUT: %.loc54_13.2: type = converted %int.make_type_32.loc54, %.loc54_13.1 [template = i32] -// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var -// CHECK:STDOUT: %.loc55_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc56_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: i32} [template = constants.%.2] +// CHECK:STDOUT: %c.var: ref %.2 = var c +// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var +// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc56_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -960,7 +960,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %.4) -> %.3; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type) -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -969,25 +969,25 @@ import library "extern_api"; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc53: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc53: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc53) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc54_23: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc54_25.1: %.4 = tuple_literal (%.loc54_23) -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc54_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc54_25.2: %.4 = converted %.loc54_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc54_25.2) +// CHECK:STDOUT: %.loc54_23: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc54_25.1: %tuple.type = tuple_literal (%.loc54_23) +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc54_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc54_25.2: %tuple.type = converted %.loc54_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc54_25.2) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() +// CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %E.ref: %E.type = name_ref E, imports.%import_ref.6 [template = constants.%E] -// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() +// CHECK:STDOUT: %E.call: init %empty_tuple.type = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -995,19 +995,19 @@ import library "extern_api"; // CHECK:STDOUT: --- fail_merge_reverse.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.1) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -1053,10 +1053,10 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc51_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc51_9.2: type = converted %.loc51_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc51_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc51_9.2: type = converted %.loc51_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc52: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc52_8.1: type = value_of_initializer %int.make_type_32.loc52 [template = i32] // CHECK:STDOUT: %.loc52_8.2: type = converted %int.make_type_32.loc52, %.loc52_8.1 [template = i32] @@ -1065,17 +1065,17 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_32.loc53, %.loc53_13.1 [template = i32] -// CHECK:STDOUT: %.loc53_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var -// CHECK:STDOUT: %.loc54_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc54_9.2: type = converted %.loc54_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc55_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc53_16: type = struct_type {.c: i32} [template = constants.%.2] +// CHECK:STDOUT: %c.var: ref %.2 = var c +// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var +// CHECK:STDOUT: %.loc54_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc54_9.2: type = converted %.loc54_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -1084,7 +1084,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %.4) -> %.3; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type) -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1093,25 +1093,25 @@ import library "extern_api"; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc52: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc52: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc52) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc53_23: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc53_25.1: %.4 = tuple_literal (%.loc53_23) -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc53_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc53_25.2: %.4 = converted %.loc53_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc53_25.2) +// CHECK:STDOUT: %.loc53_23: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc53_25.1: %tuple.type = tuple_literal (%.loc53_23) +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc53_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc53_25.2: %tuple.type = converted %.loc53_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc53_25.2) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() +// CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %E.ref: %E.type = name_ref E, imports.%import_ref.6 [template = constants.%E] -// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() +// CHECK:STDOUT: %E.call: init %empty_tuple.type = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon index 52a8d0d5f7d0..c90d581a30f1 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon @@ -42,7 +42,7 @@ var f: () = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -59,7 +59,7 @@ var f: () = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +80,7 @@ var f: () = F(); // CHECK:STDOUT: --- use_export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -95,10 +95,10 @@ var f: () = F(); // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -106,7 +106,7 @@ var f: () = F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%f.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index af61d983d0e4..2db98d38424c 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -68,7 +68,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -84,7 +84,7 @@ class C { // CHECK:STDOUT: --- basic_use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -99,10 +99,10 @@ class C { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -110,7 +110,7 @@ class C { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -119,7 +119,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -137,7 +137,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -156,12 +156,12 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -181,7 +181,7 @@ class C { // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon index cfb17c24df2f..e3c6c7244d38 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon @@ -145,7 +145,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -162,7 +162,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -184,7 +184,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -206,7 +206,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -228,7 +228,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -250,7 +250,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -281,7 +281,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -298,7 +298,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -315,7 +315,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -332,7 +332,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -349,7 +349,7 @@ extern library "extern_of_import" fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon index 27b31aa78c5f..56a031f56070 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon @@ -41,7 +41,7 @@ extern fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,7 +58,7 @@ extern fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +80,7 @@ extern fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon index 12aa108a029f..cfc0156f0685 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon @@ -39,7 +39,7 @@ extern fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -56,7 +56,7 @@ extern fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -78,7 +78,7 @@ extern fn F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon index 6186d76df867..6cc86469a558 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon @@ -89,7 +89,7 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template] // CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template] // CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template] @@ -99,8 +99,8 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -154,7 +154,7 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: class @C; // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc37: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc37: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -181,7 +181,7 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %CallFAndGIncomplete.type: type = fn_type @CallFAndGIncomplete [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %CallFAndGIncomplete: %CallFAndGIncomplete.type = struct_value () [template] // CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template] // CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template] @@ -191,9 +191,9 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template] // CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template] // CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon index 998084dcf004..2ae44a3f9254 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon @@ -94,7 +94,7 @@ extern private fn ExternOrderAndConflict() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %WrongOrder.type: type = fn_type @WrongOrder [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %WrongOrder: %WrongOrder.type = struct_value () [template] // CHECK:STDOUT: %DuplicateVirtual.type: type = fn_type @DuplicateVirtual [template] // CHECK:STDOUT: %DuplicateVirtual: %DuplicateVirtual.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon index b440b5d413fe..3b8909438495 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon @@ -61,14 +61,14 @@ fn E() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -86,32 +86,32 @@ fn E() {} // CHECK:STDOUT: %A.decl.loc11: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param.loc21: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x.loc21: %.1 = bind_name x, %x.param.loc21 +// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param.loc21: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x.loc21: %empty_tuple.type = bind_name x, %x.param.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param.loc29: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x.loc29: %.1 = bind_name x, %x.param.loc29 +// CHECK:STDOUT: %.loc29_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param.loc29: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x.loc29: %empty_tuple.type = bind_name x, %x.param.loc29 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc39_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param +// CHECK:STDOUT: %.loc39_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %D.decl.loc49: %D.type = fn_decl @D [template = constants.%D] {} {} @@ -121,11 +121,11 @@ fn E() {} // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%x.param_patt: %.1); +// CHECK:STDOUT: fn @B(%x.param_patt: %empty_tuple.type); // CHECK:STDOUT: // CHECK:STDOUT: fn @C(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%x.param_patt: %.1); +// CHECK:STDOUT: fn @.1(%x.param_patt: %empty_tuple.type); // CHECK:STDOUT: // CHECK:STDOUT: fn @D() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon index fe823cf8cb1b..17098a576453 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon @@ -62,7 +62,7 @@ fn A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -79,7 +79,7 @@ fn A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,7 +99,7 @@ fn A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -115,9 +115,9 @@ fn A { // CHECK:STDOUT: --- fail_invalid_file_generic_regression_test.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %x: %.1 = bind_symbolic_name x [symbolic] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x [symbolic] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } @@ -127,25 +127,25 @@ fn A { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_10.2: type = converted %.loc8_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: %.1 = bind_symbolic_name x, %x.var [symbolic = constants.%x] +// CHECK:STDOUT: %.loc8_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_10.2: type = converted %.loc8_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x, %x.var [symbolic = constants.%x] // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_15.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_15.2: init %.1 = tuple_init () to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_16: init %.1 = converted %.loc8_15.1, %.loc8_15.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_15.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_15.2: init %empty_tuple.type = tuple_init () to file.%x.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_16: init %empty_tuple.type = converted %.loc8_15.1, %.loc8_15.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%x.var, %.loc8_16 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon index 3900e4402496..dc1258be6053 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon @@ -67,7 +67,7 @@ extern fn A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -84,7 +84,7 @@ extern fn A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,7 +110,7 @@ extern fn A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -127,7 +127,7 @@ extern fn A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -150,7 +150,7 @@ extern fn A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -167,7 +167,7 @@ extern fn A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon index 681a26db906c..5a344f58c935 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon @@ -75,7 +75,7 @@ fn D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -92,7 +92,7 @@ fn D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -139,7 +139,7 @@ fn D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -170,7 +170,7 @@ fn D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -187,7 +187,7 @@ fn D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -216,7 +216,7 @@ fn D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon b/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon index 530b9193d30b..9ca34b227912 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon @@ -16,7 +16,7 @@ fn G() { F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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] @@ -36,7 +36,7 @@ fn G() { F(); } // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index bb626cfbae3f..dd73047f567b 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -16,7 +16,7 @@ fn G(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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 2b9935231612..4db3cb2d93d4 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -113,18 +113,18 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } @@ -166,24 +166,24 @@ fn D() {} // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { -// CHECK:STDOUT: %c.patt: %.3 = binding_pattern c -// CHECK:STDOUT: %c.param_patt: %.3 = value_param_pattern %c.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %c.patt: %tuple.type.2 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %tuple.type.2 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10) +// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] -// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32] -// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: %c.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.1] +// CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: } @@ -201,14 +201,14 @@ fn D() {} // CHECK:STDOUT: return %b.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %.3) -> %.4 { +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.2) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: %.3 = name_ref c, %c -// CHECK:STDOUT: %.loc6_47: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %c.ref: %tuple.type.2 = name_ref c, %c +// CHECK:STDOUT: %.loc6_47: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_46: i32 = tuple_access %c.ref, element0 -// CHECK:STDOUT: %.loc6_48: %.4 = struct_literal (%.loc6_46) -// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc6_46) -// CHECK:STDOUT: %.loc6_49: %.4 = converted %.loc6_48, %struct +// CHECK:STDOUT: %.loc6_48: %.1 = struct_literal (%.loc6_46) +// CHECK:STDOUT: %struct: %.1 = struct_value (%.loc6_46) +// CHECK:STDOUT: %.loc6_49: %.1 = converted %.loc6_48, %struct // CHECK:STDOUT: return %.loc6_49 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -218,7 +218,7 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -243,19 +243,19 @@ fn D() {} // CHECK:STDOUT: --- basics.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -284,10 +284,10 @@ fn D() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] @@ -296,9 +296,9 @@ fn D() {} // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] -// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var +// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.2] +// CHECK:STDOUT: %c.var: ref %.2 = var c +// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -307,23 +307,23 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %.4) -> %.3; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type) -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] -// CHECK:STDOUT: %.loc7: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc7: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %.loc8_23: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25.1: %.4 = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_25.2: %.4 = converted %.loc8_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_25.2) +// CHECK:STDOUT: %.loc8_23: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_25.1: %tuple.type = tuple_literal (%.loc8_23) +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc8_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_25.2: %tuple.type = converted %.loc8_25.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc8_25.2) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -332,7 +332,7 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] @@ -391,7 +391,7 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -423,7 +423,7 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/import_access.carbon b/toolchain/check/testdata/function/definition/import_access.carbon index 2fe281686d87..045551ab48c3 100644 --- a/toolchain/check/testdata/function/definition/import_access.carbon +++ b/toolchain/check/testdata/function/definition/import_access.carbon @@ -139,7 +139,7 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Def.type: type = fn_type @Def [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Def: %Def.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -168,7 +168,7 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ForwardWithDef.type: type = fn_type @ForwardWithDef [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ForwardWithDef: %ForwardWithDef.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,7 +198,7 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Forward: %Forward.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -223,7 +223,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Def.type: type = fn_type @Def [template] // CHECK:STDOUT: %Def: %Def.type = struct_value () [template] // CHECK:STDOUT: } @@ -245,10 +245,10 @@ private fn Redecl() {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Def(); @@ -256,7 +256,7 @@ private fn Redecl() {} // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Def.ref: %Def.type = name_ref Def, imports.%import_ref [template = constants.%Def] -// CHECK:STDOUT: %Def.call: init %.1 = call %Def.ref() +// CHECK:STDOUT: %Def.call: init %empty_tuple.type = call %Def.ref() // CHECK:STDOUT: assign file.%f.var, %Def.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -264,7 +264,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -281,10 +281,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -297,7 +297,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- fail_other_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -318,10 +318,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -335,7 +335,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- forward_with_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ForwardWithDef.type: type = fn_type @ForwardWithDef [template] // CHECK:STDOUT: %ForwardWithDef: %ForwardWithDef.type = struct_value () [template] // CHECK:STDOUT: } @@ -357,10 +357,10 @@ private fn Redecl() {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ForwardWithDef(); @@ -368,7 +368,7 @@ private fn Redecl() {} // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ForwardWithDef.ref: %ForwardWithDef.type = name_ref ForwardWithDef, imports.%import_ref [template = constants.%ForwardWithDef] -// CHECK:STDOUT: %ForwardWithDef.call: init %.1 = call %ForwardWithDef.ref() +// CHECK:STDOUT: %ForwardWithDef.call: init %empty_tuple.type = call %ForwardWithDef.ref() // CHECK:STDOUT: assign file.%f.var, %ForwardWithDef.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -376,7 +376,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- fail_local_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -393,10 +393,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -409,7 +409,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- fail_other_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -430,10 +430,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -447,7 +447,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- forward.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template] // CHECK:STDOUT: %Forward: %Forward.type = struct_value () [template] // CHECK:STDOUT: } @@ -469,10 +469,10 @@ private fn Redecl() {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -484,7 +484,7 @@ private fn Redecl() {} // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Forward.ref: %Forward.type = name_ref Forward, imports.%import_ref [template = constants.%Forward] -// CHECK:STDOUT: %Forward.call: init %.1 = call %Forward.ref() +// CHECK:STDOUT: %Forward.call: init %empty_tuple.type = call %Forward.ref() // CHECK:STDOUT: assign file.%f.var, %Forward.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -492,7 +492,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- fail_local_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -509,10 +509,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -525,7 +525,7 @@ private fn Redecl() {} // CHECK:STDOUT: --- fail_other_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -546,10 +546,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc9_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref %.1 = var f -// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f +// CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -564,7 +564,7 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Redecl.type: type = fn_type @Redecl [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Redecl: %Redecl.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon index 14f7478d9300..8745c8150faa 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon @@ -114,7 +114,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -134,7 +134,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -155,7 +155,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -172,7 +172,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,7 +198,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -219,7 +219,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -240,7 +240,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -262,7 +262,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -289,7 +289,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon b/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon index 9bc1540fd170..73e2c69554ad 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon @@ -111,7 +111,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,7 +128,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,7 +148,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -165,7 +165,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -182,7 +182,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -208,7 +208,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -225,7 +225,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -242,7 +242,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -268,7 +268,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -298,7 +298,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -324,7 +324,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -347,7 +347,7 @@ extern fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon index ec7458af07c4..b639e1201ebf 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon @@ -68,33 +68,33 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.3: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.2 = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %.type.3: type = fn_type @.3 [template] -// CHECK:STDOUT: %.4: %.type.3 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.3 = struct_value () [template] // CHECK:STDOUT: %I.type: type = fn_type @I [template] // CHECK:STDOUT: %I: %I.type = struct_value () [template] // CHECK:STDOUT: %.type.4: type = fn_type @.4 [template] -// CHECK:STDOUT: %.5: %.type.4 = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.4: %.type.4 = struct_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] // CHECK:STDOUT: %J: %J.type = struct_value () [template] // CHECK:STDOUT: %.type.5: type = fn_type @.5 [template] -// CHECK:STDOUT: %.6: %.type.5 = struct_value () [template] +// CHECK:STDOUT: %.5: %.type.5 = struct_value () [template] // CHECK:STDOUT: %K.type: type = fn_type @K [template] // CHECK:STDOUT: %K: %K.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {} [template] +// CHECK:STDOUT: %.6: type = struct_type {} [template] // CHECK:STDOUT: %.type.6: type = fn_type @.6 [template] -// CHECK:STDOUT: %.8: %.type.6 = struct_value () [template] -// CHECK:STDOUT: %struct: %.7 = struct_value () [template] +// CHECK:STDOUT: %.7: %.type.6 = struct_value () [template] +// CHECK:STDOUT: %struct: %.6 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -107,35 +107,35 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: .K = %K.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.decl.loc19: %.type.1 = fn_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %.decl.loc19: %.type.1 = fn_decl @.1 [template = constants.%.1] { +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param +// CHECK:STDOUT: %.loc19_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param +// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.3] {} {} +// CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.2] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc31_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param +// CHECK:STDOUT: %.loc31_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.4] { +// CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.3] { // CHECK:STDOUT: %x.patt: = binding_pattern x // CHECK:STDOUT: %x.param_patt: = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { @@ -143,60 +143,60 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: %x: = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: %I.type = fn_decl @I [template = constants.%I] {} {} -// CHECK:STDOUT: %.decl.loc46: %.type.4 = fn_decl @.4 [template = constants.%.5] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %.decl.loc46: %.type.4 = fn_decl @.4 [template = constants.%.4] { +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc46_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc46_12.2: type = converted %.loc46_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc46_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc46_12.2: type = converted %.loc46_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [template = constants.%J] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc48_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc48_12.2: type = converted %.loc48_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc48_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc48_12.2: type = converted %.loc48_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc56: %.type.5 = fn_decl @.5 [template = constants.%.6] {} {} +// CHECK:STDOUT: %.decl.loc56: %.type.5 = fn_decl @.5 [template = constants.%.5] {} {} // CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [template = constants.%K] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc58_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc58_12.2: type = converted %.loc58_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc58_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc58_12.2: type = converted %.loc58_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc65: %.type.6 = fn_decl @.6 [template = constants.%.8] { -// CHECK:STDOUT: %return.patt: %.7 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.7 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %.decl.loc65: %.type.6 = fn_decl @.6 [template = constants.%.7] { +// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc65_12.1: %.7 = struct_literal () -// CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%.7 [template = constants.%.7] -// CHECK:STDOUT: %return.param: ref %.7 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.7 = return_slot %return.param +// CHECK:STDOUT: %.loc65_12.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%.6 [template = constants.%.6] +// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%x.param_patt: %.1) { +// CHECK:STDOUT: fn @.1(%x.param_patt: %empty_tuple.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.1); +// CHECK:STDOUT: fn @G(%x.param_patt: %empty_tuple.type); // CHECK:STDOUT: // CHECK:STDOUT: fn @.2() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @H(%x.param_patt: %.1); +// CHECK:STDOUT: fn @H(%x.param_patt: %empty_tuple.type); // CHECK:STDOUT: // CHECK:STDOUT: fn @.3(%x.param_patt: ) { // CHECK:STDOUT: !entry: @@ -205,28 +205,28 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: fn @I(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.4() -> %.1 { +// CHECK:STDOUT: fn @.4() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc46_24: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc46_25: %.1 = converted %.loc46_24, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc46_24: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc46_25: %empty_tuple.type = converted %.loc46_24, %empty_tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc46_25 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @J() -> %.1; +// CHECK:STDOUT: fn @J() -> %empty_tuple.type; // CHECK:STDOUT: // CHECK:STDOUT: fn @.5() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @K() -> %.1; +// CHECK:STDOUT: fn @K() -> %empty_tuple.type; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.6() -> %.7 { +// CHECK:STDOUT: fn @.6() -> %.6 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc65_24: %.7 = struct_literal () -// CHECK:STDOUT: %struct: %.7 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc65_25: %.7 = converted %.loc65_24, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc65_24: %.6 = struct_literal () +// CHECK:STDOUT: %struct: %.6 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc65_25: %.6 = converted %.loc65_24, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc65_25 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon index 89f45e148021..a152fa03af9c 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon @@ -21,7 +21,7 @@ fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon b/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon index 66bca2768516..dcd87d11bff8 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon @@ -16,7 +16,7 @@ fn Foo() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon index 0514be2da9ad..65a4c16c18c8 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon @@ -124,7 +124,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -141,7 +141,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -167,7 +167,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -184,7 +184,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -210,7 +210,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -227,7 +227,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -253,7 +253,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -273,7 +273,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -296,7 +296,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,7 +316,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -342,7 +342,7 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -362,10 +362,10 @@ fn B() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -380,7 +380,7 @@ fn B() {} // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/function/definition/no_prelude/order.carbon b/toolchain/check/testdata/function/definition/no_prelude/order.carbon index 0665b3fb274d..dfd994a8ba86 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/order.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/order.carbon @@ -16,7 +16,7 @@ fn Baz() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon b/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon index 99852769c3f5..86a8640c72f0 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon @@ -14,7 +14,7 @@ fn Foo() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon index 43d4544d030e..c21f97516b3b 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon @@ -175,9 +175,9 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } @@ -250,9 +250,9 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -298,11 +298,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -319,7 +319,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { @@ -350,9 +350,9 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -398,7 +398,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] @@ -450,9 +450,9 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } @@ -514,11 +514,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -538,7 +538,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { @@ -569,11 +569,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -593,7 +593,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { @@ -626,12 +626,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -651,7 +651,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_8.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc15_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_8.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_8.1, runtime_param [symbolic = %a.patt.loc15_8.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -704,9 +704,9 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -759,7 +759,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -795,9 +795,9 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -844,11 +844,11 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %.3: type = const_type %C [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: %.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -866,7 +866,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %a: %.3 = bind_name a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt: %.3 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index 43e2368a94f9..f0973ecf0ecd 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -14,7 +14,7 @@ fn Foo(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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index 1f7bd2685f43..03a2a0e210f5 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -14,7 +14,7 @@ fn Foo(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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index a30ab1dd03b5..0d54e62ef495 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -14,7 +14,7 @@ fn Foo(a: i32, b: 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 8e9bd0bde3ba..b803796e8275 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -14,7 +14,7 @@ fn Foo(a: i32, b: 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: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 776f80ede163..b802d4649de7 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -197,21 +197,21 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ExplicitGenericParam.type: type = fn_type @ExplicitGenericParam [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ExplicitGenericParam: %ExplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] +// CHECK:STDOUT: %.2: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: %CallExplicitGenericParam.type: type = fn_type @CallExplicitGenericParam [template] // CHECK:STDOUT: %CallExplicitGenericParam: %CallExplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(i32) [template] +// CHECK:STDOUT: %.4: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(i32) [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.6: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [symbolic] +// CHECK:STDOUT: %.5: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [symbolic] // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.type: type = fn_type @CallExplicitGenericParamWithGenericArg [template] // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg: %CallExplicitGenericParamWithGenericArg.type = struct_value () [template] -// CHECK:STDOUT: %.8: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%.6) [symbolic] +// CHECK:STDOUT: %.7: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%.5) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -245,29 +245,29 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return: ref @ExplicitGenericParam.%.loc4_39.2 (%.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParam.decl: %CallExplicitGenericParam.type = fn_decl @CallExplicitGenericParam [template = constants.%CallExplicitGenericParam] { -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_37.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_37.2: type = converted %int.make_type_32.loc6, %.loc6_37.1 [template = i32] -// CHECK:STDOUT: %.loc6_37.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc6_37.3: type = ptr_type i32 [template = constants.%.3] +// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.decl: %CallExplicitGenericParamWithGenericArg.type = fn_decl @CallExplicitGenericParamWithGenericArg [template = constants.%CallExplicitGenericParamWithGenericArg] { // CHECK:STDOUT: %T.patt.loc10_43.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_43.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_43.1, runtime_param [symbolic = %T.patt.loc10_43.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %return.patt: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc10_43.1 [symbolic = %T.loc10_43.2 (constants.%T)] -// CHECK:STDOUT: %.loc10_62.1: type = struct_type {.a: %T} [symbolic = %.loc10_62.2 (constants.%.6)] -// CHECK:STDOUT: %.loc10_63.1: type = ptr_type %.6 [symbolic = %.loc10_63.2 (constants.%.7)] +// CHECK:STDOUT: %.loc10_62.1: type = struct_type {.a: %T} [symbolic = %.loc10_62.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_63.1: type = ptr_type %.5 [symbolic = %.loc10_63.2 (constants.%.6)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_43.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_43.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,13 +277,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_39.2: type = ptr_type @ExplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %.loc4_39.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_50.2 (constants.%.3)] +// CHECK:STDOUT: %.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_50.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @ExplicitGenericParam.%.loc4_39.2 (%.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc4_50.2 (constants.%.3)] +// CHECK:STDOUT: %.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc4_50.2 (constants.%.2)] // CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%.loc4_39.2 (%.1) = call %.loc4_50.1() // CHECK:STDOUT: %.loc4_73.1: @ExplicitGenericParam.%.loc4_39.2 (%.1) = value_of_initializer %ExplicitGenericParam.call // CHECK:STDOUT: %.loc4_73.2: @ExplicitGenericParam.%.loc4_39.2 (%.1) = converted %ExplicitGenericParam.call, %.loc4_73.1 @@ -293,37 +293,37 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallExplicitGenericParam() -> %.4 { +// CHECK:STDOUT: fn @CallExplicitGenericParam() -> %.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_32.loc7, %.loc7_30.1 [template = i32] -// CHECK:STDOUT: %.loc7_10: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(i32) [template = constants.%.5] -// CHECK:STDOUT: %ExplicitGenericParam.call: init %.4 = call %.loc7_10() -// CHECK:STDOUT: %.loc7_35.1: %.4 = value_of_initializer %ExplicitGenericParam.call -// CHECK:STDOUT: %.loc7_35.2: %.4 = converted %ExplicitGenericParam.call, %.loc7_35.1 +// CHECK:STDOUT: %.loc7_10: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(i32) [template = constants.%.4] +// CHECK:STDOUT: %ExplicitGenericParam.call: init %.3 = call %.loc7_10() +// CHECK:STDOUT: %.loc7_35.1: %.3 = value_of_initializer %ExplicitGenericParam.call +// CHECK:STDOUT: %.loc7_35.2: %.3 = converted %ExplicitGenericParam.call, %.loc7_35.1 // CHECK:STDOUT: return %.loc7_35.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @CallExplicitGenericParamWithGenericArg(%T.loc10_43.1: type) { // CHECK:STDOUT: %T.loc10_43.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_43.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_43.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_43.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc10_62.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_43.2 (%T)} [symbolic = %.loc10_62.2 (constants.%.6)] -// CHECK:STDOUT: %.loc10_63.2: type = ptr_type @CallExplicitGenericParamWithGenericArg.%.loc10_62.2 (%.6) [symbolic = %.loc10_63.2 (constants.%.7)] +// CHECK:STDOUT: %.loc10_62.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_43.2 (%T)} [symbolic = %.loc10_62.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_63.2: type = ptr_type @CallExplicitGenericParamWithGenericArg.%.loc10_62.2 (%.5) [symbolic = %.loc10_63.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%.loc10_62.2) [symbolic = %.loc11_10.2 (constants.%.8)] +// CHECK:STDOUT: %.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%.loc10_62.2) [symbolic = %.loc11_10.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) { +// CHECK:STDOUT: fn(%T.param_patt: type) -> @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref.loc11: type = name_ref T, %T.loc10_43.1 [symbolic = %T.loc10_43.2 (constants.%T)] -// CHECK:STDOUT: %.loc11_37: type = struct_type {.a: %T} [symbolic = %.loc10_62.2 (constants.%.6)] -// CHECK:STDOUT: %.loc11_10.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%.6) [symbolic = %.loc11_10.2 (constants.%.8)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = call %.loc11_10.1() -// CHECK:STDOUT: %.loc11_39.1: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = value_of_initializer %ExplicitGenericParam.call -// CHECK:STDOUT: %.loc11_39.2: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.7) = converted %ExplicitGenericParam.call, %.loc11_39.1 +// CHECK:STDOUT: %.loc11_37: type = struct_type {.a: %T} [symbolic = %.loc10_62.2 (constants.%.5)] +// CHECK:STDOUT: %.loc11_10.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%.5) [symbolic = %.loc11_10.2 (constants.%.7)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = call %.loc11_10.1() +// CHECK:STDOUT: %.loc11_39.1: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = value_of_initializer %ExplicitGenericParam.call +// CHECK:STDOUT: %.loc11_39.2: @CallExplicitGenericParamWithGenericArg.%.loc10_63.2 (%.6) = converted %ExplicitGenericParam.call, %.loc11_39.1 // CHECK:STDOUT: return %.loc11_39.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -334,7 +334,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_39.2 => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.3 +// CHECK:STDOUT: %.loc4_50.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(@ExplicitGenericParam.%T.loc4_25.2) { @@ -346,32 +346,32 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: specific @ExplicitGenericParam(i32) { // CHECK:STDOUT: %T.loc4_25.2 => i32 // CHECK:STDOUT: %T.patt.loc4_25.2 => i32 -// CHECK:STDOUT: %.loc4_39.2 => constants.%.4 +// CHECK:STDOUT: %.loc4_39.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.5 +// CHECK:STDOUT: %.loc4_50.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallExplicitGenericParamWithGenericArg(constants.%T) { // CHECK:STDOUT: %T.loc10_43.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_43.2 => constants.%T -// CHECK:STDOUT: %.loc10_62.2 => constants.%.6 -// CHECK:STDOUT: %.loc10_63.2 => constants.%.7 +// CHECK:STDOUT: %.loc10_62.2 => constants.%.5 +// CHECK:STDOUT: %.loc10_63.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitGenericParam(constants.%.6) { -// CHECK:STDOUT: %T.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %.loc4_39.2 => constants.%.7 +// CHECK:STDOUT: specific @ExplicitGenericParam(constants.%.5) { +// CHECK:STDOUT: %T.loc4_25.2 => constants.%.5 +// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%.5 +// CHECK:STDOUT: %.loc4_39.2 => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.8 +// CHECK:STDOUT: %.loc4_50.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamWithGenericArg.%.loc10_62.2) { -// CHECK:STDOUT: %T.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%.6 -// CHECK:STDOUT: %.loc4_39.2 => constants.%.7 +// CHECK:STDOUT: %T.loc4_25.2 => constants.%.5 +// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%.5 +// CHECK:STDOUT: %.loc4_39.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_explicit_non_constant.carbon @@ -381,9 +381,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ExplicitGenericParam.type: type = fn_type @ExplicitGenericParam [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ExplicitGenericParam: %ExplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] +// CHECK:STDOUT: %.2: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CallExplicitGenericParamConst.type: type = fn_type @CallExplicitGenericParamConst [template] // CHECK:STDOUT: %CallExplicitGenericParamConst: %CallExplicitGenericParamConst.type = struct_value () [template] @@ -441,13 +441,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_39.2: type = ptr_type @ExplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %.loc4_39.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_50.2 (constants.%.3)] +// CHECK:STDOUT: %.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_50.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @ExplicitGenericParam.%.loc4_39.2 (%.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc4_50.2 (constants.%.3)] +// CHECK:STDOUT: %.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc4_50.2 (constants.%.2)] // CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%.loc4_39.2 (%.1) = call %.loc4_50.1() // CHECK:STDOUT: %.loc4_73.1: @ExplicitGenericParam.%.loc4_39.2 (%.1) = value_of_initializer %ExplicitGenericParam.call // CHECK:STDOUT: %.loc4_73.2: @ExplicitGenericParam.%.loc4_39.2 (%.1) = converted %ExplicitGenericParam.call, %.loc4_73.1 @@ -460,14 +460,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.patt.loc6_34.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_34.2 (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_34.2) [symbolic = %.loc7_3.2 (constants.%.3)] +// CHECK:STDOUT: %.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_34.2) [symbolic = %.loc7_3.2 (constants.%.2)] // CHECK:STDOUT: %.loc7_23: type = ptr_type @CallExplicitGenericParamConst.%T.loc6_34.2 (%T) [symbolic = %.loc7_23 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_34.1 [symbolic = %T.loc6_34.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_3.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc7_3.2 (constants.%.3)] +// CHECK:STDOUT: %.loc7_3.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc7_3.2 (constants.%.2)] // CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamConst.%.loc7_23 (%.1) = call %.loc7_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -486,7 +486,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_39.2 => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_50.2 => constants.%.3 +// CHECK:STDOUT: %.loc4_50.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(@ExplicitGenericParam.%T.loc4_25.2) { @@ -516,14 +516,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.type: type = fn_type @ExplicitAndAlsoDeduced [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ExplicitAndAlsoDeduced: %ExplicitAndAlsoDeduced.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T) [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %A [template] +// CHECK:STDOUT: %.4: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T) [symbolic] +// CHECK:STDOUT: %.5: type = ptr_type %A [template] // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.type: type = fn_type @CallExplicitAndAlsoDeduced [template] // CHECK:STDOUT: %CallExplicitAndAlsoDeduced: %CallExplicitAndAlsoDeduced.type = struct_value () [template] -// CHECK:STDOUT: %.7: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%A) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%A) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -562,13 +562,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.decl: %CallExplicitAndAlsoDeduced.type = fn_decl @CallExplicitAndAlsoDeduced [template = constants.%CallExplicitAndAlsoDeduced] { -// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref.loc10: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc10_37: type = ptr_type %A [template = constants.%.6] -// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param +// CHECK:STDOUT: %.loc10_37: type = ptr_type %A [template = constants.%.5] +// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -585,14 +585,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc6_47.2: type = ptr_type @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) [symbolic = %.loc6_47.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_27.2) [symbolic = %.loc7_10.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_27.2) [symbolic = %.loc7_10.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T)) -> @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [template = constants.%ExplicitAndAlsoDeduced] // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %.loc7_10.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %.loc7_10.2 (constants.%.4)] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = call %.loc7_10.1(%x.ref) // CHECK:STDOUT: %.loc7_38.1: @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = value_of_initializer %ExplicitAndAlsoDeduced.call // CHECK:STDOUT: %.loc7_38.2: @ExplicitAndAlsoDeduced.%.loc6_47.2 (%.3) = converted %ExplicitAndAlsoDeduced.call, %.loc7_38.1 @@ -600,20 +600,20 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallExplicitAndAlsoDeduced() -> %.6 { +// CHECK:STDOUT: fn @CallExplicitAndAlsoDeduced() -> %.5 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [template = constants.%ExplicitAndAlsoDeduced] // CHECK:STDOUT: %A.ref.loc11: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc11_37.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_10: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%A) [template = constants.%.7] +// CHECK:STDOUT: %.loc11_10: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%A) [template = constants.%.6] // CHECK:STDOUT: %.loc11_37.2: ref %A = temporary_storage // CHECK:STDOUT: %.loc11_37.3: init %A = class_init (), %.loc11_37.2 [template = constants.%struct] // CHECK:STDOUT: %.loc11_37.4: ref %A = temporary %.loc11_37.2, %.loc11_37.3 // CHECK:STDOUT: %.loc11_37.5: ref %A = converted %.loc11_37.1, %.loc11_37.4 // CHECK:STDOUT: %.loc11_37.6: %A = bind_value %.loc11_37.5 -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %.6 = call %.loc11_10(%.loc11_37.6) -// CHECK:STDOUT: %.loc11_39.1: %.6 = value_of_initializer %ExplicitAndAlsoDeduced.call -// CHECK:STDOUT: %.loc11_39.2: %.6 = converted %ExplicitAndAlsoDeduced.call, %.loc11_39.1 +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %.5 = call %.loc11_10(%.loc11_37.6) +// CHECK:STDOUT: %.loc11_39.1: %.5 = value_of_initializer %ExplicitAndAlsoDeduced.call +// CHECK:STDOUT: %.loc11_39.2: %.5 = converted %ExplicitAndAlsoDeduced.call, %.loc11_39.1 // CHECK:STDOUT: return %.loc11_39.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -623,7 +623,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc6_47.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2 => constants.%.5 +// CHECK:STDOUT: %.loc7_10.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(@ExplicitAndAlsoDeduced.%T.loc6_27.2) { @@ -635,10 +635,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%A) { // CHECK:STDOUT: %T.loc6_27.2 => constants.%A // CHECK:STDOUT: %T.patt.loc6_27.2 => constants.%A -// CHECK:STDOUT: %.loc6_47.2 => constants.%.6 +// CHECK:STDOUT: %.loc6_47.2 => constants.%.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2 => constants.%.7 +// CHECK:STDOUT: %.loc7_10.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_implicit.carbon @@ -648,15 +648,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %ImplicitGenericParam.type: type = fn_type @ImplicitGenericParam [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ImplicitGenericParam: %ImplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%T) [symbolic] +// CHECK:STDOUT: %.2: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%T) [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: %CallImplicitGenericParam.type: type = fn_type @CallImplicitGenericParam [template] // CHECK:STDOUT: %CallImplicitGenericParam: %CallImplicitGenericParam.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(i32) [template] +// CHECK:STDOUT: %.4: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -696,8 +696,8 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %CallImplicitGenericParam.decl: %CallImplicitGenericParam.type = fn_decl @CallImplicitGenericParam [template = constants.%CallImplicitGenericParam] { // CHECK:STDOUT: %n.patt: i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: i32 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc6_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_32.1: type = value_of_initializer %int.make_type_32.loc6_32 [template = i32] @@ -705,11 +705,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int.make_type_32.loc6_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_43.1: type = value_of_initializer %int.make_type_32.loc6_40 [template = i32] // CHECK:STDOUT: %.loc6_43.2: type = converted %int.make_type_32.loc6_40, %.loc6_43.1 [template = i32] -// CHECK:STDOUT: %.loc6_43.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %.loc6_43.3: type = ptr_type i32 [template = constants.%.3] // CHECK:STDOUT: %n.param: i32 = value_param runtime_param0 // CHECK:STDOUT: %n: i32 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -719,13 +719,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_45.2: type = ptr_type @ImplicitGenericParam.%T.loc4_25.2 (%T) [symbolic = %.loc4_45.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_56.2: = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_56.2 (constants.%.3)] +// CHECK:STDOUT: %.loc4_56.2: = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_25.2) [symbolic = %.loc4_56.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @ImplicitGenericParam.%T.loc4_25.2 (%T)) -> @ImplicitGenericParam.%.loc4_45.2 (%.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [template = constants.%ImplicitGenericParam] // CHECK:STDOUT: %x.ref: @ImplicitGenericParam.%T.loc4_25.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc4_56.1: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%T) [symbolic = %.loc4_56.2 (constants.%.3)] +// CHECK:STDOUT: %.loc4_56.1: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%T) [symbolic = %.loc4_56.2 (constants.%.2)] // CHECK:STDOUT: %ImplicitGenericParam.call: init @ImplicitGenericParam.%.loc4_45.2 (%.1) = call %.loc4_56.1(%x.ref) // CHECK:STDOUT: %.loc4_79.1: @ImplicitGenericParam.%.loc4_45.2 (%.1) = value_of_initializer %ImplicitGenericParam.call // CHECK:STDOUT: %.loc4_79.2: @ImplicitGenericParam.%.loc4_45.2 (%.1) = converted %ImplicitGenericParam.call, %.loc4_79.1 @@ -735,14 +735,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallImplicitGenericParam(%n.param_patt: i32) -> %.4 { +// CHECK:STDOUT: fn @CallImplicitGenericParam(%n.param_patt: i32) -> %.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [template = constants.%ImplicitGenericParam] // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %.loc7_10: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(i32) [template = constants.%.5] -// CHECK:STDOUT: %ImplicitGenericParam.call: init %.4 = call %.loc7_10(%n.ref) -// CHECK:STDOUT: %.loc7_33.1: %.4 = value_of_initializer %ImplicitGenericParam.call -// CHECK:STDOUT: %.loc7_33.2: %.4 = converted %ImplicitGenericParam.call, %.loc7_33.1 +// CHECK:STDOUT: %.loc7_10: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(i32) [template = constants.%.4] +// CHECK:STDOUT: %ImplicitGenericParam.call: init %.3 = call %.loc7_10(%n.ref) +// CHECK:STDOUT: %.loc7_33.1: %.3 = value_of_initializer %ImplicitGenericParam.call +// CHECK:STDOUT: %.loc7_33.2: %.3 = converted %ImplicitGenericParam.call, %.loc7_33.1 // CHECK:STDOUT: return %.loc7_33.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -752,7 +752,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_45.2 => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_56.2 => constants.%.3 +// CHECK:STDOUT: %.loc4_56.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(@ImplicitGenericParam.%T.loc4_25.2) { @@ -764,10 +764,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: specific @ImplicitGenericParam(i32) { // CHECK:STDOUT: %T.loc4_25.2 => i32 // CHECK:STDOUT: %T.patt.loc4_25.2 => i32 -// CHECK:STDOUT: %.loc4_45.2 => constants.%.4 +// CHECK:STDOUT: %.loc4_45.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc4_56.2 => constants.%.5 +// CHECK:STDOUT: %.loc4_56.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_nested_tuple.carbon @@ -776,21 +776,21 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (%T, i32) [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, i32) [symbolic] // CHECK:STDOUT: %TupleParam.type: type = fn_type @TupleParam [template] // CHECK:STDOUT: %TupleParam: %TupleParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [symbolic] // CHECK:STDOUT: %CallTupleParam.type: type = fn_type @CallTupleParam [template] // CHECK:STDOUT: %CallTupleParam: %CallTupleParam.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) [template] -// CHECK:STDOUT: %.8: = specific_function %TupleParam, @TupleParam(i32) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.7 [template] -// CHECK:STDOUT: %tuple: %.7 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.4: = specific_function %TupleParam, @TupleParam(i32) [template] +// CHECK:STDOUT: %.5: type = ptr_type %tuple.type.3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.2, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -812,19 +812,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %TupleParam.decl: %TupleParam.type = fn_decl @TupleParam [template = constants.%TupleParam] { // CHECK:STDOUT: %T.patt.loc4_15.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_15.1, runtime_param [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @TupleParam.%.loc4_35.5 (%.3) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @TupleParam.%.loc4_35.5 (%.3) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @TupleParam.%tuple.type (%tuple.type.2) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @TupleParam.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_35.1: %.2 = tuple_literal (%T.ref, %int.make_type_32) +// CHECK:STDOUT: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %int.make_type_32) // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_35.3: type = converted %int.make_type_32, %.loc4_35.2 [template = i32] -// CHECK:STDOUT: %.loc4_35.4: type = converted %.loc4_35.1, constants.%.3 [symbolic = %.loc4_35.5 (constants.%.3)] +// CHECK:STDOUT: %.loc4_35.4: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @TupleParam.%.loc4_35.5 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %x: @TupleParam.%.loc4_35.5 (%.3) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %x: @TupleParam.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallTupleParam.decl: %CallTupleParam.type = fn_decl @CallTupleParam [template = constants.%CallTupleParam] {} {} // CHECK:STDOUT: } @@ -834,11 +834,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @TupleParam(%T.loc4_15.1: type) { // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_15.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_35.5: type = tuple_type (@TupleParam.%T.loc4_15.2 (%T), i32) [symbolic = %.loc4_35.5 (constants.%.3)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@TupleParam.%T.loc4_15.2 (%T), i32) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @TupleParam.%.loc4_35.5 (%.3)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @TupleParam.%tuple.type (%tuple.type.2)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -847,26 +847,26 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallTupleParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TupleParam.ref: %TupleParam.type = name_ref TupleParam, file.%TupleParam.decl [template = constants.%TupleParam] -// CHECK:STDOUT: %.loc7_15: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc7_18: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc7_19.1: %.7 = tuple_literal (%.loc7_15, %.loc7_18) -// CHECK:STDOUT: %.loc7_3: = specific_function %TupleParam.ref, @TupleParam(i32) [template = constants.%.8] -// CHECK:STDOUT: %tuple: %.7 = tuple_value (%.loc7_15, %.loc7_18) [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_19.2: %.7 = converted %.loc7_19.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %TupleParam.call: init %.1 = call %.loc7_3(%.loc7_19.2) +// CHECK:STDOUT: %.loc7_15: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc7_18: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7_19.1: %tuple.type.3 = tuple_literal (%.loc7_15, %.loc7_18) +// CHECK:STDOUT: %.loc7_3: = specific_function %TupleParam.ref, @TupleParam(i32) [template = constants.%.4] +// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.loc7_15, %.loc7_18) [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.2: %tuple.type.3 = converted %.loc7_19.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %TupleParam.call: init %empty_tuple.type = call %.loc7_3(%.loc7_19.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TupleParam(constants.%T) { // CHECK:STDOUT: %T.loc4_15.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T -// CHECK:STDOUT: %.loc4_35.5 => constants.%.3 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TupleParam(i32) { // CHECK:STDOUT: %T.loc4_15.2 => i32 // CHECK:STDOUT: %T.patt.loc4_15.2 => i32 -// CHECK:STDOUT: %.loc4_35.5 => constants.%.7 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -877,20 +877,20 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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 = struct_type {.a: %T, .b: i32} [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {.a: %T, .b: i32} [symbolic] // CHECK:STDOUT: %StructParam.type: type = fn_type @StructParam [template] // CHECK:STDOUT: %StructParam: %StructParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] // CHECK:STDOUT: %CallStructParam.type: type = fn_type @CallStructParam [template] // CHECK:STDOUT: %CallStructParam: %CallStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: i32 = int_value 2 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.7: = specific_function %StructParam, @StructParam(i32) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] -// CHECK:STDOUT: %struct: %.6 = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.6: = specific_function %StructParam, @StructParam(i32) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %struct: %.5 = struct_value (%.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -912,18 +912,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %StructParam.decl: %StructParam.type = fn_decl @StructParam [template = constants.%StructParam] { // CHECK:STDOUT: %T.patt.loc4_16.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_16.1, runtime_param [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @StructParam.%.loc4_44.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @StructParam.%.loc4_44.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @StructParam.%.loc4_44.2 (%.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @StructParam.%.loc4_44.2 (%.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_41.2: type = converted %int.make_type_32, %.loc4_41.1 [template = i32] -// CHECK:STDOUT: %.loc4_44.1: type = struct_type {.a: %T, .b: i32} [symbolic = %.loc4_44.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_44.1: type = struct_type {.a: %T, .b: i32} [symbolic = %.loc4_44.2 (constants.%.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_16.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @StructParam.%.loc4_44.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @StructParam.%.loc4_44.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @StructParam.%.loc4_44.2 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @StructParam.%.loc4_44.2 (%.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallStructParam.decl: %CallStructParam.type = fn_decl @CallStructParam [template = constants.%CallStructParam] {} {} // CHECK:STDOUT: } @@ -933,11 +933,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @StructParam(%T.loc4_16.1: type) { // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_16.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: i32} [symbolic = %.loc4_44.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: i32} [symbolic = %.loc4_44.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @StructParam.%.loc4_44.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @StructParam.%.loc4_44.2 (%.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -946,26 +946,26 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %StructParam.ref: %StructParam.type = name_ref StructParam, file.%StructParam.decl [template = constants.%StructParam] -// CHECK:STDOUT: %.loc7_21: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc7_29: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc7_30.1: %.6 = struct_literal (%.loc7_21, %.loc7_29) -// CHECK:STDOUT: %.loc7_3: = specific_function %StructParam.ref, @StructParam(i32) [template = constants.%.7] -// CHECK:STDOUT: %struct: %.6 = struct_value (%.loc7_21, %.loc7_29) [template = constants.%struct] -// CHECK:STDOUT: %.loc7_30.2: %.6 = converted %.loc7_30.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %StructParam.call: init %.1 = call %.loc7_3(%.loc7_30.2) +// CHECK:STDOUT: %.loc7_21: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc7_29: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc7_30.1: %.5 = struct_literal (%.loc7_21, %.loc7_29) +// CHECK:STDOUT: %.loc7_3: = specific_function %StructParam.ref, @StructParam(i32) [template = constants.%.6] +// CHECK:STDOUT: %struct: %.5 = struct_value (%.loc7_21, %.loc7_29) [template = constants.%struct] +// CHECK:STDOUT: %.loc7_30.2: %.5 = converted %.loc7_30.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %StructParam.call: init %empty_tuple.type = call %.loc7_3(%.loc7_30.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @StructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_16.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T -// CHECK:STDOUT: %.loc4_44.2 => constants.%.2 +// CHECK:STDOUT: %.loc4_44.2 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @StructParam(i32) { // CHECK:STDOUT: %T.loc4_16.2 => i32 // CHECK:STDOUT: %T.patt.loc4_16.2 => i32 -// CHECK:STDOUT: %.loc4_44.2 => constants.%.6 +// CHECK:STDOUT: %.loc4_44.2 => constants.%.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -976,17 +976,17 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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 = struct_type {.c: %T, .d: i32, .e: i32} [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {.c: %T, .d: i32, .e: i32} [symbolic] // CHECK:STDOUT: %BigStructParam.type: type = fn_type @BigStructParam [template] // CHECK:STDOUT: %BigStructParam: %BigStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] // CHECK:STDOUT: %CallBigStructParam.type: type = fn_type @CallBigStructParam [template] // CHECK:STDOUT: %CallBigStructParam: %CallBigStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 4 [template] -// CHECK:STDOUT: %.6: type = struct_type {.c: i32, .d: i32} [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: i32 = int_value 4 [template] +// CHECK:STDOUT: %.5: type = struct_type {.c: i32, .d: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1008,8 +1008,8 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %BigStructParam.decl: %BigStructParam.type = fn_decl @BigStructParam [template = constants.%BigStructParam] { // CHECK:STDOUT: %T.patt.loc4_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_19.1, runtime_param [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @BigStructParam.%.loc4_56.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @BigStructParam.%.loc4_56.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @BigStructParam.%.loc4_56.2 (%.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @BigStructParam.%.loc4_56.2 (%.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc4_44: init type = call constants.%Int32() [template = i32] @@ -1018,11 +1018,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int.make_type_32.loc4_53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_53.1: type = value_of_initializer %int.make_type_32.loc4_53 [template = i32] // CHECK:STDOUT: %.loc4_53.2: type = converted %int.make_type_32.loc4_53, %.loc4_53.1 [template = i32] -// CHECK:STDOUT: %.loc4_56.1: type = struct_type {.c: %T, .d: i32, .e: i32} [symbolic = %.loc4_56.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_56.1: type = struct_type {.c: %T, .d: i32, .e: i32} [symbolic = %.loc4_56.2 (constants.%.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_19.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @BigStructParam.%.loc4_56.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @BigStructParam.%.loc4_56.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @BigStructParam.%.loc4_56.2 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @BigStructParam.%.loc4_56.2 (%.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallBigStructParam.decl: %CallBigStructParam.type = fn_decl @CallBigStructParam [template = constants.%CallBigStructParam] {} {} // CHECK:STDOUT: } @@ -1032,11 +1032,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @BigStructParam(%T.loc4_19.1: type) { // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_19.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_56.2: type = struct_type {.c: @BigStructParam.%T.loc4_19.2 (%T), .d: i32, .e: i32} [symbolic = %.loc4_56.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_56.2: type = struct_type {.c: @BigStructParam.%T.loc4_19.2 (%T), .d: i32, .e: i32} [symbolic = %.loc4_56.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @BigStructParam.%.loc4_56.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @BigStructParam.%.loc4_56.2 (%.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1045,16 +1045,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallBigStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %BigStructParam.ref: %BigStructParam.type = name_ref BigStructParam, file.%BigStructParam.decl [template = constants.%BigStructParam] -// CHECK:STDOUT: %.loc14_24: i32 = int_value 3 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_32: i32 = int_value 4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_33: %.6 = struct_literal (%.loc14_24, %.loc14_32) +// CHECK:STDOUT: %.loc14_24: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_32: i32 = int_value 4 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_33: %.5 = struct_literal (%.loc14_24, %.loc14_32) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @BigStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_19.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_19.2 => constants.%T -// CHECK:STDOUT: %.loc4_56.2 => constants.%.2 +// CHECK:STDOUT: %.loc4_56.2 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_smaller_struct.carbon @@ -1063,18 +1063,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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 = struct_type {.f: %T, .g: i32} [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {.f: %T, .g: i32} [symbolic] // CHECK:STDOUT: %SmallStructParam.type: type = fn_type @SmallStructParam [template] // CHECK:STDOUT: %SmallStructParam: %SmallStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] // CHECK:STDOUT: %CallSmallStructParam.type: type = fn_type @CallSmallStructParam [template] // CHECK:STDOUT: %CallSmallStructParam: %CallSmallStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 5 [template] -// CHECK:STDOUT: %.5: i32 = int_value 6 [template] -// CHECK:STDOUT: %.6: i32 = int_value 7 [template] -// CHECK:STDOUT: %.7: type = struct_type {.f: i32, .g: i32, .h: i32} [template] +// CHECK:STDOUT: %.3: i32 = int_value 5 [template] +// CHECK:STDOUT: %.4: i32 = int_value 6 [template] +// CHECK:STDOUT: %.5: i32 = int_value 7 [template] +// CHECK:STDOUT: %.6: type = struct_type {.f: i32, .g: i32, .h: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1096,18 +1096,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %SmallStructParam.decl: %SmallStructParam.type = fn_decl @SmallStructParam [template = constants.%SmallStructParam] { // CHECK:STDOUT: %T.patt.loc4_21.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_21.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_21.1, runtime_param [symbolic = %T.patt.loc4_21.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @SmallStructParam.%.loc4_49.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @SmallStructParam.%.loc4_49.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @SmallStructParam.%.loc4_49.2 (%.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @SmallStructParam.%.loc4_49.2 (%.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_46.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_46.2: type = converted %int.make_type_32, %.loc4_46.1 [template = i32] -// CHECK:STDOUT: %.loc4_49.1: type = struct_type {.f: %T, .g: i32} [symbolic = %.loc4_49.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_49.1: type = struct_type {.f: %T, .g: i32} [symbolic = %.loc4_49.2 (constants.%.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_21.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @SmallStructParam.%.loc4_49.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @SmallStructParam.%.loc4_49.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @SmallStructParam.%.loc4_49.2 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @SmallStructParam.%.loc4_49.2 (%.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallSmallStructParam.decl: %CallSmallStructParam.type = fn_decl @CallSmallStructParam [template = constants.%CallSmallStructParam] {} {} // CHECK:STDOUT: } @@ -1117,11 +1117,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @SmallStructParam(%T.loc4_21.1: type) { // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_21.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_21.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_49.2: type = struct_type {.f: @SmallStructParam.%T.loc4_21.2 (%T), .g: i32} [symbolic = %.loc4_49.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_49.2: type = struct_type {.f: @SmallStructParam.%T.loc4_21.2 (%T), .g: i32} [symbolic = %.loc4_49.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @SmallStructParam.%.loc4_49.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @SmallStructParam.%.loc4_49.2 (%.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1130,17 +1130,17 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallSmallStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %SmallStructParam.ref: %SmallStructParam.type = name_ref SmallStructParam, file.%SmallStructParam.decl [template = constants.%SmallStructParam] -// CHECK:STDOUT: %.loc14_26: i32 = int_value 5 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_34: i32 = int_value 6 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_42: i32 = int_value 7 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_43: %.7 = struct_literal (%.loc14_26, %.loc14_34, %.loc14_42) +// CHECK:STDOUT: %.loc14_26: i32 = int_value 5 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_34: i32 = int_value 6 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_42: i32 = int_value 7 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_43: %.6 = struct_literal (%.loc14_26, %.loc14_34, %.loc14_42) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SmallStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_21.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_21.2 => constants.%T -// CHECK:STDOUT: %.loc4_49.2 => constants.%.2 +// CHECK:STDOUT: %.loc4_49.2 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_struct_wrong_name.carbon @@ -1149,17 +1149,17 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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 = struct_type {.i: %T, .different: i32} [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {.i: %T, .different: i32} [symbolic] // CHECK:STDOUT: %WrongNameStructParam.type: type = fn_type @WrongNameStructParam [template] // CHECK:STDOUT: %WrongNameStructParam: %WrongNameStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] // CHECK:STDOUT: %CallWrongNameStructParam.type: type = fn_type @CallWrongNameStructParam [template] // CHECK:STDOUT: %CallWrongNameStructParam: %CallWrongNameStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 8 [template] -// CHECK:STDOUT: %.5: i32 = int_value 9 [template] -// CHECK:STDOUT: %.6: type = struct_type {.i: i32, .j: i32} [template] +// CHECK:STDOUT: %.3: i32 = int_value 8 [template] +// CHECK:STDOUT: %.4: i32 = int_value 9 [template] +// CHECK:STDOUT: %.5: type = struct_type {.i: i32, .j: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1181,18 +1181,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %WrongNameStructParam.decl: %WrongNameStructParam.type = fn_decl @WrongNameStructParam [template = constants.%WrongNameStructParam] { // CHECK:STDOUT: %T.patt.loc4_25.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_25.1, runtime_param [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @WrongNameStructParam.%.loc4_61.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%.loc4_61.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @WrongNameStructParam.%.loc4_61.2 (%.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%.loc4_61.2 (%.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_58.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_58.2: type = converted %int.make_type_32, %.loc4_58.1 [template = i32] -// CHECK:STDOUT: %.loc4_61.1: type = struct_type {.i: %T, .different: i32} [symbolic = %.loc4_61.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_61.1: type = struct_type {.i: %T, .different: i32} [symbolic = %.loc4_61.2 (constants.%.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @WrongNameStructParam.%.loc4_61.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @WrongNameStructParam.%.loc4_61.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @WrongNameStructParam.%.loc4_61.2 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @WrongNameStructParam.%.loc4_61.2 (%.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongNameStructParam.decl: %CallWrongNameStructParam.type = fn_decl @CallWrongNameStructParam [template = constants.%CallWrongNameStructParam] {} {} // CHECK:STDOUT: } @@ -1202,11 +1202,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @WrongNameStructParam(%T.loc4_25.1: type) { // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_25.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_61.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_25.2 (%T), .different: i32} [symbolic = %.loc4_61.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_61.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_25.2 (%T), .different: i32} [symbolic = %.loc4_61.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongNameStructParam.%.loc4_61.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongNameStructParam.%.loc4_61.2 (%.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1215,16 +1215,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallWrongNameStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WrongNameStructParam.ref: %WrongNameStructParam.type = name_ref WrongNameStructParam, file.%WrongNameStructParam.decl [template = constants.%WrongNameStructParam] -// CHECK:STDOUT: %.loc14_30: i32 = int_value 8 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_38: i32 = int_value 9 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_39: %.6 = struct_literal (%.loc14_30, %.loc14_38) +// CHECK:STDOUT: %.loc14_30: i32 = int_value 8 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_38: i32 = int_value 9 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_39: %.5 = struct_literal (%.loc14_30, %.loc14_38) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WrongNameStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_25.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T -// CHECK:STDOUT: %.loc4_61.2 => constants.%.2 +// CHECK:STDOUT: %.loc4_61.2 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_deduce_struct_wrong_order.carbon @@ -1233,17 +1233,17 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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 = struct_type {.first: %T, .second: i32} [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {.first: %T, .second: i32} [symbolic] // CHECK:STDOUT: %WrongOrderStructParam.type: type = fn_type @WrongOrderStructParam [template] // CHECK:STDOUT: %WrongOrderStructParam: %WrongOrderStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] // CHECK:STDOUT: %CallWrongOrderStructParam.type: type = fn_type @CallWrongOrderStructParam [template] // CHECK:STDOUT: %CallWrongOrderStructParam: %CallWrongOrderStructParam.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 11 [template] -// CHECK:STDOUT: %.5: i32 = int_value 10 [template] -// CHECK:STDOUT: %.6: type = struct_type {.second: i32, .first: i32} [template] +// CHECK:STDOUT: %.3: i32 = int_value 11 [template] +// CHECK:STDOUT: %.4: i32 = int_value 10 [template] +// CHECK:STDOUT: %.5: type = struct_type {.second: i32, .first: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1265,18 +1265,18 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %WrongOrderStructParam.decl: %WrongOrderStructParam.type = fn_decl @WrongOrderStructParam [template = constants.%WrongOrderStructParam] { // CHECK:STDOUT: %T.patt.loc4_26.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_26.1, runtime_param [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%.loc4_63.2 (%.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%.loc4_63.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%.loc4_63.2 (%.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%.loc4_63.2 (%.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_60.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_60.2: type = converted %int.make_type_32, %.loc4_60.1 [template = i32] -// CHECK:STDOUT: %.loc4_63.1: type = struct_type {.first: %T, .second: i32} [symbolic = %.loc4_63.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_63.1: type = struct_type {.first: %T, .second: i32} [symbolic = %.loc4_63.2 (constants.%.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_26.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_26.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%.loc4_63.2 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @WrongOrderStructParam.%.loc4_63.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%.loc4_63.2 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %x: @WrongOrderStructParam.%.loc4_63.2 (%.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongOrderStructParam.decl: %CallWrongOrderStructParam.type = fn_decl @CallWrongOrderStructParam [template = constants.%CallWrongOrderStructParam] {} {} // CHECK:STDOUT: } @@ -1286,11 +1286,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: generic fn @WrongOrderStructParam(%T.loc4_26.1: type) { // CHECK:STDOUT: %T.loc4_26.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_26.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_26.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %.loc4_63.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_26.2 (%T), .second: i32} [symbolic = %.loc4_63.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_63.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_26.2 (%T), .second: i32} [symbolic = %.loc4_63.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongOrderStructParam.%.loc4_63.2 (%.2)) { +// CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongOrderStructParam.%.loc4_63.2 (%.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1299,16 +1299,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallWrongOrderStructParam() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %WrongOrderStructParam.ref: %WrongOrderStructParam.type = name_ref WrongOrderStructParam, file.%WrongOrderStructParam.decl [template = constants.%WrongOrderStructParam] -// CHECK:STDOUT: %.loc14_36: i32 = int_value 11 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_49: i32 = int_value 10 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_51: %.6 = struct_literal (%.loc14_36, %.loc14_49) +// CHECK:STDOUT: %.loc14_36: i32 = int_value 11 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_49: i32 = int_value 10 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_51: %.5 = struct_literal (%.loc14_36, %.loc14_49) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WrongOrderStructParam(constants.%T) { // CHECK:STDOUT: %T.loc4_26.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T -// CHECK:STDOUT: %.loc4_63.2 => constants.%.2 +// CHECK:STDOUT: %.loc4_63.2 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_incomplete.carbon @@ -1319,11 +1319,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %ImplicitNotDeducible.type: type = fn_type @ImplicitNotDeducible [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ImplicitNotDeducible: %ImplicitNotDeducible.type = struct_value () [template] // CHECK:STDOUT: %CallImplicitNotDeducible.type: type = fn_type @CallImplicitNotDeducible [template] // CHECK:STDOUT: %CallImplicitNotDeducible: %CallImplicitNotDeducible.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 42 [template] +// CHECK:STDOUT: %.1: i32 = int_value 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1376,7 +1376,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallImplicitNotDeducible() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitNotDeducible.ref: %ImplicitNotDeducible.type = name_ref ImplicitNotDeducible, file.%ImplicitNotDeducible.decl [template = constants.%ImplicitNotDeducible] -// CHECK:STDOUT: %.loc16: i32 = int_value 42 [template = constants.%.2] +// CHECK:STDOUT: %.loc16: i32 = int_value 42 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1393,13 +1393,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %ImplicitNotDeducible.type: type = fn_type @ImplicitNotDeducible [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ImplicitNotDeducible: %ImplicitNotDeducible.type = struct_value () [template] // CHECK:STDOUT: %CallImplicitNotDeducible.type: type = fn_type @CallImplicitNotDeducible [template] // CHECK:STDOUT: %CallImplicitNotDeducible: %CallImplicitNotDeducible.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 42 [template] -// CHECK:STDOUT: %.3: i32 = int_value 12 [template] -// CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] +// CHECK:STDOUT: %.1: i32 = int_value 42 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: type = struct_type {.x: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1451,9 +1451,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: fn @CallImplicitNotDeducible() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitNotDeducible.ref: %ImplicitNotDeducible.type = name_ref ImplicitNotDeducible, file.%ImplicitNotDeducible.decl [template = constants.%ImplicitNotDeducible] -// CHECK:STDOUT: %.loc13_24: i32 = int_value 42 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_34: i32 = int_value 12 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_36: %.4 = struct_literal (%.loc13_34) +// CHECK:STDOUT: %.loc13_24: i32 = int_value 42 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_34: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_36: %.3 = struct_literal (%.loc13_34) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index d9262fad9475..2839a71d70ec 100644 --- a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon @@ -17,7 +17,7 @@ fn F(N:! i32, a: [i32; N]*); // 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: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] diff --git a/toolchain/check/testdata/function/generic/no_prelude/call.carbon b/toolchain/check/testdata/function/generic/no_prelude/call.carbon index fd87280e1b78..f6ec768c0438 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/call.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/call.carbon @@ -58,24 +58,24 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Function.type: type = fn_type @Function [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Function: %Function.type = struct_value () [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [template] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %Function, @Function(%T) [symbolic] +// CHECK:STDOUT: %.1: = specific_function %Function, @Function(%T) [symbolic] // CHECK:STDOUT: %T.patt.3: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: %CallGenericPtr.type: type = fn_type @CallGenericPtr [template] // CHECK:STDOUT: %CallGenericPtr: %CallGenericPtr.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %Function, @Function(%.3) [symbolic] +// CHECK:STDOUT: %.3: = specific_function %Function, @Function(%.2) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %CallSpecific.type: type = fn_type @CallSpecific [template] // CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.8: = specific_function %Function, @Function(%C) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.7: = specific_function %Function, @Function(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,21 +123,21 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %CallGenericPtr.decl: %CallGenericPtr.type = fn_decl @CallGenericPtr [template = constants.%CallGenericPtr] { // CHECK:STDOUT: %T.patt.loc12_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt.3)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_19.1, runtime_param [symbolic = %T.patt.loc12_19.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %x.patt: @CallGenericPtr.%.loc12_33.2 (%.3) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.3) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @CallGenericPtr.%.loc12_33.2 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%.loc12_33.2 (%.3) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_33.1: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.3)] +// CHECK:STDOUT: %.loc12_33.1: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.3)] +// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @CallGenericPtr.%.loc12_33.2 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %x: @CallGenericPtr.%.loc12_33.2 (%.3) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%.loc12_33.2 (%.3) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @CallGenericPtr.%.loc12_33.2 (%.3) = return_slot %return.param +// CHECK:STDOUT: %x.param: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param runtime_param0 +// CHECK:STDOUT: %x: @CallGenericPtr.%.loc12_33.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%.loc12_33.2 (%.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %CallSpecific.decl: %CallSpecific.type = fn_decl @CallSpecific [template = constants.%CallSpecific] { @@ -156,7 +156,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc16: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -180,14 +180,14 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %T.patt.loc8_16.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_16.2 (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %.loc9_10.2 (constants.%.2)] +// CHECK:STDOUT: %.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %.loc9_10.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGeneric.%T.loc8_16.2 (%T)) -> @CallGeneric.%T.loc8_16.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %x.ref: @CallGeneric.%T.loc8_16.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %.loc9_10.2 (constants.%.2)] +// CHECK:STDOUT: %.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %.loc9_10.2 (constants.%.1)] // CHECK:STDOUT: %Function.call: init @CallGeneric.%T.loc8_16.2 (%T) = call %.loc9_10.1(%x.ref) // CHECK:STDOUT: %.loc9_24.1: @CallGeneric.%T.loc8_16.2 (%T) = value_of_initializer %Function.call // CHECK:STDOUT: %.loc9_24.2: @CallGeneric.%T.loc8_16.2 (%T) = converted %Function.call, %.loc9_24.1 @@ -198,21 +198,21 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc12_19.1: type) { // CHECK:STDOUT: %T.loc12_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc12_19.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %.loc12_33.2 (constants.%.3)] +// CHECK:STDOUT: %.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %.loc12_33.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_10.2: = specific_function constants.%Function, @Function(%.loc12_33.2) [symbolic = %.loc13_10.2 (constants.%.4)] +// CHECK:STDOUT: %.loc13_10.2: = specific_function constants.%Function, @Function(%.loc12_33.2) [symbolic = %.loc13_10.2 (constants.%.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.3)) -> @CallGenericPtr.%.loc12_33.2 (%.3) { +// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2)) -> @CallGenericPtr.%.loc12_33.2 (%.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc13_20: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.3)] -// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.loc12_33.2 (%.3) = name_ref x, %x -// CHECK:STDOUT: %.loc13_10.1: = specific_function %Function.ref, @Function(constants.%.3) [symbolic = %.loc13_10.2 (constants.%.4)] -// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.loc12_33.2 (%.3) = call %.loc13_10.1(%x.ref) -// CHECK:STDOUT: %.loc13_25.1: @CallGenericPtr.%.loc12_33.2 (%.3) = value_of_initializer %Function.call -// CHECK:STDOUT: %.loc13_25.2: @CallGenericPtr.%.loc12_33.2 (%.3) = converted %Function.call, %.loc13_25.1 +// CHECK:STDOUT: %.loc13_20: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.loc12_33.2 (%.2) = name_ref x, %x +// CHECK:STDOUT: %.loc13_10.1: = specific_function %Function.ref, @Function(constants.%.2) [symbolic = %.loc13_10.2 (constants.%.3)] +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.loc12_33.2 (%.2) = call %.loc13_10.1(%x.ref) +// CHECK:STDOUT: %.loc13_25.1: @CallGenericPtr.%.loc12_33.2 (%.2) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc13_25.2: @CallGenericPtr.%.loc12_33.2 (%.2) = converted %Function.call, %.loc13_25.1 // CHECK:STDOUT: return %.loc13_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -222,7 +222,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.ref: %C = name_ref x, %x -// CHECK:STDOUT: %.loc19: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%.7] // CHECK:STDOUT: %.loc18_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Function.call: init %C = call %.loc19(%x.ref) to %.loc18_23.2 // CHECK:STDOUT: return %Function.call to %return @@ -248,19 +248,19 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { // CHECK:STDOUT: %T.loc12_19.2 => constants.%T // CHECK:STDOUT: %T.patt.loc12_19.2 => constants.%T -// CHECK:STDOUT: %.loc12_33.2 => constants.%.3 +// CHECK:STDOUT: %.loc12_33.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(constants.%.3) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: specific @Function(constants.%.2) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(@CallGenericPtr.%.loc12_33.2) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%C) { @@ -276,24 +276,24 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Function.type: type = fn_type @Function [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Function: %Function.type = struct_value () [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [template] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %Function, @Function(%T) [symbolic] +// CHECK:STDOUT: %.1: = specific_function %Function, @Function(%T) [symbolic] // CHECK:STDOUT: %T.patt.3: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: %CallGenericPtr.type: type = fn_type @CallGenericPtr [template] // CHECK:STDOUT: %CallGenericPtr: %CallGenericPtr.type = struct_value () [template] -// CHECK:STDOUT: %.4: = specific_function %Function, @Function(%.3) [symbolic] +// CHECK:STDOUT: %.3: = specific_function %Function, @Function(%.2) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %CallSpecific.type: type = fn_type @CallSpecific [template] // CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.8: = specific_function %Function, @Function(%C) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.7: = specific_function %Function, @Function(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -341,21 +341,21 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %CallGenericPtr.decl: %CallGenericPtr.type = fn_decl @CallGenericPtr [template = constants.%CallGenericPtr] { // CHECK:STDOUT: %T.patt.loc12_19.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt.3)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_19.1, runtime_param [symbolic = %T.patt.loc12_19.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %x.patt: @CallGenericPtr.%.loc12_33.2 (%.3) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.3) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @CallGenericPtr.%.loc12_33.2 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%.loc12_33.2 (%.3) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_33.1: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.3)] +// CHECK:STDOUT: %.loc12_33.1: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.3)] +// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = %.loc12_33.2 (constants.%.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @CallGenericPtr.%.loc12_33.2 (%.3) = value_param runtime_param0 -// CHECK:STDOUT: %x: @CallGenericPtr.%.loc12_33.2 (%.3) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%.loc12_33.2 (%.3) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @CallGenericPtr.%.loc12_33.2 (%.3) = return_slot %return.param +// CHECK:STDOUT: %x.param: @CallGenericPtr.%.loc12_33.2 (%.2) = value_param runtime_param0 +// CHECK:STDOUT: %x: @CallGenericPtr.%.loc12_33.2 (%.2) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @CallGenericPtr.%.loc12_33.2 (%.2) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @CallGenericPtr.%.loc12_33.2 (%.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %CallSpecific.decl: %CallSpecific.type = fn_decl @CallSpecific [template = constants.%CallSpecific] { @@ -374,7 +374,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc16: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -398,13 +398,13 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %T.patt.loc8_16.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_16.2 (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %.loc9_10.2 (constants.%.2)] +// CHECK:STDOUT: %.loc9_10.2: = specific_function constants.%Function, @Function(%T.loc8_16.2) [symbolic = %.loc9_10.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGeneric.%T.loc8_16.2 (%T)) -> @CallGeneric.%T.loc8_16.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %x.ref: @CallGeneric.%T.loc8_16.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %.loc9_10.2 (constants.%.2)] +// CHECK:STDOUT: %.loc9_10.1: = specific_function %Function.ref, @Function(constants.%T) [symbolic = %.loc9_10.2 (constants.%.1)] // CHECK:STDOUT: %Function.call: init @CallGeneric.%T.loc8_16.2 (%T) = call %.loc9_10.1(%x.ref) // CHECK:STDOUT: %.loc9_21.1: @CallGeneric.%T.loc8_16.2 (%T) = value_of_initializer %Function.call // CHECK:STDOUT: %.loc9_21.2: @CallGeneric.%T.loc8_16.2 (%T) = converted %Function.call, %.loc9_21.1 @@ -415,19 +415,19 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc12_19.1: type) { // CHECK:STDOUT: %T.loc12_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc12_19.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_19.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %.loc12_33.2 (constants.%.3)] +// CHECK:STDOUT: %.loc12_33.2: type = ptr_type @CallGenericPtr.%T.loc12_19.2 (%T) [symbolic = %.loc12_33.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc13_10.2: = specific_function constants.%Function, @Function(%.loc12_33.2) [symbolic = %.loc13_10.2 (constants.%.4)] +// CHECK:STDOUT: %.loc13_10.2: = specific_function constants.%Function, @Function(%.loc12_33.2) [symbolic = %.loc13_10.2 (constants.%.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.3)) -> @CallGenericPtr.%.loc12_33.2 (%.3) { +// CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @CallGenericPtr.%.loc12_33.2 (%.2)) -> @CallGenericPtr.%.loc12_33.2 (%.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] -// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.loc12_33.2 (%.3) = name_ref x, %x -// CHECK:STDOUT: %.loc13_10.1: = specific_function %Function.ref, @Function(constants.%.3) [symbolic = %.loc13_10.2 (constants.%.4)] -// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.loc12_33.2 (%.3) = call %.loc13_10.1(%x.ref) -// CHECK:STDOUT: %.loc13_21.1: @CallGenericPtr.%.loc12_33.2 (%.3) = value_of_initializer %Function.call -// CHECK:STDOUT: %.loc13_21.2: @CallGenericPtr.%.loc12_33.2 (%.3) = converted %Function.call, %.loc13_21.1 +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.loc12_33.2 (%.2) = name_ref x, %x +// CHECK:STDOUT: %.loc13_10.1: = specific_function %Function.ref, @Function(constants.%.2) [symbolic = %.loc13_10.2 (constants.%.3)] +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.loc12_33.2 (%.2) = call %.loc13_10.1(%x.ref) +// CHECK:STDOUT: %.loc13_21.1: @CallGenericPtr.%.loc12_33.2 (%.2) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc13_21.2: @CallGenericPtr.%.loc12_33.2 (%.2) = converted %Function.call, %.loc13_21.1 // CHECK:STDOUT: return %.loc13_21.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -436,7 +436,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] // CHECK:STDOUT: %x.ref: %C = name_ref x, %x -// CHECK:STDOUT: %.loc19: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = specific_function %Function.ref, @Function(constants.%C) [template = constants.%.7] // CHECK:STDOUT: %.loc18_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Function.call: init %C = call %.loc19(%x.ref) to %.loc18_23.2 // CHECK:STDOUT: return %Function.call to %return @@ -462,19 +462,19 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { // CHECK:STDOUT: %T.loc12_19.2 => constants.%T // CHECK:STDOUT: %T.patt.loc12_19.2 => constants.%T -// CHECK:STDOUT: %.loc12_33.2 => constants.%.3 +// CHECK:STDOUT: %.loc12_33.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Function(constants.%.3) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: specific @Function(constants.%.2) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(@CallGenericPtr.%.loc12_33.2) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%.3 -// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.3 +// CHECK:STDOUT: %T.loc4_13.2 => constants.%.2 +// CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%C) { diff --git a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon index 48edf98f7417..c27c1b8b4560 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon @@ -24,9 +24,9 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,17 +53,17 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: %U.patt.loc11_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc11_16.2 (constants.%U.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc12_11.2 (constants.%.2)] +// CHECK:STDOUT: %.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc12_11.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %U.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: %.loc12_11.1: type = ptr_type %T [symbolic = %.loc12_11.2 (constants.%.2)] -// CHECK:STDOUT: %p.var: ref @F.%.loc12_11.2 (%.2) = var p -// CHECK:STDOUT: %p: ref @F.%.loc12_11.2 (%.2) = bind_name p, %p.var +// CHECK:STDOUT: %.loc12_11.1: type = ptr_type %T [symbolic = %.loc12_11.2 (constants.%.1)] +// CHECK:STDOUT: %p.var: ref @F.%.loc12_11.2 (%.1) = var p +// CHECK:STDOUT: %p: ref @F.%.loc12_11.2 (%.1) = bind_name p, %p.var // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc11_16.1 [symbolic = %U.loc11_16.2 (constants.%U)] -// CHECK:STDOUT: %p.ref: ref @F.%.loc12_11.2 (%.2) = name_ref p, %p -// CHECK:STDOUT: %.loc16_15: @F.%.loc12_11.2 (%.2) = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref @F.%.loc12_11.2 (%.1) = name_ref p, %p +// CHECK:STDOUT: %.loc16_15: @F.%.loc12_11.2 (%.1) = bind_value %p.ref // CHECK:STDOUT: %.loc16_14: ref @F.%T.loc11_6.2 (%T) = deref %.loc16_15 // CHECK:STDOUT: %.loc16_16: @F.%U.loc11_16.2 (%U) = converted %.loc16_14, [template = ] // CHECK:STDOUT: %n: @F.%U.loc11_16.2 (%U) = bind_name n, diff --git a/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon b/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon index 9833cc469b88..e123851610f5 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon @@ -16,7 +16,7 @@ fn F(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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon b/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon index 990aa333a949..cea5234241a7 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon @@ -40,12 +40,12 @@ fn H() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.1: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -86,14 +86,14 @@ fn H() { // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc8_3.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc8_3.2 (constants.%.2)] +// CHECK:STDOUT: %.loc8_3.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc8_3.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc8_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc8_3.2 (constants.%.2)] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc8_3.1() +// CHECK:STDOUT: %.loc8_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc8_3.2 (constants.%.1)] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc8_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -122,17 +122,17 @@ fn H() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.3: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: = specific_function %F, @F(%T) [symbolic] -// CHECK:STDOUT: %.6: = specific_function %G, @G(%C) [template] +// CHECK:STDOUT: %.4: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.5: = specific_function %G, @G(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -163,12 +163,12 @@ fn H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.1 [template = constants.%F] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.4] -// CHECK:STDOUT: %F.call: init %.3 = call %.loc10() +// CHECK:STDOUT: %.loc10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.3] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc10() // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.2 [template = constants.%G] // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc12: = specific_function %G.ref, @G(constants.%C) [template = constants.%.6] -// CHECK:STDOUT: %G.call: init %.3 = call %.loc12() +// CHECK:STDOUT: %.loc12: = specific_function %G.ref, @G(constants.%C) [template = constants.%.5] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc12() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -186,7 +186,7 @@ fn H() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1: = specific_function constants.%F, @F(%T) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = specific_function constants.%F, @F(%T) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type); // CHECK:STDOUT: } @@ -220,6 +220,6 @@ fn H() { // CHECK:STDOUT: %T.patt => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %.1 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon index f751f79760d6..b4b2416fb8c9 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon @@ -20,7 +20,7 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %.2: type = ptr_type %.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon index 456e678e85a6..dd9f753df91b 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon @@ -19,9 +19,9 @@ fn F(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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,17 +42,17 @@ fn F(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: %.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc12_11.2 (constants.%.2)] +// CHECK:STDOUT: %.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %.loc12_11.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc12_11.1: type = ptr_type %T [symbolic = %.loc12_11.2 (constants.%.2)] -// CHECK:STDOUT: %p.var: ref @F.%.loc12_11.2 (%.2) = var p -// CHECK:STDOUT: %p: ref @F.%.loc12_11.2 (%.2) = bind_name p, %p.var +// CHECK:STDOUT: %.loc12_11.1: type = ptr_type %T [symbolic = %.loc12_11.2 (constants.%.1)] +// CHECK:STDOUT: %p.var: ref @F.%.loc12_11.2 (%.1) = var p +// CHECK:STDOUT: %p: ref @F.%.loc12_11.2 (%.1) = bind_name p, %p.var // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %p.ref: ref @F.%.loc12_11.2 (%.2) = name_ref p, %p -// CHECK:STDOUT: %.loc13_15: @F.%.loc12_11.2 (%.2) = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref @F.%.loc12_11.2 (%.1) = name_ref p, %p +// CHECK:STDOUT: %.loc13_15: @F.%.loc12_11.2 (%.1) = bind_value %p.ref // CHECK:STDOUT: %.loc13_14.1: ref @F.%T.loc11_6.2 (%T) = deref %.loc13_15 // CHECK:STDOUT: %.loc13_14.2: @F.%T.loc11_6.2 (%T) = bind_value %.loc13_14.1 // CHECK:STDOUT: %n: @F.%T.loc11_6.2 (%T) = bind_name n, %.loc13_14.2 diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon index 161993e23238..865230680f9a 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon @@ -19,7 +19,7 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index 3be32c0fad6f..0d48f0710587 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -96,10 +96,10 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.3: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %.2: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -149,13 +149,13 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %.loc4_20.2: type = ptr_type @F.%T.loc4_6.2 (%T) [symbolic = %.loc4_20.2 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2: = specific_function constants.%F, @F(%T.loc4_6.2) [symbolic = %.loc7_10.2 (constants.%.3)] +// CHECK:STDOUT: %.loc7_10.2: = specific_function constants.%F, @F(%T.loc4_6.2) [symbolic = %.loc7_10.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> %.1 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [template = constants.%F] // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6 [symbolic = %T.loc4_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_10.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_10.2 (constants.%.3)] +// CHECK:STDOUT: %.loc7_10.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_10.2 (constants.%.2)] // CHECK:STDOUT: %F.call: init @F.%.loc4_20.2 (%.1) = call %.loc7_10.1() // CHECK:STDOUT: %.loc7_14.1: @F.%.loc4_20.2 (%.1) = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_14.2: @F.%.loc4_20.2 (%.1) = converted %F.call, %.loc7_14.1 @@ -169,7 +169,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %.loc4_20.2 => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc7_10.2 => constants.%.3 +// CHECK:STDOUT: %.loc7_10.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(@F.%T.loc4_6.2) { @@ -187,13 +187,13 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %U [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %U [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -226,22 +226,22 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %return.param: ref @F.%.loc4_30.2 (%.1) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @F.%.loc4_30.2 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %T.patt.loc13_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_6.1, runtime_param [symbolic = %T.patt.loc13_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: %U.patt.loc13_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt.2)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_16.1, runtime_param [symbolic = %U.patt.loc13_16.2 (constants.%U.patt.2)] -// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %U [symbolic = %.loc13_30.2 (constants.%.3)] +// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %U [symbolic = %.loc13_30.2 (constants.%.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.3) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -260,11 +260,11 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc13_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: %U.loc13_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc13_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt.2)] -// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%U.loc13_16.2 (%U) [symbolic = %.loc13_30.2 (constants.%.3)] +// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%U.loc13_16.2 (%U) [symbolic = %.loc13_30.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @.1.%.loc13_30.2 (%.3) { +// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) -> @.1.%.loc13_30.2 (%.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] @@ -285,7 +285,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U -// CHECK:STDOUT: %.loc13_30.2 => constants.%.3 +// CHECK:STDOUT: %.loc13_30.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_reorder.carbon @@ -297,15 +297,15 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %T.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %T.2 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -338,22 +338,22 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %return.param: ref @F.%.loc4_30.2 (%.1) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @F.%.loc4_30.2 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %U.patt.loc13_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_6.1, runtime_param [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.patt.loc13_16.1: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_16.1, runtime_param [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc13_16.1 [symbolic = %T.loc13_16.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %T.2 [symbolic = %.loc13_30.2 (constants.%.3)] +// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %T.2 [symbolic = %.loc13_30.2 (constants.%.2)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc13_6.2 (constants.%U.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_16.1: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc13_16.2 (constants.%T.2)] -// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.3) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -372,11 +372,11 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.loc13_16.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc13_16.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc13_16.2: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%T.loc13_16.2 (%T.2) [symbolic = %.loc13_30.2 (constants.%.3)] +// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%T.loc13_16.2 (%T.2) [symbolic = %.loc13_30.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%.loc13_30.2 (%.3) { +// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%.loc13_30.2 (%.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc13_16.1 [symbolic = %T.loc13_16.2 (constants.%T.2)] @@ -397,7 +397,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2 => constants.%U.2 // CHECK:STDOUT: %T.loc13_16.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc13_16.2 => constants.%T.2 -// CHECK:STDOUT: %.loc13_30.2 => constants.%.3 +// CHECK:STDOUT: %.loc13_30.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_rename.carbon @@ -409,15 +409,15 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type %U.2 [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %U.2 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -450,22 +450,22 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %return.param: ref @F.%.loc4_30.2 (%.1) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @F.%.loc4_30.2 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %U.patt.loc13_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_6.1, runtime_param [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.patt.loc13_16.1: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_16.1, runtime_param [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%.loc13_30.2 (%.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%.loc13_30.2 (%.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_6.1 [symbolic = %U.loc13_6.2 (constants.%U.2)] -// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %U.2 [symbolic = %.loc13_30.2 (constants.%.3)] +// CHECK:STDOUT: %.loc13_30.1: type = ptr_type %U.2 [symbolic = %.loc13_30.2 (constants.%.2)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc13_6.2 (constants.%U.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_16.1: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc13_16.2 (constants.%T.2)] -// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.3) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @.1.%.loc13_30.2 (%.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @.1.%.loc13_30.2 (%.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -484,11 +484,11 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_6.2 (constants.%U.patt.2)] // CHECK:STDOUT: %T.loc13_16.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc13_16.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc13_16.2: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_16.2 (constants.%T.patt.2)] -// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%U.loc13_6.2 (%U.2) [symbolic = %.loc13_30.2 (constants.%.3)] +// CHECK:STDOUT: %.loc13_30.2: type = ptr_type @.1.%U.loc13_6.2 (%U.2) [symbolic = %.loc13_30.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%.loc13_30.2 (%.3) { +// CHECK:STDOUT: fn(%U.param_patt: type, %T.param_patt: type) -> @.1.%.loc13_30.2 (%.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_16.1 [symbolic = %T.loc13_16.2 (constants.%T.2)] @@ -509,6 +509,6 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %U.patt.loc13_6.2 => constants.%U.2 // CHECK:STDOUT: %T.loc13_16.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc13_16.2 => constants.%T.2 -// CHECK:STDOUT: %.loc13_30.2 => constants.%.3 +// CHECK:STDOUT: %.loc13_30.2 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index 7641ee28ef92..7057dd58b726 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -39,7 +39,7 @@ fn CallNegative() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] @@ -47,10 +47,10 @@ fn CallNegative() { // CHECK:STDOUT: %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template] // CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: 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] @@ -60,14 +60,14 @@ fn CallNegative() { // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [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.7 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.7 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.8 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [template] +// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.8 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,7 +82,7 @@ fn CallNegative() { // CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+30, loaded [template = constants.%Int] // CHECK:STDOUT: %import_ref.3: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)] // 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 // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -119,8 +119,8 @@ fn CallNegative() { // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.2 (constants.%.5)] +// 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.7 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -137,18 +137,18 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc9_18: type = int_type signed, %N.loc4_19.2 [symbolic = %.loc9_18 (constants.%.2)] +// CHECK:STDOUT: %.loc9_18: type = int_type signed, %N.loc4_19.2 [symbolic = %.loc9_18 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Core.ref.loc9: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_19.1 [symbolic = %N.loc4_19.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref) [symbolic = %.loc9_18 (constants.%.2)] -// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc9_18 (constants.%.2)] -// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [symbolic = %.loc9_18 (constants.%.2)] -// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%.loc9_18 (%.2) = var v -// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%.loc9_18 (%.2) = bind_name v, %v.var +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref) [symbolic = %.loc9_18 (constants.%.1)] +// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc9_18 (constants.%.1)] +// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [symbolic = %.loc9_18 (constants.%.1)] +// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%.loc9_18 (%.1) = var v +// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%.loc9_18 (%.1) = bind_name v, %v.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -158,7 +158,7 @@ fn CallNegative() { // CHECK:STDOUT: fn @CallNegative() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ErrorIfNIsZero.ref: %ErrorIfNIsZero.type = name_ref ErrorIfNIsZero, file.%ErrorIfNIsZero.decl [template = constants.%ErrorIfNIsZero] -// CHECK:STDOUT: %.loc24_18: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc24_18: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc24_17: Core.IntLiteral = converted %.loc24_18, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -206,7 +206,7 @@ fn CallNegative() { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 9a964aba5e45..ad2b4dff551f 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -26,40 +26,40 @@ fn G() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Wrap.type: type = generic_class_type @Wrap [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Wrap.1: %Wrap.type = struct_value () [template] // CHECK:STDOUT: %Wrap.2: type = class_type @Wrap, @Wrap(%T) [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make, @Wrap(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: = specific_function %Make.1, @Make(%T) [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: = specific_function %Make.1, @Make(%T) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 100 [template] -// CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type %C, %.6 [template] -// CHECK:STDOUT: %.9: type = struct_type {.arr: %.6} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %.4: i32 = int_value 100 [template] +// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %C, %.5 [template] +// CHECK:STDOUT: %.8: type = struct_type {.arr: %.5} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Wrap.3: type = class_type @Wrap, @Wrap(i32) [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make, @Wrap(i32) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.12: = specific_function %Make.2, @Make(i32) [template] -// CHECK:STDOUT: %Wrap.4: type = class_type @Wrap, @Wrap(%.1) [template] -// CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Wrap(%.1) [template] +// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.11: = specific_function %Make.2, @Make(i32) [template] +// CHECK:STDOUT: %Wrap.4: type = class_type @Wrap, @Wrap(%empty_tuple.type) [template] +// CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Wrap(%empty_tuple.type) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.13: = specific_function %Make.3, @Make(%.1) [template] -// CHECK:STDOUT: %.14: type = struct_type {.arr: %.7} [template] -// CHECK:STDOUT: %.15: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.12: = specific_function %Make.3, @Make(%empty_tuple.type) [template] +// CHECK:STDOUT: %.13: type = struct_type {.arr: %.6} [template] +// CHECK:STDOUT: %.14: type = ptr_type %.8 [template] // CHECK:STDOUT: %Wrap.5: type = class_type @Wrap, @Wrap(%C) [template] // CHECK:STDOUT: %Make.type.4: type = fn_type @Make, @Wrap(%C) [template] // CHECK:STDOUT: %Make.4: %Make.type.4 = struct_value () [template] -// CHECK:STDOUT: %.16: = specific_function %Make.4, @Make(%C) [template] +// CHECK:STDOUT: %.15: = specific_function %Make.4, @Make(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -107,7 +107,7 @@ fn G() { // CHECK:STDOUT: %return.param: ref @Make.%T (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Wrap.2 @@ -117,12 +117,12 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_26: i32 = int_value 100 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_26: i32 = int_value 100 [template = constants.%.4] // CHECK:STDOUT: %.loc15_21.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_21.2: type = converted %int.make_type_32, %.loc15_21.1 [template = i32] -// CHECK:STDOUT: %.loc15_29: type = array_type %.loc15_26, i32 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_18: %.8 = field_decl arr, element0 [template] -// CHECK:STDOUT: %.loc15_32: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc15_29: type = array_type %.loc15_26, i32 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_18: %.7 = field_decl arr, element0 [template] +// CHECK:STDOUT: %.loc15_32: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -135,13 +135,13 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Wrap(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Make.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.loc12_27.3: = specific_function %Make, @Make(%T) [symbolic = %.loc12_27.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12_27.3: = specific_function %Make, @Make(%T) [symbolic = %.loc12_27.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> @Make.%T (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_27.1: @Make.%Make.type (%Make.type.1) = specific_constant @Wrap.%Make.decl, @Wrap(constants.%T) [symbolic = %Make (constants.%Make.1)] // CHECK:STDOUT: %Make.ref: @Make.%Make.type (%Make.type.1) = name_ref Make, %.loc12_27.1 [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.loc12_27.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc12_27.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12_27.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc12_27.3 (constants.%.3)] // CHECK:STDOUT: %Make.call: init @Make.%T (%T) = call %.loc12_27.2() // CHECK:STDOUT: %.loc12_33.1: @Make.%T (%T) = value_of_initializer %Make.call // CHECK:STDOUT: %.loc12_33.2: @Make.%T (%T) = converted %Make.call, %.loc12_33.1 @@ -165,21 +165,21 @@ fn G() { // CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(i32) [template = constants.%Wrap.3] // CHECK:STDOUT: %.loc18_25.1: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(i32) [template = constants.%Make.2] // CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18_25.1 [template = constants.%Make.2] -// CHECK:STDOUT: %.loc18_25.2: = specific_function %Make.ref.loc18, @Make(i32) [template = constants.%.12] +// CHECK:STDOUT: %.loc18_25.2: = specific_function %Make.ref.loc18, @Make(i32) [template = constants.%.11] // CHECK:STDOUT: %Make.call.loc18: init i32 = call %.loc18_25.2() // CHECK:STDOUT: assign %a.var, %Make.call.loc18 -// CHECK:STDOUT: %.loc19_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_11.2: type = converted %.loc19_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %.loc19_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_11.2: type = converted %.loc19_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %Wrap.ref.loc19: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] -// CHECK:STDOUT: %.loc19_21: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_19: type = converted %.loc19_21, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %Wrap.loc19: type = class_type @Wrap, @Wrap(constants.%.1) [template = constants.%Wrap.4] -// CHECK:STDOUT: %.loc19_23.1: %Make.type.3 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%.1) [template = constants.%Make.3] +// CHECK:STDOUT: %.loc19_21: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_19: type = converted %.loc19_21, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %Wrap.loc19: type = class_type @Wrap, @Wrap(constants.%empty_tuple.type) [template = constants.%Wrap.4] +// CHECK:STDOUT: %.loc19_23.1: %Make.type.3 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%empty_tuple.type) [template = constants.%Make.3] // CHECK:STDOUT: %Make.ref.loc19: %Make.type.3 = name_ref Make, %.loc19_23.1 [template = constants.%Make.3] -// CHECK:STDOUT: %.loc19_23.2: = specific_function %Make.ref.loc19, @Make(constants.%.1) [template = constants.%.13] -// CHECK:STDOUT: %Make.call.loc19: init %.1 = call %.loc19_23.2() +// CHECK:STDOUT: %.loc19_23.2: = specific_function %Make.ref.loc19, @Make(constants.%empty_tuple.type) [template = constants.%.12] +// CHECK:STDOUT: %Make.call.loc19: init %empty_tuple.type = call %.loc19_23.2() // CHECK:STDOUT: assign %b.var, %Make.call.loc19 // CHECK:STDOUT: %C.ref.loc20_10: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c @@ -189,7 +189,7 @@ fn G() { // CHECK:STDOUT: %Wrap.loc20: type = class_type @Wrap, @Wrap(constants.%C) [template = constants.%Wrap.5] // CHECK:STDOUT: %.loc20_21.1: %Make.type.4 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%C) [template = constants.%Make.4] // CHECK:STDOUT: %Make.ref.loc20: %Make.type.4 = name_ref Make, %.loc20_21.1 [template = constants.%Make.4] -// CHECK:STDOUT: %.loc20_21.2: = specific_function %Make.ref.loc20, @Make(constants.%C) [template = constants.%.16] +// CHECK:STDOUT: %.loc20_21.2: = specific_function %Make.ref.loc20, @Make(constants.%C) [template = constants.%.15] // CHECK:STDOUT: %.loc20_7: ref %C = splice_block %c.var {} // CHECK:STDOUT: %Make.call.loc20: init %C = call %.loc20_21.2() to %.loc20_7 // CHECK:STDOUT: assign %c.var, %Make.call.loc20 @@ -211,7 +211,7 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.1 // CHECK:STDOUT: %Make => constants.%Make.1 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.4 +// CHECK:STDOUT: %.loc12_27.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(@Wrap.%T.loc11_12.2) { @@ -243,27 +243,27 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 +// CHECK:STDOUT: %.loc12_27.3 => constants.%.11 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Wrap(constants.%empty_tuple.type) { +// CHECK:STDOUT: %T.loc11_12.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %T.patt.loc11_12.2 => constants.%empty_tuple.type +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Make.type => constants.%Make.type.3 +// CHECK:STDOUT: %Make => constants.%Make.3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Make(constants.%empty_tuple.type) { +// CHECK:STDOUT: %T => constants.%empty_tuple.type +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Make.type => constants.%Make.type.3 +// CHECK:STDOUT: %Make => constants.%Make.3 // CHECK:STDOUT: %.loc12_27.3 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Wrap(constants.%.1) { -// CHECK:STDOUT: %T.loc11_12.2 => constants.%.1 -// CHECK:STDOUT: %T.patt.loc11_12.2 => constants.%.1 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Make.type => constants.%Make.type.3 -// CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(constants.%.1) { -// CHECK:STDOUT: %T => constants.%.1 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Make.type => constants.%Make.type.3 -// CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.13 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%C) { // CHECK:STDOUT: %T.loc11_12.2 => constants.%C // CHECK:STDOUT: %T.patt.loc11_12.2 => constants.%C @@ -279,6 +279,6 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type => constants.%Make.type.4 // CHECK:STDOUT: %Make => constants.%Make.4 -// CHECK:STDOUT: %.loc12_27.3 => constants.%.16 +// CHECK:STDOUT: %.loc12_27.3 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index e401f033dba0..5224456f4823 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -56,14 +56,14 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template] // CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: = specific_function %Defined, @Defined(i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: = specific_function %Defined, @Defined(i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -129,8 +129,8 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: fn @CallDefined() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl [template = constants.%Defined] -// CHECK:STDOUT: %.loc9_18: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_10: = specific_function %Defined.ref, @Defined(i32) [template = constants.%.3] +// CHECK:STDOUT: %.loc9_18: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_10: = specific_function %Defined.ref, @Defined(i32) [template = constants.%.2] // CHECK:STDOUT: %Defined.call: init i32 = call %.loc9_10(%.loc9_18) // CHECK:STDOUT: %.loc9_20.1: i32 = value_of_initializer %Defined.call // CHECK:STDOUT: %.loc9_20.2: i32 = converted %Defined.call, %.loc9_20.1 @@ -155,14 +155,14 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template] // CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: = specific_function %Defined, @Defined(i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: = specific_function %Defined, @Defined(i32) [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -246,8 +246,8 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: fn @CallDefined() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl.loc4 [template = constants.%Defined] -// CHECK:STDOUT: %.loc7_18: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_10: = specific_function %Defined.ref, @Defined(i32) [template = constants.%.3] +// CHECK:STDOUT: %.loc7_18: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_10: = specific_function %Defined.ref, @Defined(i32) [template = constants.%.2] // CHECK:STDOUT: %Defined.call: init i32 = call %.loc7_10(%.loc7_18) // CHECK:STDOUT: %.loc7_20.1: i32 = value_of_initializer %Defined.call // CHECK:STDOUT: %.loc7_20.2: i32 = converted %Defined.call, %.loc7_20.1 @@ -272,14 +272,14 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Undefined.type: type = fn_type @Undefined [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Undefined: %Undefined.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %CallUndefined.type: type = fn_type @CallUndefined [template] // CHECK:STDOUT: %CallUndefined: %CallUndefined.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: = specific_function %Undefined, @Undefined(i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: = specific_function %Undefined, @Undefined(i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -339,8 +339,8 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: fn @CallUndefined() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Undefined.ref: %Undefined.type = name_ref Undefined, file.%Undefined.decl [template = constants.%Undefined] -// CHECK:STDOUT: %.loc13_20: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_10: = specific_function %Undefined.ref, @Undefined(i32) [template = constants.%.3] +// CHECK:STDOUT: %.loc13_20: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_10: = specific_function %Undefined.ref, @Undefined(i32) [template = constants.%.2] // CHECK:STDOUT: %Undefined.call: init i32 = call %.loc13_10(%.loc13_20) // CHECK:STDOUT: %.loc13_22.1: i32 = value_of_initializer %Undefined.call // CHECK:STDOUT: %.loc13_22.2: i32 = converted %Undefined.call, %.loc13_22.1 diff --git a/toolchain/check/testdata/global/class_obj.carbon b/toolchain/check/testdata/global/class_obj.carbon index 55de5abc68e8..1a9b5d647184 100644 --- a/toolchain/check/testdata/global/class_obj.carbon +++ b/toolchain/check/testdata/global/class_obj.carbon @@ -17,8 +17,8 @@ var a: A = {}; // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/global/class_with_fun.carbon b/toolchain/check/testdata/global/class_with_fun.carbon index be15485a2989..4400df53099c 100644 --- a/toolchain/check/testdata/global/class_with_fun.carbon +++ b/toolchain/check/testdata/global/class_with_fun.carbon @@ -22,9 +22,9 @@ var a: A = {}; // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %ret_a.type: type = fn_type @ret_a [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ret_a: %ret_a.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/global/decl.carbon b/toolchain/check/testdata/global/decl.carbon index 4c637da3b327..11a291ea3163 100644 --- a/toolchain/check/testdata/global/decl.carbon +++ b/toolchain/check/testdata/global/decl.carbon @@ -13,7 +13,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: diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index 60719ca73523..0f476eb4f7f4 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -13,9 +13,9 @@ var a: i32 = 0; // 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 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -44,7 +44,7 @@ var a: i32 = 0; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc10: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%a.var, %.loc10 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index ecfdfad06336..ce8b08c1b64c 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -18,11 +18,11 @@ var a: i32 = test_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: %test_a.type: type = fn_type @test_a [template] // CHECK:STDOUT: %test_a: %test_a.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,7 +62,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: // CHECK:STDOUT: fn @test_a() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/else.carbon b/toolchain/check/testdata/if/else.carbon index a7a68fcc20b9..3a1c45316d0d 100644 --- a/toolchain/check/testdata/if/else.carbon +++ b/toolchain/check/testdata/if/else.carbon @@ -25,7 +25,7 @@ fn If(b: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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] @@ -94,17 +94,17 @@ fn If(b: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.done: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init %.1 = call %H.ref() +// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index ee9ae951b7dc..66758cc26212 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -43,16 +43,16 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %If1.type: type = fn_type @If1 [template] // CHECK:STDOUT: %If1: %If1.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] // CHECK:STDOUT: %If2: %If2.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] // CHECK:STDOUT: %If3: %If3.type = struct_value () [template] // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: return %.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -157,7 +157,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc25: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc25: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: return %.loc25 // CHECK:STDOUT: // CHECK:STDOUT: !if.done: @@ -169,7 +169,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc35: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc35: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: return %.loc35 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index a7574cef94ed..7046a769eda3 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -23,13 +23,13 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %VarScope.type: type = fn_type @VarScope [template] // CHECK:STDOUT: %VarScope: %VarScope.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,7 +83,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32.loc13, %.loc13_12.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n // CHECK:STDOUT: %n: ref i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc13_18: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_18: i32 = int_value 2 [template = constants.%.1] // CHECK:STDOUT: assign %n.var, %.loc13_18 // CHECK:STDOUT: %n.ref.loc14: ref i32 = name_ref n, %n // CHECK:STDOUT: %.loc14: i32 = bind_value %n.ref.loc14 diff --git a/toolchain/check/testdata/if/no_else.carbon b/toolchain/check/testdata/if/no_else.carbon index f040d423209e..d61a55eeeba5 100644 --- a/toolchain/check/testdata/if/no_else.carbon +++ b/toolchain/check/testdata/if/no_else.carbon @@ -22,7 +22,7 @@ fn If(b: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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] @@ -82,12 +82,12 @@ fn If(b: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index e16ff18aae43..25d685e85f30 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -21,14 +21,14 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %If.type: type = fn_type @If [template] // CHECK:STDOUT: %If: %If.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,11 +77,11 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: return %.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc15: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: return %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 0e16165f184f..d774017c83bc 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -17,18 +17,18 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.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 0 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32) [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [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 0 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %array: %.2 = tuple_value (%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,32 +88,32 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: fn @F(%b.param_patt: bool, %n.param_patt: i32, %m.param_patt: i32) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_16: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32.loc12, %.loc12_11.1 [template = i32] -// CHECK:STDOUT: %.loc12_17: type = array_type %.loc12_16, i32 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_22: i32 = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_24.1: %.6 = tuple_literal (%.loc12_22) -// CHECK:STDOUT: %.loc12_24.2: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_17: type = array_type %.loc12_16, i32 [template = constants.%.2] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_22: i32 = int_value 0 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_24.1: %tuple.type = tuple_literal (%.loc12_22) +// CHECK:STDOUT: %.loc12_24.2: i32 = int_value 0 [template = constants.%.4] // CHECK:STDOUT: %.loc12_24.3: ref i32 = array_index %x.var, %.loc12_24.2 -// CHECK:STDOUT: %.loc12_24.4: init i32 = initialize_from %.loc12_22 to %.loc12_24.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_24.5: init %.3 = array_init (%.loc12_24.4) to %x.var [template = constants.%array] -// CHECK:STDOUT: %.loc12_25: init %.3 = converted %.loc12_24.1, %.loc12_24.5 [template = constants.%array] +// CHECK:STDOUT: %.loc12_24.4: init i32 = initialize_from %.loc12_22 to %.loc12_24.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_24.5: init %.2 = array_init (%.loc12_24.4) to %x.var [template = constants.%array] +// CHECK:STDOUT: %.loc12_25: init %.2 = converted %.loc12_24.1, %.loc12_24.5 [template = constants.%array] // CHECK:STDOUT: assign %x.var, %.loc12_25 // CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %x.ref.loc13_20: ref %.3 = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13_20: ref %.2 = name_ref x, %x // CHECK:STDOUT: %m.ref: i32 = name_ref m, %m // CHECK:STDOUT: %.loc13_23.1: ref i32 = array_index %x.ref.loc13_20, %m.ref // CHECK:STDOUT: %.loc13_23.2: i32 = bind_value %.loc13_23.1 // CHECK:STDOUT: br !if.expr.result(%.loc13_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %x.ref.loc13_30: ref %.3 = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13_30: ref %.2 = name_ref x, %x // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %.loc13_33.1: ref i32 = array_index %x.ref.loc13_30, %n.ref // CHECK:STDOUT: %.loc13_33.2: i32 = bind_value %.loc13_33.1 diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 369fb2f124b7..5a8416ffe8cc 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -35,23 +35,23 @@ fn PartiallyConstant(t: type) -> 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: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: bool = bool_literal true [template] +// CHECK:STDOUT: %.3: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.5: bool = bool_literal false [template] +// CHECK:STDOUT: %.4: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type i32 [template] +// CHECK:STDOUT: %.5: type = ptr_type i32 [template] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [template] // CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [template] // CHECK:STDOUT: } @@ -146,19 +146,19 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: return %.loc11_24 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_24: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_24: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: return %.loc12_24 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_13: bool = bool_literal true [template = constants.%.4] +// CHECK:STDOUT: %.loc15_13: bool = bool_literal true [template = constants.%.3] // CHECK:STDOUT: if %.loc15_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -182,7 +182,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc19_13: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc19_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -206,7 +206,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_13: bool = bool_literal true [template = constants.%.4] +// CHECK:STDOUT: %.loc23_13: bool = bool_literal true [template = constants.%.3] // CHECK:STDOUT: if %.loc23_13 br !if.expr.then.loc23 else br !if.expr.else.loc23 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc23: @@ -219,16 +219,16 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc23_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_32.loc23_32 [template = i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_32.loc23_32, %.loc23_35.1 [template = i32] -// CHECK:STDOUT: %.loc23_35.3: type = ptr_type i32 [template = constants.%.6] +// CHECK:STDOUT: %.loc23_35.3: type = ptr_type i32 [template = constants.%.5] // CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_35.3) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc23: // CHECK:STDOUT: %.loc23_10: type = block_arg !if.expr.result.loc23 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc23_39: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc23_39: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: assign %v.var, %.loc23_39 -// CHECK:STDOUT: %.loc24_13: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc24_13: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc24_13 br !if.expr.then.loc24 else br !if.expr.else.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc24: @@ -241,18 +241,18 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc24_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_36.1: type = value_of_initializer %int.make_type_32.loc24_33 [template = i32] // CHECK:STDOUT: %.loc24_36.2: type = converted %int.make_type_32.loc24_33, %.loc24_36.1 [template = i32] -// CHECK:STDOUT: %.loc24_36.3: type = ptr_type i32 [template = constants.%.6] +// CHECK:STDOUT: %.loc24_36.3: type = ptr_type i32 [template = constants.%.5] // CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_36.3) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc24: -// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%.6] -// CHECK:STDOUT: %w.var: ref %.6 = var w -// CHECK:STDOUT: %w: ref %.6 = bind_name w, %w.var +// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%.5] +// CHECK:STDOUT: %w.var: ref %.5 = var w +// CHECK:STDOUT: %w: ref %.5 = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref i32 = name_ref v, %v -// CHECK:STDOUT: %.loc24_40: %.6 = addr_of %v.ref +// CHECK:STDOUT: %.loc24_40: %.5 = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %.loc24_40 -// CHECK:STDOUT: %w.ref: ref %.6 = name_ref w, %w -// CHECK:STDOUT: %.loc25_11: %.6 = bind_value %w.ref +// CHECK:STDOUT: %w.ref: ref %.5 = name_ref w, %w +// CHECK:STDOUT: %.loc25_11: %.5 = bind_value %w.ref // CHECK:STDOUT: %.loc25_10.1: ref i32 = deref %.loc25_11 // CHECK:STDOUT: %.loc25_10.2: i32 = bind_value %.loc25_10.1 // CHECK:STDOUT: return %.loc25_10.2 @@ -260,7 +260,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartiallyConstant(%t.param_patt: type) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc29_13: bool = bool_literal true [template = constants.%.4] +// CHECK:STDOUT: %.loc29_13: bool = bool_literal true [template = constants.%.3] // CHECK:STDOUT: if %.loc29_13 br !if.expr.then.loc29 else br !if.expr.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc29: @@ -277,9 +277,9 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc29_10: type = block_arg !if.expr.result.loc29 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc29_36: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc29_36: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: assign %v.var, %.loc29_36 -// CHECK:STDOUT: %.loc30_13: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc30_13: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc30_13 br !if.expr.then.loc30 else br !if.expr.else.loc30 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc30: @@ -290,18 +290,18 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_34.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] // CHECK:STDOUT: %.loc30_34.2: type = converted %int.make_type_32.loc30, %.loc30_34.1 [template = i32] -// CHECK:STDOUT: %.loc30_34.3: type = ptr_type i32 [template = constants.%.6] +// CHECK:STDOUT: %.loc30_34.3: type = ptr_type i32 [template = constants.%.5] // CHECK:STDOUT: br !if.expr.result.loc30(%.loc30_34.3) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc30: -// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%.6] -// CHECK:STDOUT: %w.var: ref %.6 = var w -// CHECK:STDOUT: %w: ref %.6 = bind_name w, %w.var +// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%.5] +// CHECK:STDOUT: %w.var: ref %.5 = var w +// CHECK:STDOUT: %w: ref %.5 = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref i32 = name_ref v, %v -// CHECK:STDOUT: %.loc30_38: %.6 = addr_of %v.ref +// CHECK:STDOUT: %.loc30_38: %.5 = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %.loc30_38 -// CHECK:STDOUT: %w.ref: ref %.6 = name_ref w, %w -// CHECK:STDOUT: %.loc31_11: %.6 = bind_value %w.ref +// CHECK:STDOUT: %w.ref: ref %.5 = name_ref w, %w +// CHECK:STDOUT: %.loc31_11: %.5 = bind_value %w.ref // CHECK:STDOUT: %.loc31_10.1: ref i32 = deref %.loc31_11 // CHECK:STDOUT: %.loc31_10.2: i32 = bind_value %.loc31_10.1 // CHECK:STDOUT: return %.loc31_10.2 diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 6ce42e5ee509..f7fa6a1c5d79 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -19,14 +19,14 @@ fn F(b: bool) -> 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: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -95,13 +95,13 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: return %.loc11_24 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_24: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_24: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: return %.loc12_24 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 08b5e98ff1c8..34afc6358b71 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -41,18 +41,18 @@ class C { // 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: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 0 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.4: 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: %.6: type = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.7: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.6: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,7 +80,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc37: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc37: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc37 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -94,7 +94,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc23: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc23 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index b2ce7c866f47..85ba1f38832b 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -43,13 +43,13 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %ConditionIsNonConstant.type: type = fn_type @ConditionIsNonConstant [template] // CHECK:STDOUT: %ConditionIsNonConstant: %ConditionIsNonConstant.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 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,7 +104,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %.loc12_10: type = block_arg !if.expr.result // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var -// CHECK:STDOUT: %.loc12_35: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_35: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -115,13 +115,13 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ChosenBranchIsNonConstant.type: type = fn_type @ChosenBranchIsNonConstant [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ChosenBranchIsNonConstant: %ChosenBranchIsNonConstant.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: bool = bool_literal false [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -150,7 +150,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @ChosenBranchIsNonConstant(%t.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_13: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc9_13: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc9_13 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -167,9 +167,9 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %.loc9_10: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var -// CHECK:STDOUT: %.loc9_36: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc9_36: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %.loc13_13: bool = bool_literal false [template = constants.%.4] +// CHECK:STDOUT: %.loc13_13: bool = bool_literal false [template = constants.%.3] // CHECK:STDOUT: if %.loc13_13 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: @@ -186,7 +186,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %.loc13_10: type = block_arg !if.expr.result.loc13 // CHECK:STDOUT: %w.var: ref = var w // CHECK:STDOUT: %w: ref = bind_name w, %w.var -// CHECK:STDOUT: %.loc13_37: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_37: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: assign %w.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index cac3706da1cd..b9aa41c3aa0c 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -16,16 +16,16 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.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: i32 = int_value 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: i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,11 +92,11 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.expr.then.loc12_20 else br !if.expr.else.loc12_20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12_20: -// CHECK:STDOUT: %.loc12_30: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_30: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_30) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_20: -// CHECK:STDOUT: %.loc12_37: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_37: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_37) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12_20: @@ -108,11 +108,11 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: if %c.ref br !if.expr.then.loc12_44 else br !if.expr.else.loc12_44 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12_44: -// CHECK:STDOUT: %.loc12_54: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_54: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_54) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_44: -// CHECK:STDOUT: %.loc12_61: i32 = int_value 4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_61: i32 = int_value 4 [template = constants.%.4] // CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_61) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12_44: diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index e0291cde51e0..2aaf5aa13c74 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -19,19 +19,19 @@ fn F(cond: bool) { // 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 = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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: %struct: %.2 = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,8 +53,8 @@ fn F(cond: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %s.patt: %.2 = binding_pattern s -// CHECK:STDOUT: %s.param_patt: %.2 = value_param_pattern %s.patt, runtime_param0 +// CHECK:STDOUT: %s.patt: %.1 = binding_pattern s +// CHECK:STDOUT: %s.param_patt: %.1 = value_param_pattern %s.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] @@ -62,9 +62,9 @@ fn F(cond: bool) { // CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_32.loc11_23, %.loc11_23.1 [template = i32] -// CHECK:STDOUT: %.loc11_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %s.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %s: %.2 = bind_name s, %s.param +// CHECK:STDOUT: %.loc11_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %s.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %s: %.1 = bind_name s, %s.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %cond.patt: bool = binding_pattern cond @@ -80,7 +80,7 @@ fn F(cond: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%s.param_patt: %.2); +// CHECK:STDOUT: fn @G(%s.param_patt: %.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: @@ -92,46 +92,46 @@ fn F(cond: bool) { // CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_32.loc14_24 [template = i32] // CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_32.loc14_24, %.loc14_24.1 [template = i32] -// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref %.2 = var a -// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_37: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_45: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_46.1: %.2 = struct_literal (%.loc14_37, %.loc14_45) +// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc14_37: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_45: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_46.1: %.1 = struct_literal (%.loc14_37, %.loc14_45) // CHECK:STDOUT: %.loc14_46.2: ref i32 = struct_access %a.var, element0 -// CHECK:STDOUT: %.loc14_46.3: init i32 = initialize_from %.loc14_37 to %.loc14_46.2 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_46.3: init i32 = initialize_from %.loc14_37 to %.loc14_46.2 [template = constants.%.3] // CHECK:STDOUT: %.loc14_46.4: ref i32 = struct_access %a.var, element1 -// CHECK:STDOUT: %.loc14_46.5: init i32 = initialize_from %.loc14_45 to %.loc14_46.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_46.6: init %.2 = struct_init (%.loc14_46.3, %.loc14_46.5) to %a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_47: init %.2 = converted %.loc14_46.1, %.loc14_46.6 [template = constants.%struct] +// CHECK:STDOUT: %.loc14_46.5: init i32 = initialize_from %.loc14_45 to %.loc14_46.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_46.6: init %.1 = struct_init (%.loc14_46.3, %.loc14_46.5) to %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_47: init %.1 = converted %.loc14_46.1, %.loc14_46.6 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc14_47 // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %cond.ref: bool = name_ref cond, %cond // CHECK:STDOUT: if %cond.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %a.ref.loc15_18: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc15_18: ref %.1 = name_ref a, %a // CHECK:STDOUT: %.loc15_18.1: ref i32 = struct_access %a.ref.loc15_18, element0 // CHECK:STDOUT: %.loc15_18.2: i32 = bind_value %.loc15_18.1 // CHECK:STDOUT: %.loc15_18.3: ref i32 = struct_access %a.ref.loc15_18, element1 // CHECK:STDOUT: %.loc15_18.4: i32 = bind_value %.loc15_18.3 -// CHECK:STDOUT: %struct.loc15_18: %.2 = struct_value (%.loc15_18.2, %.loc15_18.4) -// CHECK:STDOUT: %.loc15_18.5: %.2 = converted %a.ref.loc15_18, %struct.loc15_18 +// CHECK:STDOUT: %struct.loc15_18: %.1 = struct_value (%.loc15_18.2, %.loc15_18.4) +// CHECK:STDOUT: %.loc15_18.5: %.1 = converted %a.ref.loc15_18, %struct.loc15_18 // CHECK:STDOUT: br !if.expr.result(%.loc15_18.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %a.ref.loc15_25: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc15_25: ref %.1 = name_ref a, %a // CHECK:STDOUT: %.loc15_25.1: ref i32 = struct_access %a.ref.loc15_25, element0 // CHECK:STDOUT: %.loc15_25.2: i32 = bind_value %.loc15_25.1 // CHECK:STDOUT: %.loc15_25.3: ref i32 = struct_access %a.ref.loc15_25, element1 // CHECK:STDOUT: %.loc15_25.4: i32 = bind_value %.loc15_25.3 -// CHECK:STDOUT: %struct.loc15_25: %.2 = struct_value (%.loc15_25.2, %.loc15_25.4) -// CHECK:STDOUT: %.loc15_20: %.2 = converted %a.ref.loc15_25, %struct.loc15_25 +// CHECK:STDOUT: %struct.loc15_25: %.1 = struct_value (%.loc15_25.2, %.loc15_25.4) +// CHECK:STDOUT: %.loc15_20: %.1 = converted %a.ref.loc15_25, %struct.loc15_25 // CHECK:STDOUT: br !if.expr.result(%.loc15_20) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc15_5: %.2 = block_arg !if.expr.result -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref(%.loc15_5) +// CHECK:STDOUT: %.loc15_5: %.1 = block_arg !if.expr.result +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc15_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 5624783b7904..a41fcd4369d2 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -40,26 +40,26 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Simple.%G.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Simple.%G.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2, %G.2) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2, %G.2) [template] // CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] // CHECK:STDOUT: %NonInstanceCall: %NonInstanceCall.type = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type i32 [template] +// CHECK:STDOUT: %.6: type = ptr_type i32 [template] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [template] // CHECK:STDOUT: %NonInstanceCallIndirect: %NonInstanceCallIndirect.type = struct_value () [template] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [template] @@ -113,33 +113,33 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n: i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_32, %.loc29_34.1 [template = i32] -// CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.7] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param +// CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.6] +// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_32, %.loc33_31.1 [template = i32] -// CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.7] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param +// CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.6] +// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %self.patt: @G.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @G.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 @@ -150,7 +150,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.param: @G.1.%Self (%Self) = value_param runtime_param0 // CHECK:STDOUT: %self: @G.1.%Self (%Self) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element1, %G.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -171,7 +171,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.param: i32 = value_param runtime_param0 // CHECK:STDOUT: %self: i32 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -200,9 +200,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Simple.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc22() +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Simple.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc22() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -210,34 +210,34 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] -// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.6, element1 [template = constants.%G.2] +// CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc13 [template = constants.%.4] +// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.5, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc26_4.2: = bound_method %n.ref, %.loc26_4.1 -// CHECK:STDOUT: %G.call: init %.1 = call %.loc26_4.2(%n.ref) +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc26_4.2(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p.param_patt: %.7) { +// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p.param_patt: %.6) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Simple.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Simple.%.loc12 [template = constants.%.2] // CHECK:STDOUT: %.loc30_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc30_4.2() +// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc30_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @InstanceCallIndirect(%p.param_patt: %.7) { +// CHECK:STDOUT: fn @InstanceCallIndirect(%p.param_patt: %.6) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] +// CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc13 [template = constants.%.4] // CHECK:STDOUT: %.loc34_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.6, element1 [template = constants.%G.2] +// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.5, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc34_4.3: = bound_method %.loc34_4.1, %.loc34_4.2 // CHECK:STDOUT: %.loc34_4.4: i32 = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call: init %.1 = call %.loc34_4.3(%.loc34_4.4) +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc34_4.3(%.loc34_4.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index 1c6562e09a6b..d490a5aa7772 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -18,7 +18,7 @@ impl i32 as I; // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 5b8cfbebe2bd..5a4723a63c9e 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -20,9 +20,9 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] // CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // 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: = interface_witness () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,7 +58,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc14_6.2 as %Empty.ref { -// CHECK:STDOUT: %.loc14_19: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc14_19: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14_19 diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index fd0884be6949..703cc3f3a446 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -29,19 +29,19 @@ fn G(c: C) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,7 +74,7 @@ fn G(c: C) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -84,7 +84,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -96,7 +96,7 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -116,13 +116,13 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: %.2 = name_ref F, @HasF.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init %.1 = call %.loc22() +// CHECK:STDOUT: %F.ref.loc22: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %.loc22() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: %.2 = name_ref F, @HasF.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init %.1 = call %.loc23() +// CHECK:STDOUT: %F.ref.loc23: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 947c4913da10..949cb5c1aee7 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -29,10 +29,10 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%G.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] @@ -88,7 +88,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %self.param: @G.1.%Self (%Self) = value_param runtime_param0 // CHECK:STDOUT: %self: @G.1.%Self (%Self) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %G.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %G.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -126,7 +126,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.2 = name_ref G, @Simple.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %G.ref: %.1 = name_ref G, @Simple.%.loc12 [template = constants.%.2] // CHECK:STDOUT: %.loc23_4.1: %G.type.1 = interface_witness_access , element0 [template = ] // CHECK:STDOUT: %.loc23_4.2: = bound_method %n.ref, %.loc23_4.1 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index fc25cf45859c..3b1e59fbb6e2 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -27,21 +27,21 @@ class C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.1: type = generic_interface_type @GenericInterface [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %GenericInterface: %GenericInterface.type.1 = struct_value () [template] // CHECK:STDOUT: %GenericInterface.type.2: type = interface_type @GenericInterface, @GenericInterface(%T) [symbolic] // CHECK:STDOUT: %Self: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @GenericInterface(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %GenericInterface.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @GenericInterface.%F.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %GenericInterface.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @GenericInterface.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,8 +77,8 @@ class C { // CHECK:STDOUT: %Self.2: %GenericInterface.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @GenericInterface(%T.loc11_28.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @GenericInterface.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc12_13.2: type = assoc_entity_type @GenericInterface.%GenericInterface.type (%GenericInterface.type.2), @GenericInterface.%F.type (%F.type.1) [symbolic = %.loc12_13.2 (constants.%.2)] -// CHECK:STDOUT: %.loc12_13.3: @GenericInterface.%.loc12_13.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc12_13.3 (constants.%.3)] +// CHECK:STDOUT: %.loc12_13.2: type = assoc_entity_type @GenericInterface.%GenericInterface.type (%GenericInterface.type.2), @GenericInterface.%F.type (%F.type.1) [symbolic = %.loc12_13.2 (constants.%.1)] +// CHECK:STDOUT: %.loc12_13.3: @GenericInterface.%.loc12_13.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_13.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -90,7 +90,7 @@ class C { // CHECK:STDOUT: %x.param: @F.1.%T (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.1.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_13.1: @GenericInterface.%.loc12_13.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc12_13.3 (constants.%.3)] +// CHECK:STDOUT: %.loc12_13.1: @GenericInterface.%.loc12_13.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_13.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -107,7 +107,7 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc19_23.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc19_56.2: = interface_witness (%F) [symbolic = %.loc19_56.2 (constants.%.4)] +// CHECK:STDOUT: %.loc19_56.2: = interface_witness (%F) [symbolic = %.loc19_56.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc19_52.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -118,7 +118,7 @@ class C { // CHECK:STDOUT: %x.param: @F.2.%T (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.2.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_56.1: = interface_witness (%F.decl) [symbolic = %.loc19_56.2 (constants.%.4)] +// CHECK:STDOUT: %.loc19_56.1: = interface_witness (%F.decl) [symbolic = %.loc19_56.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -138,7 +138,7 @@ class C { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc19_23.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_23.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -171,8 +171,8 @@ class C { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 -// CHECK:STDOUT: %.loc12_13.2 => constants.%.2 -// CHECK:STDOUT: %.loc12_13.3 => constants.%.3 +// CHECK:STDOUT: %.loc12_13.2 => constants.%.1 +// CHECK:STDOUT: %.loc12_13.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) { @@ -197,7 +197,7 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc19_56.2 => constants.%.4 +// CHECK:STDOUT: %.loc19_56.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 7d24c1022025..4ff3d9ee08cb 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -21,9 +21,9 @@ extend impl i32 as I {} // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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: = interface_witness () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,7 +59,7 @@ extend impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc16_13.2 as %I.ref { -// CHECK:STDOUT: %.loc16_22: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc16_22: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc16_22 diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index f6388cbd13a1..4828f75025f0 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -46,11 +46,11 @@ class E { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // 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: = interface_witness () [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %E: type = class_type @E [template] // CHECK:STDOUT: } @@ -88,7 +88,7 @@ class E { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %.loc18_15.2 as %I.ref { -// CHECK:STDOUT: %.loc18_24: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc18_24: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_24 @@ -97,7 +97,7 @@ class E { // CHECK:STDOUT: impl @impl.2: %D.ref as %I.ref; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %Self.ref as %I.ref { -// CHECK:STDOUT: %.loc39: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc39: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc39 @@ -110,7 +110,7 @@ class E { // CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_32, %.loc18_15.1 [template = i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -122,7 +122,7 @@ class E { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc30: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc30: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -134,7 +134,7 @@ class E { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc40: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc40: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index e0a3fe0c4b52..d6ec4e485f0a 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -20,10 +20,10 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // 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 = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index e4a0fc77a1ee..019dcea98990 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -25,13 +25,13 @@ impl as Simple { // CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,7 +57,7 @@ impl as Simple { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -67,7 +67,7 @@ impl as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon index 53e46431e4d6..15832929bdbe 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -23,7 +23,7 @@ impl bool as I {} // CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 45cdacd38d4d..c387c97b31ed 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -219,13 +219,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %NoF: type = class_type @NoF [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [template] // CHECK:STDOUT: %F.2: type = class_type @F.16 [template] // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [template] @@ -246,8 +246,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.6: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %J.type, %F.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @J.%F.decl [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %J.type, %F.type.5 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @J.%F.decl [template] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.7: %F.type.6 = struct_value () [template] @@ -271,34 +271,34 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.13: %F.type.12 = struct_value () [template] // CHECK:STDOUT: %SelfNested.type: type = interface_type @SelfNested [template] // CHECK:STDOUT: %Self.3: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %Self.3 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %Self.3 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = struct_type {.x: %Self.3, .y: i32} [symbolic] -// CHECK:STDOUT: %.10: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.11: type = tuple_type (%.8, %.9) [symbolic] -// CHECK:STDOUT: %.12: i32 = int_value 4 [template] -// CHECK:STDOUT: %.13: type = array_type %.12, %Self.3 [symbolic] +// CHECK:STDOUT: %.8: type = struct_type {.x: %Self.3, .y: i32} [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.7, %.8) [symbolic] +// CHECK:STDOUT: %.9: i32 = int_value 4 [template] +// CHECK:STDOUT: %.10: type = array_type %.9, %Self.3 [symbolic] // CHECK:STDOUT: %F.type.13: type = fn_type @F.13 [template] // CHECK:STDOUT: %F.14: %F.type.13 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [template] -// CHECK:STDOUT: %.16: type = ptr_type %SelfNestedBadParam [template] -// CHECK:STDOUT: %.17: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.18: type = tuple_type (%.16, %.17) [template] -// CHECK:STDOUT: %.19: type = array_type %.12, %SelfNestedBadParam [template] +// CHECK:STDOUT: %.13: type = ptr_type %SelfNestedBadParam [template] +// CHECK:STDOUT: %.14: type = struct_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.13, %.14) [template] +// CHECK:STDOUT: %.15: type = array_type %.9, %SelfNestedBadParam [template] // CHECK:STDOUT: %F.type.14: type = fn_type @F.14 [template] // CHECK:STDOUT: %F.15: %F.type.14 = struct_value () [template] -// CHECK:STDOUT: %.20: type = struct_type {.x: %SelfNestedBadParam, .y: i32} [template] -// CHECK:STDOUT: %.21: type = tuple_type (%.16, %.20) [template] +// CHECK:STDOUT: %.16: type = struct_type {.x: %SelfNestedBadParam, .y: i32} [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.13, %.16) [template] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.22: type = ptr_type %SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.23: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template] -// CHECK:STDOUT: %.24: type = tuple_type (%.22, %.23) [template] +// CHECK:STDOUT: %.17: type = ptr_type %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.18: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.17, %.18) [template] // CHECK:STDOUT: %F.type.15: type = fn_type @F.15 [template] // CHECK:STDOUT: %F.16: %F.type.15 = struct_value () [template] -// CHECK:STDOUT: %.25: type = array_type %.12, %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.19: type = array_type %.9, %SelfNestedBadReturnType [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -360,7 +360,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -394,7 +394,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc93: %.6 = assoc_entity element0, %F.decl [template = constants.%.7] +// CHECK:STDOUT: %.loc93: %.5 = assoc_entity element0, %F.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -405,35 +405,35 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: interface @SelfNested { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %F.decl: %F.type.13 = fn_decl @F.13 [template = constants.%F.14] { -// CHECK:STDOUT: %x.patt: @F.13.%.loc188_38.1 (%.11) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @F.13.%.loc188_38.1 (%.11) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.13.%.loc188_52.1 (%.13) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.13.%.loc188_52.1 (%.13) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @F.13.%tuple.type (%tuple.type.2) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @F.13.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.13.%.loc188_52.1 (%.10) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.13.%.loc188_52.1 (%.10) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_16.2: type = facet_type_access %Self.ref.loc188_12 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_16.3: type = converted %Self.ref.loc188_12, %.loc188_16.2 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.4: type = ptr_type %Self.3 [symbolic = %.loc188_16.1 (constants.%.8)] +// CHECK:STDOUT: %.loc188_16.4: type = ptr_type %Self.3 [symbolic = %.loc188_16.1 (constants.%.7)] // CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_24.1: type = facet_type_access %Self.ref.loc188_24 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc188_34.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc188_34.2: type = converted %int.make_type_32, %.loc188_34.1 [template = i32] -// CHECK:STDOUT: %.loc188_37.2: type = struct_type {.x: %Self.3, .y: i32} [symbolic = %.loc188_37.1 (constants.%.9)] -// CHECK:STDOUT: %.loc188_38.2: %.10 = tuple_literal (%.loc188_16.4, %.loc188_37.2) -// CHECK:STDOUT: %.loc188_38.3: type = converted %.loc188_38.2, constants.%.11 [symbolic = %.loc188_38.1 (constants.%.11)] +// CHECK:STDOUT: %.loc188_37.2: type = struct_type {.x: %Self.3, .y: i32} [symbolic = %.loc188_37.1 (constants.%.8)] +// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%.loc188_16.4, %.loc188_37.2) +// CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %Self.ref.loc188_45: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_51: i32 = int_value 4 [template = constants.%.12] +// CHECK:STDOUT: %.loc188_51: i32 = int_value 4 [template = constants.%.9] // CHECK:STDOUT: %.loc188_45.1: type = facet_type_access %Self.ref.loc188_45 [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_45.2: type = converted %Self.ref.loc188_45, %.loc188_45.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_52.2: type = array_type %.loc188_51, %Self.3 [symbolic = %.loc188_52.1 (constants.%.13)] -// CHECK:STDOUT: %x.param: @F.13.%.loc188_38.1 (%.11) = value_param runtime_param0 -// CHECK:STDOUT: %x: @F.13.%.loc188_38.1 (%.11) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.13.%.loc188_52.1 (%.13) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.13.%.loc188_52.1 (%.13) = return_slot %return.param +// CHECK:STDOUT: %.loc188_52.2: type = array_type %.loc188_51, %Self.3 [symbolic = %.loc188_52.1 (constants.%.10)] +// CHECK:STDOUT: %x.param: @F.13.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %x: @F.13.%tuple.type (%tuple.type.2) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @F.13.%.loc188_52.1 (%.10) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.13.%.loc188_52.1 (%.10) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc188: %.14 = assoc_entity element0, %F.decl [template = constants.%.15] +// CHECK:STDOUT: %.loc188: %.11 = assoc_entity element0, %F.decl [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -718,29 +718,29 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14: %Self.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.14 = fn_decl @F.14 [template = constants.%F.15] { -// CHECK:STDOUT: %x.patt: %.18 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.18 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.19 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.19 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: %tuple.type.3 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.15 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.15 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.16] +// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.13] // CHECK:STDOUT: %int.make_type_32.loc200_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc200_40.1: type = value_of_initializer %int.make_type_32.loc200_40 [template = i32] // CHECK:STDOUT: %.loc200_40.2: type = converted %int.make_type_32.loc200_40, %.loc200_40.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc200_49: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc200_49.1: type = value_of_initializer %int.make_type_32.loc200_49 [template = i32] // CHECK:STDOUT: %.loc200_49.2: type = converted %int.make_type_32.loc200_49, %.loc200_49.1 [template = i32] -// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: i32, .y: i32} [template = constants.%.17] -// CHECK:STDOUT: %.loc200_53.1: %.10 = tuple_literal (%.loc200_32, %.loc200_52) -// CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%.18 [template = constants.%.18] +// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: i32, .y: i32} [template = constants.%.14] +// CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%.loc200_32, %.loc200_52) +// CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_80: i32 = int_value 4 [template = constants.%.12] -// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.19] -// CHECK:STDOUT: %x.param: %.18 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.18 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.19 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.19 = return_slot %return.param +// CHECK:STDOUT: %.loc200_80: i32 = int_value 4 [template = constants.%.9] +// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.15] +// CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref %.15 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.15 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc192: = interface_witness () [template = ] // CHECK:STDOUT: @@ -751,27 +751,27 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.15: %Self.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.15 = fn_decl @F.15 [template = constants.%F.16] { -// CHECK:STDOUT: %x.patt: %.24 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.24 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.19 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.19 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: %tuple.type.5 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %tuple.type.5 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.15 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.15 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.22] +// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.17] // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc212_74.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc212_74.2: type = converted %int.make_type_32, %.loc212_74.1 [template = i32] -// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template = constants.%.23] -// CHECK:STDOUT: %.loc212_78.1: %.10 = tuple_literal (%.loc212_37, %.loc212_77) -// CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%.24 [template = constants.%.24] +// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template = constants.%.18] +// CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%.loc212_37, %.loc212_77) +// CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%tuple.type.5 [template = constants.%tuple.type.5] // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc212_105: i32 = int_value 4 [template = constants.%.12] -// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.19] -// CHECK:STDOUT: %x.param: %.24 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.24 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.19 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.19 = return_slot %return.param +// CHECK:STDOUT: %.loc212_105: i32 = int_value 4 [template = constants.%.9] +// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.15] +// CHECK:STDOUT: %x.param: %tuple.type.5 = value_param runtime_param0 +// CHECK:STDOUT: %x: %tuple.type.5 = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref %.15 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.15 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc205: = interface_witness () [template = ] // CHECK:STDOUT: @@ -785,7 +785,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [template = constants.%NoF] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NoF @@ -796,7 +796,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [template = constants.%FNotFunction] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc35: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FNotFunction @@ -809,7 +809,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [template = constants.%FAlias] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc51: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc51: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FAlias @@ -820,7 +820,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [template = constants.%FExtraParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc64: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc64: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraParam @@ -831,7 +831,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc77: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc77: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraImplicitParam @@ -842,7 +842,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [template = constants.%FExtraReturnType] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc91: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc91: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraReturnType @@ -853,7 +853,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [template = constants.%FMissingParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc106: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc106: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingParam @@ -864,7 +864,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [template = constants.%FMissingImplicitParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc119: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc119: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingImplicitParam @@ -875,7 +875,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [template = constants.%FMissingReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc132: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc132: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingReturnType @@ -886,7 +886,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc145: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc145: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamType @@ -897,7 +897,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc158: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc158: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentImplicitParamType @@ -908,7 +908,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc171: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc171: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentReturnType @@ -919,7 +919,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamName [template = constants.%FDifferentParamName] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc185: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc185: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamName @@ -930,7 +930,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc202: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc202: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadParam @@ -941,7 +941,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc214: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc214: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadReturnType @@ -985,17 +985,17 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.13(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.1: type = ptr_type @F.13.%Self (%Self.3) [symbolic = %.loc188_16.1 (constants.%.8)] -// CHECK:STDOUT: %.loc188_37.1: type = struct_type {.x: @F.13.%Self (%Self.3), .y: i32} [symbolic = %.loc188_37.1 (constants.%.9)] -// CHECK:STDOUT: %.loc188_38.1: type = tuple_type (@F.13.%.loc188_16.1 (%.8), @F.13.%.loc188_37.1 (%.9)) [symbolic = %.loc188_38.1 (constants.%.11)] -// CHECK:STDOUT: %.loc188_52.1: type = array_type constants.%.12, @F.13.%Self (%Self.3) [symbolic = %.loc188_52.1 (constants.%.13)] +// CHECK:STDOUT: %.loc188_16.1: type = ptr_type @F.13.%Self (%Self.3) [symbolic = %.loc188_16.1 (constants.%.7)] +// CHECK:STDOUT: %.loc188_37.1: type = struct_type {.x: @F.13.%Self (%Self.3), .y: i32} [symbolic = %.loc188_37.1 (constants.%.8)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.13.%.loc188_16.1 (%.7), @F.13.%.loc188_37.1 (%.8)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %.loc188_52.1: type = array_type constants.%.9, @F.13.%Self (%Self.3) [symbolic = %.loc188_52.1 (constants.%.10)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param_patt: @F.13.%.loc188_38.1 (%.11)) -> @F.13.%.loc188_52.1 (%.13); +// CHECK:STDOUT: fn(%x.param_patt: @F.13.%tuple.type (%tuple.type.2)) -> @F.13.%.loc188_52.1 (%.10); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.14(%x.param_patt: %.18) -> %.19; +// CHECK:STDOUT: fn @F.14(%x.param_patt: %tuple.type.3) -> %.15; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.15(%x.param_patt: %.24) -> %.19; +// CHECK:STDOUT: fn @F.15(%x.param_patt: %tuple.type.5) -> %.15; // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) {} // CHECK:STDOUT: @@ -1023,25 +1023,25 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.loc188_16.1 => constants.%.8 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.9 -// CHECK:STDOUT: %.loc188_38.1 => constants.%.11 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.13 +// CHECK:STDOUT: %.loc188_16.1 => constants.%.7 +// CHECK:STDOUT: %.loc188_37.1 => constants.%.8 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 +// CHECK:STDOUT: %.loc188_52.1 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%SelfNestedBadParam) { // CHECK:STDOUT: %Self => constants.%SelfNestedBadParam -// CHECK:STDOUT: %.loc188_16.1 => constants.%.16 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.20 -// CHECK:STDOUT: %.loc188_38.1 => constants.%.21 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.19 +// CHECK:STDOUT: %.loc188_16.1 => constants.%.13 +// CHECK:STDOUT: %.loc188_37.1 => constants.%.16 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 +// CHECK:STDOUT: %.loc188_52.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%SelfNestedBadReturnType) { // CHECK:STDOUT: %Self => constants.%SelfNestedBadReturnType -// CHECK:STDOUT: %.loc188_16.1 => constants.%.22 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.23 -// CHECK:STDOUT: %.loc188_38.1 => constants.%.24 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.25 +// CHECK:STDOUT: %.loc188_16.1 => constants.%.17 +// CHECK:STDOUT: %.loc188_37.1 => constants.%.18 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.5 +// CHECK:STDOUT: %.loc188_52.1 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index 0b4197f3cbcb..f435bcbdecbd 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -24,9 +24,9 @@ impl i32 as false {} // 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: bool = bool_literal false [template] +// CHECK:STDOUT: %.1: bool = bool_literal false [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] @@ -36,14 +36,14 @@ impl i32 as false {} // 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 { @@ -56,7 +56,7 @@ impl i32 as false {} // 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 @@ -72,7 +72,7 @@ impl i32 as false {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_6.2: type = converted %int.make_type_32, %.loc21_6.1 [template = i32] -// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.1] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -85,8 +85,8 @@ impl i32 as false {} // 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: @@ -141,7 +141,7 @@ impl i32 as false {} // 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: diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 059dd42b3dcf..540a409123f1 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -26,9 +26,9 @@ impl i32 as I {} // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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: = interface_witness () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon index f981b4c148d2..cff6f589a03b 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -30,7 +30,7 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] @@ -42,15 +42,15 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %Self.3: %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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [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: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.1) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.1) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.9: type = facet_type [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: %.8: type = facet_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,7 +63,7 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -88,7 +88,7 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %.loc23_27.1: ref type = temporary_storage // CHECK:STDOUT: %.loc23_27.2: ref type = temporary %.loc23_27.1, %bool.make_type.loc23_27 // CHECK:STDOUT: %.loc23_27.3: %.1 = converted %bool.make_type.loc23_27, [template = ] -// CHECK:STDOUT: %.loc23_16: type = where_expr %.Self [template = constants.%.9] { +// CHECK:STDOUT: %.loc23_16: type = where_expr %.Self [template = constants.%.8] { // CHECK:STDOUT: requirement_rewrite %T.ref, // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -114,8 +114,8 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -170,7 +170,7 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 8146bfb23d17..769490ce748b 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -27,17 +27,17 @@ class C { // CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -62,7 +62,7 @@ class C { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -72,7 +72,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -84,7 +84,7 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -100,7 +100,7 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_19.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc19_19.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc19_19.2: init %C = class_init (), %c.var [template = constants.%struct] // CHECK:STDOUT: %.loc19_20: init %C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_20 diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index d33b9738326d..5a0e34a8ac16 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -22,15 +22,15 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,7 +61,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -76,11 +76,11 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc15_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc15_36.2: = interface_witness (%F) [symbolic = %.loc15_36.2 (constants.%.4)] +// CHECK:STDOUT: %.loc15_36.2: = interface_witness (%F) [symbolic = %.loc15_36.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc15_36.1: = interface_witness (%F.decl) [symbolic = %.loc15_36.2 (constants.%.4)] +// CHECK:STDOUT: %.loc15_36.1: = interface_witness (%F.decl) [symbolic = %.loc15_36.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -111,7 +111,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc15_36.2 => constants.%.4 +// CHECK:STDOUT: %.loc15_36.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index 8c075e38931b..e63a30fbbe04 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -31,19 +31,19 @@ fn G(c: C) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,7 +80,7 @@ fn G(c: C) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -90,7 +90,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -99,9 +99,9 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %G: %.2 = bind_alias G, @HasF.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %G: %.1 = bind_alias G, @HasF.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -121,13 +121,13 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: %.2 = name_ref G, @C.%G [template = constants.%.3] -// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc24: init %.1 = call %.loc24() +// CHECK:STDOUT: %G.ref.loc24: %.1 = name_ref G, @C.%G [template = constants.%.2] +// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %.loc24() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: %.2 = name_ref G, @C.%G [template = constants.%.3] -// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc25: init %.1 = call %.loc25() +// CHECK:STDOUT: %G.ref.loc25: %.1 = name_ref G, @C.%G [template = constants.%.2] +// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index 25c62c8efb86..b4f13bc841aa 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -34,16 +34,16 @@ fn F(c: C) { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,7 +76,7 @@ fn F(c: C) { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -86,9 +86,9 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %F: %.2 = bind_alias F, @I.%.loc12 [template = constants.%.3] -// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %F: %.1 = bind_alias F, @I.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -103,9 +103,9 @@ fn F(c: C) { // CHECK:STDOUT: fn @F.2(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc24: %.2 = name_ref F, @C.%F [template = constants.%.3] +// CHECK:STDOUT: %F.ref.loc24: %.1 = name_ref F, @C.%F [template = constants.%.2] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc28: %.2 = name_ref F, @C.%F [template = constants.%.3] +// CHECK:STDOUT: %F.ref.loc28: %.1 = name_ref F, @C.%F [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index 10064dc37f10..368c611d7605 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -34,21 +34,21 @@ impl C as I { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,7 +89,7 @@ impl C as I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -101,7 +101,7 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -113,7 +113,7 @@ impl C as I { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -130,7 +130,7 @@ impl C as I { // CHECK:STDOUT: fn @F.2() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 743fc746224d..22408d025afa 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -127,22 +127,22 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.5) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.4) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.7: = specific_function %F.3, @F.2(%.5) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.6: = specific_function %F.3, @F.2(%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -170,20 +170,20 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param +// CHECK:STDOUT: %.loc12_10.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -198,11 +198,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -224,14 +224,14 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.5) { +// CHECK:STDOUT: fn @G(%x.param_patt: %.4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_4.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.5) [template = constants.%.7] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc13_4.2() +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_4.1: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.4) [template = constants.%.6] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -244,7 +244,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.4 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} @@ -256,17 +256,17 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.5) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.5 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.5 +// CHECK:STDOUT: specific @impl(constants.%.4) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%.4 +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.6 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.5) { +// CHECK:STDOUT: specific @F.2(constants.%.4) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -276,22 +276,22 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.5) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.4) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %struct: %.5 = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %struct: %.4 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -319,19 +319,19 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.5 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.5 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_17.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.5 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.5 = return_slot %return.param +// CHECK:STDOUT: %.loc12_10.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_17.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -354,7 +354,7 @@ fn G(x: A) { // CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.1.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -369,7 +369,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -385,7 +385,7 @@ fn G(x: A) { // CHECK:STDOUT: %return.param: ref @F.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -411,19 +411,19 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.5) -> %.5 { +// CHECK:STDOUT: fn @G(%x.param_patt: %.4) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_11.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_11.1: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc13_11.2: = bound_method %x.ref, %.loc13_11.1 -// CHECK:STDOUT: %.loc13_11.3: = specific_function %.loc13_11.2, @F.2(constants.%.5) -// CHECK:STDOUT: %F.call: init %.5 = call %.loc13_11.3(%x.ref) -// CHECK:STDOUT: %.loc13_20.1: ref %.5 = temporary_storage -// CHECK:STDOUT: %.loc13_20.2: ref %.5 = temporary %.loc13_20.1, %F.call -// CHECK:STDOUT: %struct: %.5 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc13_22: %.5 = converted %F.call, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc13_11.3: = specific_function %.loc13_11.2, @F.2(constants.%.4) +// CHECK:STDOUT: %F.call: init %.4 = call %.loc13_11.3(%x.ref) +// CHECK:STDOUT: %.loc13_20.1: ref %.4 = temporary_storage +// CHECK:STDOUT: %.loc13_20.2: ref %.4 = temporary %.loc13_20.1, %F.call +// CHECK:STDOUT: %struct: %.4 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc13_22: %.4 = converted %F.call, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc13_22 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -438,7 +438,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.4 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { @@ -454,18 +454,18 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.5) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.5 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.5 +// CHECK:STDOUT: specific @impl(constants.%.4) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%.4 +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.6 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.5) { -// CHECK:STDOUT: %T => constants.%.5 +// CHECK:STDOUT: specific @F.2(constants.%.4) { +// CHECK:STDOUT: %T => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -476,29 +476,29 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.4) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.3) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.4) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.3) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.9: = specific_function %F.3, @F.2(%.4) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.8: = specific_function %F.3, @F.2(%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -540,9 +540,9 @@ fn G(x: A) { // CHECK:STDOUT: %x.param_patt: %C.3 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_12: %.4 = struct_literal () -// CHECK:STDOUT: %.loc14_10: type = converted %.loc14_12, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.4) [template = constants.%C.3] +// CHECK:STDOUT: %.loc14_12: %.3 = struct_literal () +// CHECK:STDOUT: %.loc14_10: type = converted %.loc14_12, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] // CHECK:STDOUT: %x.param: %C.3 = value_param runtime_param0 // CHECK:STDOUT: %x: %C.3 = bind_name x, %x.param // CHECK:STDOUT: } @@ -551,7 +551,7 @@ fn G(x: A) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -567,11 +567,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.6)] +// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc10_25.1 as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.6)] +// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -586,7 +586,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -611,10 +611,10 @@ fn G(x: A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %C.3 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_4.1: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc15_4.2: = specific_function %.loc15_4.1, @F.2(constants.%.4) [template = constants.%.9] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc15_4.2() +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_4.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc15_4.2: = specific_function %.loc15_4.1, @F.2(constants.%.3) [template = constants.%.8] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc15_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -638,7 +638,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.6 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} @@ -651,25 +651,25 @@ fn G(x: A) { // CHECK:STDOUT: %C.loc10_25.2 => constants.%C.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.4) { -// CHECK:STDOUT: %T.loc8_9.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%.4 +// CHECK:STDOUT: specific @C(constants.%.3) { +// CHECK:STDOUT: %T.loc8_9.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.4) { -// CHECK:STDOUT: %T.loc10_14.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%.4 +// CHECK:STDOUT: specific @impl(constants.%.3) { +// CHECK:STDOUT: %T.loc10_14.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%.3 // CHECK:STDOUT: %C.loc10_25.2 => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.8 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.4) { +// CHECK:STDOUT: specific @F.2(constants.%.3) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -679,30 +679,30 @@ fn G(x: A) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %HasF.type.1: type = generic_interface_type @HasF [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %HasF: %HasF.type.1 = struct_value () [template] // CHECK:STDOUT: %HasF.type.2: type = interface_type @HasF, @HasF(%T) [symbolic] // CHECK:STDOUT: %Self: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @HasF(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %HasF.type.3: type = interface_type @HasF, @HasF(%.4) [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%.4) [template] +// CHECK:STDOUT: %HasF.type.3: type = interface_type @HasF, @HasF(%.3) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%.3) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @HasF.%F.decl [template] -// CHECK:STDOUT: %F.type.4: type = fn_type @F.2, @impl(%.4) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.type.4: type = fn_type @F.2, @impl(%.3) [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.4) [template] -// CHECK:STDOUT: %.9: = specific_function %F.4, @F.2(%.4) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.4) [template] +// CHECK:STDOUT: %.8: = specific_function %F.4, @F.2(%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -730,8 +730,8 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param [symbolic = %T.patt.loc8_14.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_25.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc8_25.1: %.3 = struct_literal () +// CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %HasF.type.loc8_34.1: type = interface_type @HasF, @HasF(constants.%T) [symbolic = %HasF.type.loc8_34.2 (constants.%HasF.type.2)] @@ -739,13 +739,13 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %.3 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.3 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param +// CHECK:STDOUT: %.loc12_10.1: %.3 = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %x.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.3 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -758,13 +758,13 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @HasF(%T.loc4_16.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @HasF.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_9.2 (constants.%.2)] -// CHECK:STDOUT: %.loc5_9.3: @HasF.%.loc5_9.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_9.2 (constants.%.1)] +// CHECK:STDOUT: %.loc5_9.3: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @HasF.%HasF.type (%HasF.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @HasF.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @HasF.%F (constants.%F.1)] {} {} -// CHECK:STDOUT: %.loc5_9.1: @HasF.%.loc5_9.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_9.1: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -781,11 +781,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_38.2: = interface_witness (%F) [symbolic = %.loc8_38.2 (constants.%.5)] +// CHECK:STDOUT: %.loc8_38.2: = interface_witness (%F) [symbolic = %.loc8_38.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_34.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_38.1: = interface_witness (%F.decl) [symbolic = %.loc8_38.2 (constants.%.5)] +// CHECK:STDOUT: %.loc8_38.1: = interface_witness (%F.decl) [symbolic = %.loc8_38.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -807,18 +807,18 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.4) { +// CHECK:STDOUT: fn @G(%x.param_patt: %.3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.3 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] -// CHECK:STDOUT: %.loc13_12: %.4 = struct_literal () -// CHECK:STDOUT: %.loc13_10: type = converted %.loc13_12, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %HasF.type: type = interface_type @HasF, @HasF(constants.%.4) [template = constants.%HasF.type.3] -// CHECK:STDOUT: %.loc13_14: %.6 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%.4) [template = constants.%.7] -// CHECK:STDOUT: %F.ref: %.6 = name_ref F, %.loc13_14 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_4.1: %F.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%F.4] -// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.4) [template = constants.%.9] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc13_4.2() +// CHECK:STDOUT: %.loc13_12: %.3 = struct_literal () +// CHECK:STDOUT: %.loc13_10: type = converted %.loc13_12, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %HasF.type: type = interface_type @HasF, @HasF(constants.%.3) [template = constants.%HasF.type.3] +// CHECK:STDOUT: %.loc13_14: %.5 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%.3) [template = constants.%.6] +// CHECK:STDOUT: %F.ref: %.5 = name_ref F, %.loc13_14 [template = constants.%.6] +// CHECK:STDOUT: %.loc13_4.1: %F.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%F.4] +// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.3) [template = constants.%.8] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -831,8 +831,8 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.2 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.3 +// CHECK:STDOUT: %.loc5_9.2 => constants.%.1 +// CHECK:STDOUT: %.loc5_9.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) {} @@ -855,12 +855,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_38.2 => constants.%.5 +// CHECK:STDOUT: %.loc8_38.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.4) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(@impl.%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T @@ -868,31 +868,31 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type.loc8_34.2 => constants.%HasF.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(constants.%.4) { -// CHECK:STDOUT: %T.loc4_16.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%.4 +// CHECK:STDOUT: specific @HasF(constants.%.3) { +// CHECK:STDOUT: %T.loc4_16.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.6 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.7 +// CHECK:STDOUT: %.loc5_9.2 => constants.%.5 +// CHECK:STDOUT: %.loc5_9.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.4) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.4 +// CHECK:STDOUT: specific @impl(constants.%.3) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.3 // CHECK:STDOUT: %HasF.type.loc8_34.2 => constants.%HasF.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.loc8_38.2 => constants.%.8 +// CHECK:STDOUT: %.loc8_38.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.4) { +// CHECK:STDOUT: specific @F.2(constants.%.3) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -902,18 +902,18 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T, %U) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -947,20 +947,20 @@ fn G(x: A) { // CHECK:STDOUT: %U.loc9_24.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc9_24.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: %.5 = struct_literal () -// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param +// CHECK:STDOUT: %.loc13_10.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -977,11 +977,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc9_14.2, %U.loc9_24.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc9_44.2: = interface_witness (%F) [symbolic = %.loc9_44.2 (constants.%.4)] +// CHECK:STDOUT: %.loc9_44.2: = interface_witness (%F) [symbolic = %.loc9_44.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc9_44.1: = interface_witness (%F.decl) [symbolic = %.loc9_44.2 (constants.%.4)] +// CHECK:STDOUT: %.loc9_44.1: = interface_witness (%F.decl) [symbolic = %.loc9_44.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -1003,11 +1003,11 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.5) { +// CHECK:STDOUT: fn @G(%x.param_patt: %.4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1022,7 +1022,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc9_44.2 => constants.%.4 +// CHECK:STDOUT: %.loc9_44.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T, constants.%U) {} @@ -1042,30 +1042,30 @@ fn G(x: A) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %HasF.type.1: type = generic_interface_type @HasF [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %HasF: %HasF.type.1 = struct_value () [template] // CHECK:STDOUT: %HasF.type.2: type = interface_type @HasF, @HasF(%T) [symbolic] // CHECK:STDOUT: %Self: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @HasF(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: %HasF.type.3: type = interface_type @HasF, @HasF(%B) [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%B) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1123,13 +1123,13 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2: %HasF.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @HasF(%T.loc4_16.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @HasF.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_9.2 (constants.%.2)] -// CHECK:STDOUT: %.loc5_9.3: @HasF.%.loc5_9.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @HasF.%HasF.type (%HasF.type.2), @HasF.%F.type (%F.type.1) [symbolic = %.loc5_9.2 (constants.%.1)] +// CHECK:STDOUT: %.loc5_9.3: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @HasF.%HasF.type (%HasF.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @HasF.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @HasF.%F (constants.%F.1)] {} {} -// CHECK:STDOUT: %.loc5_9.1: @HasF.%.loc5_9.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_9.1: @HasF.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -1146,11 +1146,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_37.2: = interface_witness (%F) [symbolic = %.loc8_37.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_37.2: = interface_witness (%F) [symbolic = %.loc8_37.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_33.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_37.1: = interface_witness (%F.decl) [symbolic = %.loc8_37.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_37.1: = interface_witness (%F.decl) [symbolic = %.loc8_37.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -1159,14 +1159,14 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1192,8 +1192,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %HasF.type: type = interface_type @HasF, @HasF(constants.%B) [template = constants.%HasF.type.3] -// CHECK:STDOUT: %.loc21: %.8 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%B) [template = constants.%.9] -// CHECK:STDOUT: %F.ref: %.8 = name_ref F, %.loc21 [template = constants.%.9] +// CHECK:STDOUT: %.loc21: %.7 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%B) [template = constants.%.8] +// CHECK:STDOUT: %F.ref: %.7 = name_ref F, %.loc21 [template = constants.%.8] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1206,8 +1206,8 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.2 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.3 +// CHECK:STDOUT: %.loc5_9.2 => constants.%.1 +// CHECK:STDOUT: %.loc5_9.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) {} @@ -1230,7 +1230,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_37.2 => constants.%.4 +// CHECK:STDOUT: %.loc8_37.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} @@ -1252,7 +1252,7 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.8 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.9 +// CHECK:STDOUT: %.loc5_9.2 => constants.%.7 +// CHECK:STDOUT: %.loc5_9.3 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 2f4fba31359a..d006ca67516a 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -31,20 +31,20 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,7 +103,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -127,7 +127,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -139,7 +139,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -159,8 +159,8 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: fn @F.3(%c.param_patt: %C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc14 [template = constants.%.3] -// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc14 [template = constants.%.2] +// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc24_11.2: = bound_method %c.ref, %.loc24_11.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc24_11.2(%c.ref) // CHECK:STDOUT: %.loc24_15.1: i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon index b57d01c625aa..33661079c33b 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -38,12 +38,12 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.1: %A.type = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A, @A(%T) [symbolic] -// CHECK:STDOUT: %.2: type = unbound_element_type %A.2, %T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.n: %T} [symbolic] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [symbolic] +// CHECK:STDOUT: %.1: type = unbound_element_type %A.2, %T [symbolic] +// CHECK:STDOUT: %.2: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] @@ -52,8 +52,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%U) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: type = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %A.3: type = class_type @A, @A(%V) [symbolic] @@ -62,48 +62,48 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @I(%V) [symbolic] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @I.%F.decl [symbolic] -// CHECK:STDOUT: %.9: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.10: type = unbound_element_type %A.3, %V [symbolic] -// CHECK:STDOUT: %.11: type = struct_type {.n: %V} [symbolic] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [symbolic] -// CHECK:STDOUT: %.13: type = ptr_type %.11 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.9: type = unbound_element_type %A.3, %V [symbolic] +// CHECK:STDOUT: %.10: type = struct_type {.n: %V} [symbolic] +// CHECK:STDOUT: %.11: = complete_type_witness %.10 [symbolic] +// CHECK:STDOUT: %.12: type = ptr_type %.10 [symbolic] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: type = symbolic_binding_pattern W, 0 [symbolic] // CHECK:STDOUT: %A.4: type = class_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %TestGeneric.type: type = fn_type @TestGeneric [template] // CHECK:STDOUT: %TestGeneric: %TestGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.14: type = unbound_element_type %A.4, %W [symbolic] -// CHECK:STDOUT: %.15: type = struct_type {.n: %W} [symbolic] -// CHECK:STDOUT: %.16: = complete_type_witness %.15 [symbolic] -// CHECK:STDOUT: %.17: type = ptr_type %.15 [symbolic] +// CHECK:STDOUT: %.13: type = unbound_element_type %A.4, %W [symbolic] +// CHECK:STDOUT: %.14: type = struct_type {.n: %W} [symbolic] +// CHECK:STDOUT: %.15: = complete_type_witness %.14 [symbolic] +// CHECK:STDOUT: %.16: type = ptr_type %.14 [symbolic] // CHECK:STDOUT: %I.type.4: type = interface_type @I, @I(%W) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @I(%W) [symbolic] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.18: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.17: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] +// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.2, @impl(%W) [symbolic] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: = interface_witness (%F.5) [symbolic] -// CHECK:STDOUT: %.21: type = struct_type {} [template] -// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.21) [template] +// CHECK:STDOUT: %.19: = interface_witness (%F.5) [symbolic] +// CHECK:STDOUT: %.20: type = struct_type {} [template] +// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.20) [template] // CHECK:STDOUT: %TestSpecific.type: type = fn_type @TestSpecific [template] // CHECK:STDOUT: %TestSpecific: %TestSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.22: type = unbound_element_type %A.5, %.21 [template] -// CHECK:STDOUT: %.23: type = struct_type {.n: %.21} [template] -// CHECK:STDOUT: %.24: = complete_type_witness %.23 [template] -// CHECK:STDOUT: %.25: type = struct_type {.n: %.1} [template] -// CHECK:STDOUT: %.26: type = ptr_type %.23 [template] -// CHECK:STDOUT: %I.type.5: type = interface_type @I, @I(%.21) [template] -// CHECK:STDOUT: %F.type.6: type = fn_type @F.1, @I(%.21) [template] +// CHECK:STDOUT: %.21: type = unbound_element_type %A.5, %.20 [template] +// CHECK:STDOUT: %.22: type = struct_type {.n: %.20} [template] +// CHECK:STDOUT: %.23: = complete_type_witness %.22 [template] +// CHECK:STDOUT: %.24: type = struct_type {.n: %empty_tuple.type} [template] +// CHECK:STDOUT: %.25: type = ptr_type %.22 [template] +// CHECK:STDOUT: %I.type.5: type = interface_type @I, @I(%.20) [template] +// CHECK:STDOUT: %F.type.6: type = fn_type @F.1, @I(%.20) [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.27: type = assoc_entity_type %I.type.5, %F.type.6 [template] -// CHECK:STDOUT: %.28: %.27 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %F.type.7: type = fn_type @F.2, @impl(%.21) [template] +// CHECK:STDOUT: %.26: type = assoc_entity_type %I.type.5, %F.type.6 [template] +// CHECK:STDOUT: %.27: %.26 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.type.7: type = fn_type @F.2, @impl(%.20) [template] // CHECK:STDOUT: %F.7: %F.type.7 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%F.7) [template] -// CHECK:STDOUT: %struct: %.21 = struct_value () [template] +// CHECK:STDOUT: %.28: = interface_witness (%F.7) [template] +// CHECK:STDOUT: %struct: %.20 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -162,19 +162,19 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %TestSpecific.decl: %TestSpecific.type = fn_decl @TestSpecific [template = constants.%TestSpecific] { // CHECK:STDOUT: %a.patt: %A.5 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %A.5 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.21 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.21 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.20 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.20 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] -// CHECK:STDOUT: %.loc20_23: %.21 = struct_literal () -// CHECK:STDOUT: %.loc20_21: type = converted %.loc20_23, constants.%.21 [template = constants.%.21] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.21) [template = constants.%A.5] -// CHECK:STDOUT: %.loc20_31.1: %.21 = struct_literal () -// CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%.21 [template = constants.%.21] +// CHECK:STDOUT: %.loc20_23: %.20 = struct_literal () +// CHECK:STDOUT: %.loc20_21: type = converted %.loc20_23, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.20) [template = constants.%A.5] +// CHECK:STDOUT: %.loc20_31.1: %.20 = struct_literal () +// CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%.20 [template = constants.%.20] // CHECK:STDOUT: %a.param: %A.5 = value_param runtime_param0 // CHECK:STDOUT: %a: %A.5 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %.21 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.21 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.20 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.20 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -187,8 +187,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%U.loc6_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc7_26.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc7_26.2 (constants.%.5)] -// CHECK:STDOUT: %.loc7_26.3: @I.%.loc7_26.2 (%.5) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.6)] +// CHECK:STDOUT: %.loc7_26.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc7_26.2 (constants.%.4)] +// CHECK:STDOUT: %.loc7_26.3: @I.%.loc7_26.2 (%.4) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -208,7 +208,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.param: ref @F.1.%U (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.1.%U (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_26.1: @I.%.loc7_26.2 (%.5) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.6)] +// CHECK:STDOUT: %.loc7_26.1: @I.%.loc7_26.2 (%.4) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -226,7 +226,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.9)] +// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %A.loc10_25.1 as %I.type.loc10_33.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -242,7 +242,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.param: ref @F.2.%V (%V) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%V (%V) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.9)] +// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -256,14 +256,14 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A: type = class_type @A, @A(%T.loc2_9.2) [symbolic = %A (constants.%A.2)] -// CHECK:STDOUT: %.loc3_8.2: type = unbound_element_type @A.%A (%A.2), @A.%T.loc2_9.2 (%T) [symbolic = %.loc3_8.2 (constants.%.2)] -// CHECK:STDOUT: %.loc4_1.2: type = struct_type {.n: @A.%T.loc2_9.2 (%T)} [symbolic = %.loc4_1.2 (constants.%.3)] -// CHECK:STDOUT: %.loc4_1.3: = complete_type_witness @A.%.loc4_1.2 (%.3) [symbolic = %.loc4_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc3_8.2: type = unbound_element_type @A.%A (%A.2), @A.%T.loc2_9.2 (%T) [symbolic = %.loc3_8.2 (constants.%.1)] +// CHECK:STDOUT: %.loc4_1.2: type = struct_type {.n: @A.%T.loc2_9.2 (%T)} [symbolic = %.loc4_1.2 (constants.%.2)] +// CHECK:STDOUT: %.loc4_1.3: = complete_type_witness @A.%.loc4_1.2 (%.2) [symbolic = %.loc4_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc2_9.1 [symbolic = %T.loc2_9.2 (constants.%T)] -// CHECK:STDOUT: %.loc3_8.1: @A.%.loc3_8.2 (%.2) = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc4_1.1: = complete_type_witness %.3 [symbolic = %.loc4_1.3 (constants.%.4)] +// CHECK:STDOUT: %.loc3_8.1: @A.%.loc3_8.2 (%.1) = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc4_1.1: = complete_type_witness %.2 [symbolic = %.loc4_1.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.2 @@ -284,12 +284,12 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A: type = class_type @A, @A(%V) [symbolic = %A (constants.%A.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.loc12_16.3 (constants.%.10)] +// CHECK:STDOUT: %.loc12_16.3: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.loc12_16.3 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self.param_patt: @F.2.%A (%A.3)]() -> @F.2.%V (%V) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @F.2.%A (%A.3) = name_ref self, %self -// CHECK:STDOUT: %n.ref: @F.2.%.loc12_16.3 (%.10) = name_ref n, @A.%.loc3_8.1 [template = @A.%.loc3_8.1] +// CHECK:STDOUT: %n.ref: @F.2.%.loc12_16.3 (%.9) = name_ref n, @A.%.loc3_8.1 [template = @A.%.loc3_8.1] // CHECK:STDOUT: %.loc12_16.1: ref @F.2.%V (%V) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_16.2: @F.2.%V (%V) = bind_value %.loc12_16.1 // CHECK:STDOUT: return %.loc12_16.2 @@ -304,8 +304,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc17_14.2: type = interface_type @I, @I(%W.loc16_16.2) [symbolic = %I.type.loc17_14.2 (constants.%I.type.4)] // CHECK:STDOUT: %F.type.loc17_17: type = fn_type @F.1, @I(%W.loc16_16.2) [symbolic = %F.type.loc17_17 (constants.%F.type.4)] -// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_14.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.18)] -// CHECK:STDOUT: %.loc17_17.3: @TestGeneric.%.loc17_17.2 (%.18) = assoc_entity element0, @I.%F.decl [symbolic = %.loc17_17.3 (constants.%.19)] +// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_14.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.17)] +// CHECK:STDOUT: %.loc17_17.3: @TestGeneric.%.loc17_17.2 (%.17) = assoc_entity element0, @I.%F.decl [symbolic = %.loc17_17.3 (constants.%.18)] // CHECK:STDOUT: %F.type.loc17_11: type = fn_type @F.2, @impl(%W.loc16_16.2) [symbolic = %F.type.loc17_11 (constants.%F.type.5)] // CHECK:STDOUT: %F: @TestGeneric.%F.type.loc17_11 (%F.type.5) = struct_value () [symbolic = %F (constants.%F.5)] // CHECK:STDOUT: @@ -315,9 +315,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %W.ref.loc17: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %I.type.loc17_14.1: type = interface_type @I, @I(constants.%W) [symbolic = %I.type.loc17_14.2 (constants.%I.type.4)] -// CHECK:STDOUT: %.loc17_17.1: @TestGeneric.%.loc17_17.2 (%.18) = specific_constant @I.%.loc7_26.1, @I(constants.%W) [symbolic = %.loc17_17.3 (constants.%.19)] -// CHECK:STDOUT: %F.ref: @TestGeneric.%.loc17_17.2 (%.18) = name_ref F, %.loc17_17.1 [symbolic = %.loc17_17.3 (constants.%.19)] -// CHECK:STDOUT: %.loc17_11.1: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%.20, element0 [symbolic = %F (constants.%F.5)] +// CHECK:STDOUT: %.loc17_17.1: @TestGeneric.%.loc17_17.2 (%.17) = specific_constant @I.%.loc7_26.1, @I(constants.%W) [symbolic = %.loc17_17.3 (constants.%.18)] +// CHECK:STDOUT: %F.ref: @TestGeneric.%.loc17_17.2 (%.17) = name_ref F, %.loc17_17.1 [symbolic = %.loc17_17.3 (constants.%.18)] +// CHECK:STDOUT: %.loc17_11.1: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%.19, element0 [symbolic = %F (constants.%F.5)] // CHECK:STDOUT: %.loc17_11.2: = bound_method %a.ref, %.loc17_11.1 // CHECK:STDOUT: %.loc17_11.3: = specific_function %.loc17_11.2, @F.2(constants.%W) // CHECK:STDOUT: %F.call: init @TestGeneric.%W.loc16_16.2 (%W) = call %.loc17_11.3(%a.ref) @@ -327,23 +327,23 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.5) -> %.21 { +// CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.5) -> %.20 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A.5 = name_ref a, %a // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] -// CHECK:STDOUT: %.loc21_16: %.21 = struct_literal () -// CHECK:STDOUT: %.loc21_14: type = converted %.loc21_16, constants.%.21 [template = constants.%.21] -// CHECK:STDOUT: %I.type: type = interface_type @I, @I(constants.%.21) [template = constants.%I.type.5] -// CHECK:STDOUT: %.loc21_18: %.27 = specific_constant @I.%.loc7_26.1, @I(constants.%.21) [template = constants.%.28] -// CHECK:STDOUT: %F.ref: %.27 = name_ref F, %.loc21_18 [template = constants.%.28] -// CHECK:STDOUT: %.loc21_11.1: %F.type.6 = interface_witness_access constants.%.29, element0 [template = constants.%F.7] +// CHECK:STDOUT: %.loc21_16: %.20 = struct_literal () +// CHECK:STDOUT: %.loc21_14: type = converted %.loc21_16, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %I.type: type = interface_type @I, @I(constants.%.20) [template = constants.%I.type.5] +// CHECK:STDOUT: %.loc21_18: %.26 = specific_constant @I.%.loc7_26.1, @I(constants.%.20) [template = constants.%.27] +// CHECK:STDOUT: %F.ref: %.26 = name_ref F, %.loc21_18 [template = constants.%.27] +// CHECK:STDOUT: %.loc21_11.1: %F.type.6 = interface_witness_access constants.%.28, element0 [template = constants.%F.7] // CHECK:STDOUT: %.loc21_11.2: = bound_method %a.ref, %.loc21_11.1 -// CHECK:STDOUT: %.loc21_11.3: = specific_function %.loc21_11.2, @F.2(constants.%.21) -// CHECK:STDOUT: %F.call: init %.21 = call %.loc21_11.3(%a.ref) -// CHECK:STDOUT: %.loc21_21.1: ref %.21 = temporary_storage -// CHECK:STDOUT: %.loc21_21.2: ref %.21 = temporary %.loc21_21.1, %F.call -// CHECK:STDOUT: %struct: %.21 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc21_23: %.21 = converted %F.call, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc21_11.3: = specific_function %.loc21_11.2, @F.2(constants.%.20) +// CHECK:STDOUT: %F.call: init %.20 = call %.loc21_11.3(%a.ref) +// CHECK:STDOUT: %.loc21_21.1: ref %.20 = temporary_storage +// CHECK:STDOUT: %.loc21_21.2: ref %.20 = temporary %.loc21_21.1, %F.call +// CHECK:STDOUT: %struct: %.20 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc21_23: %.20 = converted %F.call, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc21_23 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -384,9 +384,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.3 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.10 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.11 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.12 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.9 +// CHECK:STDOUT: %.loc4_1.2 => constants.%.10 +// CHECK:STDOUT: %.loc4_1.3 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%V) { @@ -398,8 +398,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.7 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.8 +// CHECK:STDOUT: %.loc7_26.2 => constants.%.6 +// CHECK:STDOUT: %.loc7_26.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@impl.%V.loc10_14.2) { @@ -421,7 +421,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.9 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@F.2.%V) { @@ -453,9 +453,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.4 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.14 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.15 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.16 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.13 +// CHECK:STDOUT: %.loc4_1.2 => constants.%.14 +// CHECK:STDOUT: %.loc4_1.3 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@TestGeneric.%W.loc16_16.2) { @@ -478,8 +478,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.18 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.19 +// CHECK:STDOUT: %.loc7_26.2 => constants.%.17 +// CHECK:STDOUT: %.loc7_26.3 => constants.%.18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%W) { @@ -491,7 +491,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.5 // CHECK:STDOUT: %F => constants.%F.5 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.20 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%W) { @@ -499,7 +499,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A => constants.%A.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3 => constants.%.14 +// CHECK:STDOUT: %.loc12_16.3 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@TestGeneric.%W.loc16_16.2) { @@ -514,47 +514,47 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%.21) { -// CHECK:STDOUT: %T.loc2_9.2 => constants.%.21 -// CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%.21 +// CHECK:STDOUT: specific @A(constants.%.20) { +// CHECK:STDOUT: %T.loc2_9.2 => constants.%.20 +// CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%.20 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.5 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.22 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.23 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.24 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.21 +// CHECK:STDOUT: %.loc4_1.2 => constants.%.22 +// CHECK:STDOUT: %.loc4_1.3 => constants.%.23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.21) { -// CHECK:STDOUT: %U.loc6_13.2 => constants.%.21 -// CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%.21 +// CHECK:STDOUT: specific @I(constants.%.20) { +// CHECK:STDOUT: %U.loc6_13.2 => constants.%.20 +// CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%.20 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.5 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.6 // CHECK:STDOUT: %F => constants.%F.6 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.27 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.28 +// CHECK:STDOUT: %.loc7_26.2 => constants.%.26 +// CHECK:STDOUT: %.loc7_26.3 => constants.%.27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.21) { -// CHECK:STDOUT: %V.loc10_14.2 => constants.%.21 -// CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%.21 +// CHECK:STDOUT: specific @impl(constants.%.20) { +// CHECK:STDOUT: %V.loc10_14.2 => constants.%.20 +// CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%.20 // CHECK:STDOUT: %A.loc10_25.2 => constants.%A.5 // CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.7 // CHECK:STDOUT: %F => constants.%F.7 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.29 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.28 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.21) { -// CHECK:STDOUT: %V => constants.%.21 +// CHECK:STDOUT: specific @F.2(constants.%.20) { +// CHECK:STDOUT: %V => constants.%.20 // CHECK:STDOUT: %A => constants.%A.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3 => constants.%.22 +// CHECK:STDOUT: %.loc12_16.3 => constants.%.21 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index 68a12097eac4..e6bfa55c6dd2 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -77,16 +77,16 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,7 +105,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -115,7 +115,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc11: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc11: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -123,7 +123,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -149,27 +149,27 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %HasG.type: type = interface_type @HasG [template] // CHECK:STDOUT: %Self.1: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasG.%G.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasG.%G.decl [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %.5: = interface_witness (%G.2) [template] // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self.2: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.1) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.1) [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G.3 [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%G.3) [template] +// CHECK:STDOUT: %.7: = interface_witness (%G.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -214,7 +214,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: interface @HasG { // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] {} {} -// CHECK:STDOUT: %.loc7: %.2 = assoc_entity element0, %G.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %G.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -231,7 +231,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%G.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc13: = interface_witness (%G.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl @@ -240,7 +240,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -249,7 +249,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %D.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.3 = fn_decl @G.3 [template = constants.%G.3] {} {} -// CHECK:STDOUT: %.loc23: = interface_witness (%G.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc23: = interface_witness (%G.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl @@ -257,7 +257,7 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -310,18 +310,18 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %TestCF.type: type = fn_type @TestCF [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %TestCF: %TestCF.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self.1: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %TestDF.type: type = fn_type @TestDF [template] // CHECK:STDOUT: %TestDF: %TestDF.type = struct_value () [template] @@ -329,21 +329,21 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %Self.2: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] // CHECK:STDOUT: %TestCG.type: type = fn_type @TestCG [template] // CHECK:STDOUT: %TestCG: %TestCG.type = struct_value () [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.26 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.26 [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %.10: = interface_witness (%G.2) [template] // CHECK:STDOUT: %TestDG.type: type = fn_type @TestDG [template] // CHECK:STDOUT: %TestDG: %TestDG.type = struct_value () [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G.3 [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] -// CHECK:STDOUT: %.12: = interface_witness (%G.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%G.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -361,26 +361,26 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %import_ref.2 = import_ref PackageA//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref PackageA//default, inst+1, loaded [template = constants.%HasF.type] // CHECK:STDOUT: %import_ref.4 = import_ref PackageA//default, inst+3, unloaded -// CHECK:STDOUT: %import_ref.5: %.5 = import_ref PackageA//default, inst+10, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: %.4 = import_ref PackageA//default, inst+10, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.6 = import_ref PackageA//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref PackageA//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref PackageA//default, inst+17, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.9: type = import_ref PackageA//default, inst+18, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.10: = import_ref PackageA//default, inst+23, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.10: = import_ref PackageA//default, inst+23, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.11: type = import_ref PackageB//default, inst+14, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.12 = import_ref PackageB//default, inst+15, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref PackageB//default, inst+5, unloaded -// CHECK:STDOUT: %import_ref.14: %.9 = import_ref PackageB//default, inst+12, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.14: %.8 = import_ref PackageB//default, inst+12, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.15 = import_ref PackageB//default, inst+7, unloaded // CHECK:STDOUT: %import_ref.16: type = import_ref PackageB//default, inst+24, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.17: type = import_ref PackageB//default, inst+25, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.18: = import_ref PackageB//default, inst+30, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.18: = import_ref PackageB//default, inst+30, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+33, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.20: type = import_ref PackageB//default, inst+42, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.21: = import_ref PackageB//default, inst+50, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.21: = import_ref PackageB//default, inst+50, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.22: type = import_ref PackageB//default, inst+53, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.23: type = import_ref PackageB//default, inst+54, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.24: = import_ref PackageB//default, inst+59, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.24: = import_ref PackageB//default, inst+59, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.25: type = import_ref PackageB//default, inst+3, loaded [template = constants.%HasG.type] // CHECK:STDOUT: %import_ref.26 = import_ref PackageB//default, inst+7, unloaded // CHECK:STDOUT: } @@ -483,9 +483,9 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %PackageA.ref.loc6: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.3 [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc6: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.3 = call %.loc6() +// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc6: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc6() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -501,9 +501,9 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.3 [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc10: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.3] -// CHECK:STDOUT: %F.call: init %.3 = call %.loc10() +// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc10: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc10() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -514,9 +514,9 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %PackageB.ref: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%import_ref.25 [template = constants.%HasG.type] -// CHECK:STDOUT: %G.ref: %.9 = name_ref G, imports.%import_ref.14 [template = constants.%.10] -// CHECK:STDOUT: %.loc14: %G.type.1 = interface_witness_access constants.%.11, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call: init %.3 = call %.loc14() +// CHECK:STDOUT: %G.ref: %.8 = name_ref G, imports.%import_ref.14 [template = constants.%.9] +// CHECK:STDOUT: %.loc14: %G.type.1 = interface_witness_access constants.%.10, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc14() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -532,9 +532,9 @@ fn TestDG(d: PackageB.D) { // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %PackageB.ref.loc18: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%import_ref.25 [template = constants.%HasG.type] -// CHECK:STDOUT: %G.ref: %.9 = name_ref G, imports.%import_ref.14 [template = constants.%.10] -// CHECK:STDOUT: %.loc18: %G.type.1 = interface_witness_access constants.%.12, element0 [template = constants.%G.3] -// CHECK:STDOUT: %G.call: init %.3 = call %.loc18() +// CHECK:STDOUT: %G.ref: %.8 = name_ref G, imports.%import_ref.14 [template = constants.%.9] +// CHECK:STDOUT: %.loc18: %G.type.1 = interface_witness_access constants.%.11, element0 [template = constants.%G.3] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc18() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index 67433e957bfd..53eef54be13f 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -165,28 +165,28 @@ fn P(o: O) { // CHECK:STDOUT: %HasF.type: type = interface_type @HasF [template] // CHECK:STDOUT: %Self.1: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %HasG.type: type = interface_type @HasG [template] // CHECK:STDOUT: %Self.2: %HasG.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasG.type, %G.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @HasG.%G.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %HasG.type, %G.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasG.%G.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%G.2) [template] -// CHECK:STDOUT: %.8: type = struct_type {} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %.7: type = struct_type {} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -221,7 +221,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -232,7 +232,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasG { // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] {} {} -// CHECK:STDOUT: %.loc9: %.4 = assoc_entity element0, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %G.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -242,7 +242,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -251,7 +251,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%G.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc16: = interface_witness (%G.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl @@ -267,7 +267,7 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [template = constants.%HasG.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -298,21 +298,21 @@ fn P(o: O) { // CHECK:STDOUT: fn @H(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init %.1 = call %.loc22() +// CHECK:STDOUT: %F.ref.loc22: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %.loc22() // CHECK:STDOUT: %c.ref.loc23: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init %.1 = call %.loc23() +// CHECK:STDOUT: %F.ref.loc23: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %.loc23() // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: %.4 = name_ref G, @HasG.%.loc9 [template = constants.%.5] -// CHECK:STDOUT: %.loc24: %G.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call.loc24: init %.1 = call %.loc24() +// CHECK:STDOUT: %G.ref.loc24: %.3 = name_ref G, @HasG.%.loc9 [template = constants.%.4] +// CHECK:STDOUT: %.loc24: %G.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call.loc24: init %empty_tuple.type = call %.loc24() // CHECK:STDOUT: %c.ref.loc25: %C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: %.4 = name_ref G, @HasG.%.loc9 [template = constants.%.5] -// CHECK:STDOUT: %.loc25: %G.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%G.2] -// CHECK:STDOUT: %G.call.loc25: init %.1 = call %.loc25() +// CHECK:STDOUT: %G.ref.loc25: %.3 = name_ref G, @HasG.%.loc9 [template = constants.%.4] +// CHECK:STDOUT: %.loc25: %G.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%G.2] +// CHECK:STDOUT: %G.call.loc25: init %empty_tuple.type = call %.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -330,28 +330,28 @@ fn P(o: O) { // CHECK:STDOUT: %HasA1.type: type = interface_type @HasA1 [template] // CHECK:STDOUT: %Self.1: %HasA1.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %A.type.1: type = fn_type @A.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.1: %A.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasA1.type, %A.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasA1.%A.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasA1.type, %A.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasA1.%A.decl [template] // CHECK:STDOUT: %HasA2.type: type = interface_type @HasA2 [template] // CHECK:STDOUT: %Self.2: %HasA2.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %A.type.2: type = fn_type @A.2 [template] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasA2.type, %A.type.2 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @HasA2.%A.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %HasA2.type, %A.type.2 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasA2.%A.decl [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %A.type.3: type = fn_type @A.3 [template] // CHECK:STDOUT: %A.3: %A.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%A.3) [template] +// CHECK:STDOUT: %.5: = interface_witness (%A.3) [template] // CHECK:STDOUT: %A.type.4: type = fn_type @A.4 [template] // CHECK:STDOUT: %A.4: %A.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%A.4) [template] -// CHECK:STDOUT: %.8: type = struct_type {} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.6: = interface_witness (%A.4) [template] +// CHECK:STDOUT: %.7: type = struct_type {} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -386,7 +386,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasA1 { // CHECK:STDOUT: %Self: %HasA1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %A.decl: %A.type.1 = fn_decl @A.1 [template = constants.%A.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %A.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %A.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -397,7 +397,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasA2 { // CHECK:STDOUT: %Self: %HasA2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %A.decl: %A.type.2 = fn_decl @A.2 [template = constants.%A.2] {} {} -// CHECK:STDOUT: %.loc9: %.4 = assoc_entity element0, %A.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %A.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -407,7 +407,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasA1.ref { // CHECK:STDOUT: %A.decl: %A.type.3 = fn_decl @A.3 [template = constants.%A.3] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%A.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc13: = interface_witness (%A.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl @@ -416,7 +416,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasA2.ref { // CHECK:STDOUT: %A.decl: %A.type.4 = fn_decl @A.4 [template = constants.%A.4] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%A.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc16: = interface_witness (%A.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl @@ -432,7 +432,7 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %HasA2.ref: type = name_ref HasA2, file.%HasA2.decl [template = constants.%HasA2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -483,27 +483,27 @@ fn P(o: O) { // CHECK:STDOUT: %HasI.type: type = interface_type @HasI [template] // CHECK:STDOUT: %Self: %HasI.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = fn_type @I.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I.1: %I.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %HasI.type, %I.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasI.%I.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %HasI.type, %I.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasI.%I.decl [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] // CHECK:STDOUT: %J: %J.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %E: type = class_type @E [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %E, %B [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %E, %B [template] // CHECK:STDOUT: %I.type.2: type = fn_type @I.2 [template] // CHECK:STDOUT: %I.2: %I.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%I.2) [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %.7: = interface_witness (%I.2) [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %.6} [template] -// CHECK:STDOUT: %.12: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.5} [template] +// CHECK:STDOUT: %.11: type = ptr_type %.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -538,7 +538,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasI { // CHECK:STDOUT: %Self: %HasI.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %I.decl: %I.type.1 = fn_decl @I.1 [template = constants.%I.1] {} {} -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %I.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %I.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -548,7 +548,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasI.ref { // CHECK:STDOUT: %I.decl: %I.type.2 = fn_decl @I.2 [template = constants.%I.2] {} {} -// CHECK:STDOUT: %.loc14: = interface_witness (%I.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc14: = interface_witness (%I.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .I = %I.decl @@ -557,7 +557,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [template = constants.%J] {} {} -// CHECK:STDOUT: %.loc10: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -566,12 +566,12 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: class @E { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc13: %.7 = base_decl %B, element0 [template] +// CHECK:STDOUT: %.loc13: %.6 = base_decl %B, element0 [template] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] // CHECK:STDOUT: %HasI.ref: type = name_ref HasI, file.%HasI.decl [template = constants.%HasI.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E @@ -598,19 +598,19 @@ fn P(o: O) { // CHECK:STDOUT: fn @H(%e.param_patt: %E) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [template = constants.%E] -// CHECK:STDOUT: %I.ref.loc20: %.2 = name_ref I, @HasI.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc20: %I.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%I.2] -// CHECK:STDOUT: %I.call.loc20: init %.1 = call %.loc20() +// CHECK:STDOUT: %I.ref.loc20: %.1 = name_ref I, @HasI.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc20: %I.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%I.2] +// CHECK:STDOUT: %I.call.loc20: init %empty_tuple.type = call %.loc20() // CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e -// CHECK:STDOUT: %I.ref.loc21: %.2 = name_ref I, @HasI.%.loc5 [template = constants.%.3] -// CHECK:STDOUT: %.loc21: %I.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%I.2] -// CHECK:STDOUT: %I.call.loc21: init %.1 = call %.loc21() +// CHECK:STDOUT: %I.ref.loc21: %.1 = name_ref I, @HasI.%.loc5 [template = constants.%.2] +// CHECK:STDOUT: %.loc21: %I.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%I.2] +// CHECK:STDOUT: %I.call.loc21: init %empty_tuple.type = call %.loc21() // CHECK:STDOUT: %E.ref.loc22: type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %J.ref.loc22: %J.type = name_ref J, @B.%J.decl [template = constants.%J] -// CHECK:STDOUT: %J.call.loc22: init %.1 = call %J.ref.loc22() +// CHECK:STDOUT: %J.call.loc22: init %empty_tuple.type = call %J.ref.loc22() // CHECK:STDOUT: %e.ref.loc23: %E = name_ref e, %e // CHECK:STDOUT: %J.ref.loc23: %J.type = name_ref J, @B.%J.decl [template = constants.%J] -// CHECK:STDOUT: %J.call.loc23: init %.1 = call %J.ref.loc23() +// CHECK:STDOUT: %J.call.loc23: init %empty_tuple.type = call %J.ref.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -623,28 +623,28 @@ fn P(o: O) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %K.type.1: type = fn_type @K.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %K.1: %K.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %HasK.type: type = interface_type @HasK [template] // CHECK:STDOUT: %Self: %HasK.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type.2: type = fn_type @K.2 [template] // CHECK:STDOUT: %K.2: %K.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasK.type, %K.type.2 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @HasK.%K.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %HasK.type, %K.type.2 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasK.%K.decl [template] // CHECK:STDOUT: %L: type = class_type @L [template] -// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type %L, %Base [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %L, %Base [template] // CHECK:STDOUT: %K.type.3: type = fn_type @K.3 [template] // CHECK:STDOUT: %K.3: %K.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%K.3) [template] -// CHECK:STDOUT: %.9: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %.7: = interface_witness (%K.3) [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] // CHECK:STDOUT: %M.type: type = fn_type @M [template] // CHECK:STDOUT: %M: %M.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %.6} [template] -// CHECK:STDOUT: %.12: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.5} [template] +// CHECK:STDOUT: %.11: type = ptr_type %.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -679,7 +679,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasK { // CHECK:STDOUT: %Self: %HasK.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %K.decl: %K.type.2 = fn_decl @K.2 [template = constants.%K.2] {} {} -// CHECK:STDOUT: %.loc9: %.4 = assoc_entity element0, %K.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %K.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -689,7 +689,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasK.ref { // CHECK:STDOUT: %K.decl: %K.type.3 = fn_decl @K.3 [template = constants.%K.3] {} {} -// CHECK:STDOUT: %.loc14: = interface_witness (%K.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc14: = interface_witness (%K.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl @@ -698,7 +698,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %K.decl: %K.type.1 = fn_decl @K.1 [template = constants.%K.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -707,12 +707,12 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: class @L { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc13: %.7 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc13: %.6 = base_decl %Base, element0 [template] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%L [template = constants.%L] // CHECK:STDOUT: %HasK.ref: type = name_ref HasK, file.%HasK.decl [template = constants.%HasK.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.9 [template = constants.%.10] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%L @@ -754,39 +754,39 @@ fn P(o: O) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %NBase: type = class_type @NBase [template] // CHECK:STDOUT: %N.type.1: type = fn_type @N.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %N.1: %N.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %HasN1.type: type = interface_type @HasN1 [template] // CHECK:STDOUT: %Self.1: %HasN1.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %N.type.2: type = fn_type @N.2 [template] // CHECK:STDOUT: %N.2: %N.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %HasN1.type, %N.type.2 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @HasN1.%N.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %HasN1.type, %N.type.2 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasN1.%N.decl [template] // CHECK:STDOUT: %HasN2.type: type = interface_type @HasN2 [template] // CHECK:STDOUT: %Self.2: %HasN2.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %N.type.3: type = fn_type @N.3 [template] // CHECK:STDOUT: %N.3: %N.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %HasN2.type, %N.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @HasN2.%N.decl [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %HasN2.type, %N.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @HasN2.%N.decl [template] // CHECK:STDOUT: %O: type = class_type @O [template] -// CHECK:STDOUT: %.8: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.9: type = unbound_element_type %O, %NBase [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %O, %NBase [template] // CHECK:STDOUT: %N.type.4: type = fn_type @N.4 [template] // CHECK:STDOUT: %N.4: %N.type.4 = struct_value () [template] -// CHECK:STDOUT: %.10: = interface_witness (%N.4) [template] +// CHECK:STDOUT: %.9: = interface_witness (%N.4) [template] // CHECK:STDOUT: %N.type.5: type = fn_type @N.5 [template] // CHECK:STDOUT: %N.5: %N.type.5 = struct_value () [template] -// CHECK:STDOUT: %.11: = interface_witness (%N.5) [template] +// CHECK:STDOUT: %.10: = interface_witness (%N.5) [template] // CHECK:STDOUT: %N.type.6: type = fn_type @N.6 [template] // CHECK:STDOUT: %N.6: %N.type.6 = struct_value () [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: %NBase} [template] -// CHECK:STDOUT: %.13: = complete_type_witness %.12 [template] +// CHECK:STDOUT: %.11: type = struct_type {.base: %NBase} [template] +// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] // CHECK:STDOUT: %P.type: type = fn_type @P [template] // CHECK:STDOUT: %P: %P.type = struct_value () [template] -// CHECK:STDOUT: %.14: type = struct_type {.base: %.8} [template] -// CHECK:STDOUT: %.15: type = ptr_type %.12 [template] +// CHECK:STDOUT: %.13: type = struct_type {.base: %.7} [template] +// CHECK:STDOUT: %.14: type = ptr_type %.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -823,7 +823,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasN1 { // CHECK:STDOUT: %Self: %HasN1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %N.decl: %N.type.2 = fn_decl @N.2 [template = constants.%N.2] {} {} -// CHECK:STDOUT: %.loc9: %.4 = assoc_entity element0, %N.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element0, %N.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -834,7 +834,7 @@ fn P(o: O) { // CHECK:STDOUT: interface @HasN2 { // CHECK:STDOUT: %Self: %HasN2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %N.decl: %N.type.3 = fn_decl @N.3 [template = constants.%N.3] {} {} -// CHECK:STDOUT: %.loc13: %.6 = assoc_entity element0, %N.decl [template = constants.%.7] +// CHECK:STDOUT: %.loc13: %.5 = assoc_entity element0, %N.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -844,7 +844,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasN1.ref { // CHECK:STDOUT: %N.decl: %N.type.4 = fn_decl @N.4 [template = constants.%N.4] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%N.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc18: = interface_witness (%N.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl @@ -853,7 +853,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasN2.ref { // CHECK:STDOUT: %N.decl: %N.type.5 = fn_decl @N.5 [template = constants.%N.5] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%N.decl) [template = constants.%.11] +// CHECK:STDOUT: %.loc21: = interface_witness (%N.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl @@ -862,7 +862,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: class @NBase { // CHECK:STDOUT: %N.decl: %N.type.1 = fn_decl @N.1 [template = constants.%N.1] {} {} -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NBase @@ -871,7 +871,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: class @O { // CHECK:STDOUT: %NBase.ref: type = name_ref NBase, file.%NBase.decl [template = constants.%NBase] -// CHECK:STDOUT: %.loc17: %.9 = base_decl %NBase, element0 [template] +// CHECK:STDOUT: %.loc17: %.8 = base_decl %NBase, element0 [template] // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%O [template = constants.%O] // CHECK:STDOUT: %HasN1.ref: type = name_ref HasN1, file.%HasN1.decl [template = constants.%HasN1.type] @@ -881,7 +881,7 @@ fn P(o: O) { // CHECK:STDOUT: %HasN2.ref: type = name_ref HasN2, file.%HasN2.decl [template = constants.%HasN2.type] // CHECK:STDOUT: } // CHECK:STDOUT: %N.decl: %N.type.6 = fn_decl @N.6 [template = constants.%N.6] {} {} -// CHECK:STDOUT: %.loc25: = complete_type_witness %.12 [template = constants.%.13] +// CHECK:STDOUT: %.loc25: = complete_type_witness %.11 [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%O @@ -923,10 +923,10 @@ fn P(o: O) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %O.ref.loc28: type = name_ref O, file.%O.decl [template = constants.%O] // CHECK:STDOUT: %N.ref.loc28: %N.type.6 = name_ref N, @O.%N.decl [template = constants.%N.6] -// CHECK:STDOUT: %N.call.loc28: init %.1 = call %N.ref.loc28() +// CHECK:STDOUT: %N.call.loc28: init %empty_tuple.type = call %N.ref.loc28() // CHECK:STDOUT: %o.ref: %O = name_ref o, %o // CHECK:STDOUT: %N.ref.loc29: %N.type.6 = name_ref N, @O.%N.decl [template = constants.%N.6] -// CHECK:STDOUT: %N.call.loc29: init %.1 = call %N.ref.loc29() +// CHECK:STDOUT: %N.call.loc29: init %empty_tuple.type = call %N.ref.loc29() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index 7ece4eaa3a4b..3d74c2c82a49 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -24,16 +24,16 @@ impl C as Simple { // CHECK:STDOUT: %Simple.type: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,7 +52,7 @@ impl C as Simple { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -62,7 +62,7 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -70,7 +70,7 @@ impl C as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon index d359c2da3684..13d248c3b6e0 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon @@ -32,8 +32,8 @@ impl AC as AI {} // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon index e0fa37c51126..ae4cf1f7aa89 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon @@ -21,8 +21,8 @@ impl true as I {} // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.1: bool = bool_literal true [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,7 +46,7 @@ impl true as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: as %I.ref { -// CHECK:STDOUT: %.loc16_16: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc16_16: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc16_16 diff --git a/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon b/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon index 07f5a6967d18..91bd1a6375d9 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_undefined_interface.carbon @@ -41,7 +41,7 @@ impl C as J {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -70,7 +70,7 @@ impl C as J {} // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index 3fb9eaee6fe8..11a1fd93c0be 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -85,8 +85,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %T.4: %L.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.4: %L.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.patt.5: %I.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] // CHECK:STDOUT: %T.patt.6: %J.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.patt.7: %K.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.patt.8: %L.type = symbolic_binding_pattern T, 0 [symbolic] @@ -278,7 +278,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc18_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_36 @@ -292,7 +292,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc19_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc19_36 @@ -306,7 +306,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc20_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc20_36 @@ -320,7 +320,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc21_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc21_36 @@ -376,8 +376,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: %I.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] // CHECK:STDOUT: %T.patt.2: %I.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -453,12 +453,12 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] -// CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.4: i32 = int_value 0 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%C, %C) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C, %C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -475,10 +475,10 @@ impl (C, C).0 as I {} // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref.loc14_7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc14_10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc14_11.1: %.3 = tuple_literal (%C.ref.loc14_7, %C.ref.loc14_10) -// CHECK:STDOUT: %.loc14_13: i32 = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%C.ref.loc14_7, %C.ref.loc14_10) [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_11.2: %.3 = converted %.loc14_11.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_11.1: %tuple.type = tuple_literal (%C.ref.loc14_7, %C.ref.loc14_10) +// CHECK:STDOUT: %.loc14_13: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C.ref.loc14_7, %C.ref.loc14_10) [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_11.2: %tuple.type = converted %.loc14_11.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %.loc14_12: type = tuple_access %.loc14_11.2, element0 [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } @@ -493,14 +493,14 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %I.ref { -// CHECK:STDOUT: %.loc13: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc13: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %.loc14_12 as %I.ref { -// CHECK:STDOUT: %.loc14_20: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc14_20: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14_20 diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index b00fbcc1a823..fe88f14912c0 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -46,15 +46,15 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.patt.3: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [symbolic] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.3) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -88,8 +88,8 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc8_32.1: type = ptr_type %T [symbolic = %.loc8_32.2 (constants.%.4)] -// CHECK:STDOUT: %I.type.loc8_30.1: type = interface_type @I, @I(constants.%.4) [symbolic = %I.type.loc8_30.2 (constants.%I.type.3)] +// CHECK:STDOUT: %.loc8_32.1: type = ptr_type %T [symbolic = %.loc8_32.2 (constants.%.3)] +// CHECK:STDOUT: %I.type.loc8_30.1: type = interface_type @I, @I(constants.%.3) [symbolic = %I.type.loc8_30.2 (constants.%I.type.3)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } @@ -123,13 +123,13 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: generic impl @impl.2(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt.3)] -// CHECK:STDOUT: %.loc8_32.2: type = ptr_type @impl.2.%T.loc8_14.2 (%T) [symbolic = %.loc8_32.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_32.2: type = ptr_type @impl.2.%T.loc8_14.2 (%T) [symbolic = %.loc8_32.2 (constants.%.3)] // CHECK:STDOUT: %I.type.loc8_30.2: type = interface_type @I, @I(%.loc8_32.2) [symbolic = %I.type.loc8_30.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_30.1 { -// CHECK:STDOUT: %.loc8_35: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: %.loc8_35: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc8_35 @@ -164,9 +164,9 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.type.loc7_30.2 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.4) { -// CHECK:STDOUT: %T.loc5_13.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%.4 +// CHECK:STDOUT: specific @I(constants.%.3) { +// CHECK:STDOUT: %T.loc5_13.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3 @@ -174,14 +174,14 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.2.%.loc8_32.2) { -// CHECK:STDOUT: %T.loc5_13.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%.4 +// CHECK:STDOUT: %T.loc5_13.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T -// CHECK:STDOUT: %.loc8_32.2 => constants.%.4 +// CHECK:STDOUT: %.loc8_32.2 => constants.%.3 // CHECK:STDOUT: %I.type.loc8_30.2 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -190,19 +190,19 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.3) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.5: = interface_witness () [template] +// CHECK:STDOUT: %.4: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -257,7 +257,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.5 as imports.%import_ref.6 { -// CHECK:STDOUT: %.loc4: = interface_witness () [template = constants.%.5] +// CHECK:STDOUT: %.loc4: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc4 @@ -267,7 +267,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: generic impl @impl.2(constants.%T: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.1)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T (%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T (%T) [symbolic = %.1 (constants.%.3)] // CHECK:STDOUT: %I.type: type = interface_type @I, @I(%.1) [symbolic = %I.type (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -308,20 +308,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.type.1 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.4) { -// CHECK:STDOUT: %T => constants.%.4 -// CHECK:STDOUT: %T.patt => constants.%.4 +// CHECK:STDOUT: specific @I(constants.%.3) { +// CHECK:STDOUT: %T => constants.%.3 +// CHECK:STDOUT: %T.patt => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T => constants.%.4 -// CHECK:STDOUT: %T.patt => constants.%.4 +// CHECK:STDOUT: %T => constants.%.3 +// CHECK:STDOUT: %T.patt => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %.1 => constants.%.3 // CHECK:STDOUT: %I.type => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -330,17 +330,17 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.3) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -367,8 +367,8 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc11: type = ptr_type %T [symbolic = constants.%.4] -// CHECK:STDOUT: %I.type.loc11: type = interface_type @I, @I(constants.%.4) [symbolic = constants.%I.type.3] +// CHECK:STDOUT: %.loc11: type = ptr_type %T [symbolic = constants.%.3] +// CHECK:STDOUT: %I.type.loc11: type = interface_type @I, @I(constants.%.3) [symbolic = constants.%I.type.3] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: } @@ -400,7 +400,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: generic impl @impl.2(constants.%T: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.1)] -// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %.1 (constants.%.3)] // CHECK:STDOUT: %I.type.1: type = interface_type @I, @I(%.1) [symbolic = %I.type.1 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -437,20 +437,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.4) { -// CHECK:STDOUT: %T => constants.%.4 -// CHECK:STDOUT: %T.patt => constants.%.4 +// CHECK:STDOUT: specific @I(constants.%.3) { +// CHECK:STDOUT: %T => constants.%.3 +// CHECK:STDOUT: %T.patt => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@impl.2.%.1) { -// CHECK:STDOUT: %T => constants.%.4 -// CHECK:STDOUT: %T.patt => constants.%.4 +// CHECK:STDOUT: %T => constants.%.3 +// CHECK:STDOUT: %T.patt => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %.1 => constants.%.3 // CHECK:STDOUT: %I.type.1 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 5f4f49cd1454..3be1181addc6 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -36,10 +36,10 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,7 +75,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %return.param: ref @Op.%Self (%Self) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @Op.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %Op.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -96,25 +96,25 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.2: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//a, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.3 = import_ref Main//a, inst+32, loaded [template = constants.%.4] +// CHECK:STDOUT: %import_ref.3: %.2 = import_ref Main//a, inst+32, loaded [template = constants.%.3] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Main//a, inst+26, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+26, unloaded // CHECK:STDOUT: } @@ -126,30 +126,30 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %y.patt: %.1 = binding_pattern y -// CHECK:STDOUT: %y.param_patt: %.1 = value_param_pattern %y.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %y.patt: %empty_tuple.type = binding_pattern y +// CHECK:STDOUT: %y.param_patt: %empty_tuple.type = value_param_pattern %y.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_24.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param -// CHECK:STDOUT: %y.param: %.1 = value_param runtime_param1 -// CHECK:STDOUT: %y: %.1 = bind_name y, %y.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_24.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param +// CHECK:STDOUT: %y.param: %empty_tuple.type = value_param runtime_param1 +// CHECK:STDOUT: %y: %empty_tuple.type = bind_name y, %y.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -162,35 +162,35 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc6_7.2 as %Add.ref { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: %.1 = binding_pattern other -// CHECK:STDOUT: %other.param_patt: %.1 = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: %empty_tuple.type = binding_pattern other +// CHECK:STDOUT: %other.param_patt: %empty_tuple.type = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%.1] -// CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%.1] -// CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%.1] -// CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %.1 = value_param runtime_param1 -// CHECK:STDOUT: %other: %.1 = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param +// CHECK:STDOUT: %other.param: %empty_tuple.type = value_param runtime_param1 +// CHECK:STDOUT: %other: %empty_tuple.type = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.2] +// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl // CHECK:STDOUT: witness = %.loc6_16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[%self.param_patt: %.1](%other.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @Op.1[%self.param_patt: %empty_tuple.type](%other.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_52: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_53: %.1 = converted %.loc7_52, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_52: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_53: %empty_tuple.type = converted %.loc7_52, %empty_tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc7_53 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -200,19 +200,19 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self)](%other.param_patt: @Op.2.%Self (%Self)) -> @Op.2.%Self (%Self); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%x.param_patt: %.1, %y.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @F(%x.param_patt: %empty_tuple.type, %y.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.1 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] -// CHECK:STDOUT: %Op.ref: %.3 = name_ref Op, imports.%import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.2 = name_ref Op, imports.%import_ref.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc11_11.2: = bound_method %x.ref, %.loc11_11.1 -// CHECK:STDOUT: %y.ref: %.1 = name_ref y, %y -// CHECK:STDOUT: %Op.call: init %.1 = call %.loc11_11.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc11_20.1: ref %.1 = temporary_storage -// CHECK:STDOUT: %.loc11_20.2: ref %.1 = temporary %.loc11_20.1, %Op.call -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_23: %.1 = converted %Op.call, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %y.ref: %empty_tuple.type = name_ref y, %y +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc11_11.2(%x.ref, %y.ref) +// CHECK:STDOUT: %.loc11_20.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc11_20.2: ref %empty_tuple.type = temporary %.loc11_20.1, %Op.call +// CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_23: %empty_tuple.type = converted %Op.call, %tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc11_23 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -220,7 +220,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.2(constants.%.1) { -// CHECK:STDOUT: %Self => constants.%.1 +// CHECK:STDOUT: specific @Op.2(constants.%empty_tuple.type) { +// CHECK:STDOUT: %Self => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon index 21bb001eb1eb..560cf1c1afef 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -45,21 +45,21 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,7 +91,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc7: %.4 = assoc_entity element0, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc7: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -107,11 +107,11 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_34.2: = interface_witness (%F) [symbolic = %.loc10_34.2 (constants.%.6)] +// CHECK:STDOUT: %.loc10_34.2: = interface_witness (%F) [symbolic = %.loc10_34.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc10_25.1 as %I.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc10_34.1: = interface_witness (%F.decl) [symbolic = %.loc10_34.2 (constants.%.6)] +// CHECK:STDOUT: %.loc10_34.1: = interface_witness (%F.decl) [symbolic = %.loc10_34.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -126,7 +126,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc4: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc4: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -167,7 +167,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_34.2 => constants.%.6 +// CHECK:STDOUT: %.loc10_34.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} @@ -184,29 +184,29 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.2) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.1) [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C.3 = struct_value () [template] // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.2) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.1) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.9: = specific_function %F.3, @F.2(%.2) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.8: = specific_function %F.3, @F.2(%.1) [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] // CHECK:STDOUT: } @@ -216,12 +216,12 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %import_ref.2: type = import_ref Main//import_generic, inst+17, loaded [template = constants.%I.type] // CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst+13, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//import_generic, inst+19, unloaded -// CHECK:STDOUT: %import_ref.5: %.5 = import_ref Main//import_generic, inst+25, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: %.4 = import_ref Main//import_generic, inst+25, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.6 = import_ref Main//import_generic, inst+21, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//import_generic, inst+21, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, inst+33, loaded [symbolic = @impl.%C (constants.%C.2)] // CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, inst+34, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.10: = import_ref Main//import_generic, inst+43, loaded [symbolic = @impl.%.1 (constants.%.7)] +// CHECK:STDOUT: %import_ref.10: = import_ref Main//import_generic, inst+43, loaded [symbolic = @impl.%.1 (constants.%.6)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -233,9 +233,9 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_11: %.2 = struct_literal () -// CHECK:STDOUT: %.loc6_9: type = converted %.loc6_11, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.2) [template = constants.%C.3] +// CHECK:STDOUT: %.loc6_11: %.1 = struct_literal () +// CHECK:STDOUT: %.loc6_9: type = converted %.loc6_11, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.1) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var // CHECK:STDOUT: %F.decl: %F.type.4 = fn_decl @F.3 [template = constants.%F.4] { @@ -244,12 +244,12 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %c.ref: ref %C.3 = name_ref c, file.%c // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.2 [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc15_12.1: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc15_12.2: = specific_function %.loc15_12.1, @F.2(constants.%.2) [template = constants.%.9] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc15_12.2() -// CHECK:STDOUT: %.loc15_18.1: ref %.1 = temporary_storage -// CHECK:STDOUT: %.loc15_18.2: ref %.1 = temporary %.loc15_18.1, %F.call +// CHECK:STDOUT: %F.ref: %.4 = name_ref F, imports.%import_ref.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_12.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc15_12.2: = specific_function %.loc15_12.1, @F.2(constants.%.1) [template = constants.%.8] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc15_12.2() +// CHECK:STDOUT: %.loc15_18.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc15_18.2: ref %empty_tuple.type = temporary %.loc15_18.1, %F.call // CHECK:STDOUT: %.loc15_19: type = converted %F.call, [template = ] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param @@ -271,7 +271,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.1: = interface_witness (%F) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.1: = interface_witness (%F) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -308,7 +308,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_17.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc6_17.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc6_17.2: init %C.3 = class_init (), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_18: init %C.3 = converted %.loc6_17.1, %.loc6_17.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_18 @@ -320,9 +320,9 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.2) { -// CHECK:STDOUT: %T => constants.%.2 -// CHECK:STDOUT: %T.patt => constants.%.2 +// CHECK:STDOUT: specific @C(constants.%.1) { +// CHECK:STDOUT: %T => constants.%.1 +// CHECK:STDOUT: %T.patt => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -342,7 +342,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(@impl.%T) { @@ -353,18 +353,18 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.2) { -// CHECK:STDOUT: %T => constants.%.2 -// CHECK:STDOUT: %T.patt => constants.%.2 +// CHECK:STDOUT: specific @impl(constants.%.1) { +// CHECK:STDOUT: %T => constants.%.1 +// CHECK:STDOUT: %T.patt => constants.%.1 // CHECK:STDOUT: %C => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.2) { +// CHECK:STDOUT: specific @F.2(constants.%.1) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 873753c5598d..5403b05cf5df 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -84,17 +84,17 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic] // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Action.%Op.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Action.%Op.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template] @@ -102,12 +102,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.1, @Action(%B) [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @Action.%Op.decl [template] -// CHECK:STDOUT: %.8: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @Action.%Op.decl [template] +// CHECK:STDOUT: %.7: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -153,13 +153,13 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T.loc4_18.2) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.loc5_10.2: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.loc5_10.2 (constants.%.2)] -// CHECK:STDOUT: %.loc5_10.3: @Action.%.loc5_10.2 (%.2) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_10.2: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.loc5_10.2 (constants.%.1)] +// CHECK:STDOUT: %.loc5_10.3: @Action.%.loc5_10.2 (%.1) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Op.decl: @Action.%Op.type (%Op.type.1) = fn_decl @Op.1 [symbolic = @Action.%Op (constants.%Op.1)] {} {} -// CHECK:STDOUT: %.loc5_10.1: @Action.%.loc5_10.2 (%.2) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_10.1: @Action.%.loc5_10.2 (%.1) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -170,7 +170,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %A.ref as %Action.type { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] {} {} -// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -178,21 +178,21 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc10: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -214,10 +214,10 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3] -// CHECK:STDOUT: %.loc16_26: %.6 = specific_constant @Action.%.loc5_10.1, @Action(constants.%B) [template = constants.%.7] -// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, %.loc16_26 [template = constants.%.7] -// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %Op.call: init %.1 = call %.loc16_15() +// CHECK:STDOUT: %.loc16_26: %.5 = specific_constant @Action.%.loc5_10.1, @Action(constants.%B) [template = constants.%.6] +// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, %.loc16_26 [template = constants.%.6] +// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc16_15() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -242,8 +242,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Op.type => constants.%Op.type.3 // CHECK:STDOUT: %Op => constants.%Op.3 -// CHECK:STDOUT: %.loc5_10.2 => constants.%.6 -// CHECK:STDOUT: %.loc5_10.3 => constants.%.7 +// CHECK:STDOUT: %.loc5_10.2 => constants.%.5 +// CHECK:STDOUT: %.loc5_10.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%B, constants.%A) {} @@ -255,7 +255,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic] @@ -266,19 +266,19 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.1, @Action(%B) [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: %.3 = assoc_entity element0, imports.%import_ref.17 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -289,12 +289,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+60, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+34, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+14, unloaded -// CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.4) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.3) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//action, inst+16, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+29, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+39, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+42, loaded [template = constants.%Action.type.3] -// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+52, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+52, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+45, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+16, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref Main//action, inst+16, unloaded @@ -331,8 +331,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @Action.%.1 (%.4) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @Action.%.1 (%.3) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -369,10 +369,10 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B] // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3] -// CHECK:STDOUT: %.loc4_26: %.6 = specific_constant imports.%import_ref.8, @Action(constants.%B) [template = constants.%.7] -// CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, %.loc4_26 [template = constants.%.7] -// CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc4_15() +// CHECK:STDOUT: %.loc4_26: %.5 = specific_constant imports.%import_ref.8, @Action(constants.%B) [template = constants.%.6] +// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, %.loc4_26 [template = constants.%.6] +// CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc4_15() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -392,8 +392,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.2 // CHECK:STDOUT: %Op => constants.%Op.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(@Action.%T) { @@ -410,7 +410,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic] @@ -421,22 +421,22 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op, @Action(%T) [symbolic] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op, @Action(%B) [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Action.type.4: type = interface_type @Action, @Action(%C) [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op, @Action(%C) [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Action.type.4, %Op.type.3 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.15 [template] -// CHECK:STDOUT: %.11: %.4 = assoc_entity element0, imports.%import_ref.18 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Action.type.4, %Op.type.3 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.10: %.3 = assoc_entity element0, imports.%import_ref.18 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -447,7 +447,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+60, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+34, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+14, unloaded -// CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.4) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.11)] +// CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.3) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.9 = import_ref Main//action, inst+16, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+29, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+39, loaded [template = constants.%A] @@ -490,8 +490,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Op.type: type = fn_type @Op, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)] // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @Action.%.1 (%.4) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @Action.%.1 (%.3) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -533,8 +533,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.4 [template = constants.%C] // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%C) [template = constants.%Action.type.4] -// CHECK:STDOUT: %.loc8: %.9 = specific_constant imports.%import_ref.8, @Action(constants.%C) [template = constants.%.10] -// CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, %.loc8 [template = constants.%.10] +// CHECK:STDOUT: %.loc8: %.8 = specific_constant imports.%import_ref.8, @Action(constants.%C) [template = constants.%.9] +// CHECK:STDOUT: %Op.ref: %.8 = name_ref Op, %.loc8 [template = constants.%.9] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -552,8 +552,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.2 // CHECK:STDOUT: %Op => constants.%Op.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(@Action.%T) { @@ -572,8 +572,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Op.type => constants.%Op.type.3 // CHECK:STDOUT: %Op => constants.%Op.3 -// CHECK:STDOUT: %.1 => constants.%.9 -// CHECK:STDOUT: %.2 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- factory.carbon @@ -582,26 +582,26 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic] // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Factory.%Make.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Factory.%Make.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.1, @Factory(%B) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @Factory.%Make.decl [template] -// CHECK:STDOUT: %.8: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @Factory.%Make.decl [template] +// CHECK:STDOUT: %.7: = interface_witness (%Make.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -636,8 +636,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T.loc4_19.2) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.loc5_17.2: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.loc5_17.2 (constants.%.2)] -// CHECK:STDOUT: %.loc5_17.3: @Factory.%.loc5_17.2 (%.2) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_17.2: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.loc5_17.2 (constants.%.1)] +// CHECK:STDOUT: %.loc5_17.3: @Factory.%.loc5_17.2 (%.1) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -649,7 +649,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.param: ref @Make.1.%T (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_17.1: @Factory.%.loc5_17.2 (%.2) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_17.1: @Factory.%.loc5_17.2 (%.1) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -667,7 +667,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.param: ref %B = out_param runtime_param0 // CHECK:STDOUT: %return: ref %B = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl @@ -675,14 +675,14 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc8: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc9: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -719,8 +719,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.loc5_17.2 => constants.%.6 -// CHECK:STDOUT: %.loc5_17.3 => constants.%.7 +// CHECK:STDOUT: %.loc5_17.2 => constants.%.5 +// CHECK:STDOUT: %.loc5_17.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%B, constants.%A) { @@ -734,7 +734,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic] @@ -745,19 +745,19 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.1, @Factory(%B) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.14 [template] // CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [template] // CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: %.3 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.10: = interface_witness (%Make.3) [template] +// CHECK:STDOUT: %.9: = interface_witness (%Make.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -766,12 +766,12 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.3: type = import_ref Main//factory, inst+39, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.4 = import_ref Main//factory, inst+40, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+14, unloaded -// CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.4) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.3) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.7 = import_ref Main//factory, inst+21, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+35, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+42, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+45, loaded [template = constants.%Factory.type.3] -// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+60, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+60, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+53, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+21, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Main//factory, inst+21, unloaded @@ -811,8 +811,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @Factory.%.1 (%.4) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @Factory.%.1 (%.3) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -850,9 +850,9 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] // CHECK:STDOUT: %B.ref.loc5: type = name_ref B, imports.%import_ref.3 [template = constants.%B] // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%Factory.type.3] -// CHECK:STDOUT: %.loc5_23: %.6 = specific_constant imports.%import_ref.6, @Factory(constants.%B) [template = constants.%.7] -// CHECK:STDOUT: %Make.ref: %.6 = name_ref Make, %.loc5_23 [template = constants.%.7] -// CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%Make.3] +// CHECK:STDOUT: %.loc5_23: %.5 = specific_constant imports.%import_ref.6, @Factory(constants.%B) [template = constants.%.6] +// CHECK:STDOUT: %Make.ref: %.5 = name_ref Make, %.loc5_23 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%Make.3] // CHECK:STDOUT: %.loc4_16.2: ref %B = splice_block %return {} // CHECK:STDOUT: %Make.call: init %B = call %.loc5_11() to %.loc4_16.2 // CHECK:STDOUT: return %Make.call to %return @@ -874,8 +874,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(@Factory.%T) { @@ -894,7 +894,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic] @@ -905,22 +905,22 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make, @Factory(%T) [symbolic] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make, @Factory(%B) [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.14 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: %Factory.type.4: type = interface_type @Factory, @Factory(%C) [template] // CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Factory(%C) [template] // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Factory.type.4, %Make.type.3 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.13 [template] -// CHECK:STDOUT: %.11: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Factory.type.4, %Make.type.3 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.10: %.3 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -929,7 +929,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.3 = import_ref Main//factory, inst+39, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//factory, inst+40, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+14, unloaded -// CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.4) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%.2 (constants.%.11)] +// CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.3) = import_ref Main//factory, inst+26, loaded [symbolic = @Factory.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.7 = import_ref Main//factory, inst+21, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+35, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+42, loaded [template = constants.%A] @@ -976,8 +976,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @Factory.%.1 (%.4) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @Factory.%.1 (%.3) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1022,8 +1022,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%C) [template = constants.%Factory.type.4] -// CHECK:STDOUT: %.loc10: %.9 = specific_constant imports.%import_ref.6, @Factory(constants.%C) [template = constants.%.10] -// CHECK:STDOUT: %Make.ref: %.9 = name_ref Make, %.loc10 [template = constants.%.10] +// CHECK:STDOUT: %.loc10: %.8 = specific_constant imports.%import_ref.6, @Factory(constants.%C) [template = constants.%.9] +// CHECK:STDOUT: %Make.ref: %.8 = name_ref Make, %.loc10 [template = constants.%.9] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1041,8 +1041,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.2 // CHECK:STDOUT: %Make => constants.%Make.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(@Factory.%T) { @@ -1063,7 +1063,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 -// CHECK:STDOUT: %.1 => constants.%.9 -// CHECK:STDOUT: %.2 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon index 1c51fd3db03a..62e74b80718c 100644 --- a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon @@ -84,7 +84,7 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = interface_type @A [template] // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -93,8 +93,8 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%A.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -114,14 +114,14 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = interface_type @A [template] // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//decl_in_api_definition_in_impl, inst+1, loaded [template = constants.%A.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_in_api_definition_in_impl, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_definition_in_impl, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_definition_in_impl, inst+7, loaded [template = constants.%empty_tuple.type] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_definition_in_impl, inst+8, loaded [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -132,13 +132,13 @@ impl () as D; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc4_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref.loc4: type = name_ref A, imports.%import_ref.1 [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref.loc6: type = name_ref A, imports.%import_ref.1 [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -150,7 +150,7 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: imports.%import_ref.3 as imports.%import_ref.4 { -// CHECK:STDOUT: %.loc6_14: = interface_witness () [template = constants.%.2] +// CHECK:STDOUT: %.loc6_14: = interface_witness () [template = constants.%.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc6_14 @@ -181,7 +181,7 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = interface_type @B [template] // CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -190,8 +190,8 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: type = interface_decl @B [template = constants.%B.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -211,13 +211,13 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = interface_type @B [template] // CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//decl_only_in_api, inst+1, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_only_in_api, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_only_in_api, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_only_in_api, inst+7, loaded [template = constants.%empty_tuple.type] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_only_in_api, inst+8, loaded [template = constants.%B.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -242,7 +242,7 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = interface_type @C [template] // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -251,8 +251,8 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = interface_decl @C [template = constants.%C.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc6_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -272,13 +272,13 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = interface_type @C [template] // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//decl_in_api_decl_in_impl, inst+1, loaded [template = constants.%C.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//decl_in_api_decl_in_impl, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_decl_in_impl, inst+7, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.3: type = import_ref Main//decl_in_api_decl_in_impl, inst+7, loaded [template = constants.%empty_tuple.type] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//decl_in_api_decl_in_impl, inst+8, loaded [template = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -289,8 +289,8 @@ impl () as D; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc8_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -314,7 +314,7 @@ impl () as D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %D.type: type = interface_type @D [template] // CHECK:STDOUT: %Self: %D.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -325,8 +325,8 @@ impl () as D; // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %D.decl: type = interface_decl @D [template = constants.%D.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc9_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D.type] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon index 2a66fc4e9696..ccdfd9131aae 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -28,18 +28,18 @@ class A { // CHECK:STDOUT: %DefaultConstructible.type: type = interface_type @DefaultConstructible [template] // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%Make.2) [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.5: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -66,7 +66,7 @@ class A { // CHECK:STDOUT: %return.param: ref @Make.1.%Self (%Self) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.1.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %Make.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %Make.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -83,7 +83,7 @@ class A { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl @@ -91,7 +91,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -102,7 +102,7 @@ class A { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %DefaultConstructible.ref: type = name_ref DefaultConstructible, file.%DefaultConstructible.decl [template = constants.%DefaultConstructible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -116,7 +116,7 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @Make.2() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_33.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc21_33.1: %.3 = struct_literal () // CHECK:STDOUT: %.loc21_33.2: init %C = class_init (), %return [template = constants.%struct] // CHECK:STDOUT: %.loc21_34: init %C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc21_34 to %return diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index de8fcf31a4ba..125136c214b7 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -42,45 +42,45 @@ impl D as SelfNested { // CHECK:STDOUT: %UseSelf.type: type = interface_type @UseSelf [template] // CHECK:STDOUT: %Self.1: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] // CHECK:STDOUT: %struct.1: %C = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] // CHECK:STDOUT: %struct.2: %D = struct_value () [template] // CHECK:STDOUT: %SelfNested.type: type = interface_type @SelfNested [template] // CHECK:STDOUT: %Self.2: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.9: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.10: type = struct_type {.x: %Self.2, .y: %.1} [symbolic] -// CHECK:STDOUT: %.11: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.12: type = tuple_type (%.9, %.10) [symbolic] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.9: type = struct_type {.x: %Self.2, .y: %empty_tuple.type} [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.8, %.9) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %SelfNested.type, %F.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, @SelfNested.%F.decl [template] -// CHECK:STDOUT: %.15: type = ptr_type %C [template] -// CHECK:STDOUT: %.16: type = struct_type {.x: %C, .y: %.1} [template] -// CHECK:STDOUT: %.17: type = tuple_type (%.15, %.16) [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %SelfNested.type, %F.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.12: type = ptr_type %C [template] +// CHECK:STDOUT: %.13: type = struct_type {.x: %C, .y: %empty_tuple.type} [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.12, %.13) [template] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.18: = interface_witness (%F.5) [template] -// CHECK:STDOUT: %.19: type = ptr_type %D [template] -// CHECK:STDOUT: %.20: type = struct_type {.x: %D, .y: %.1} [template] -// CHECK:STDOUT: %.21: type = tuple_type (%.19, %.20) [template] +// CHECK:STDOUT: %.14: = interface_witness (%F.5) [template] +// CHECK:STDOUT: %.15: type = ptr_type %D [template] +// CHECK:STDOUT: %.16: type = struct_type {.x: %D, .y: %empty_tuple.type} [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.15, %.16) [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%F.6) [template] +// CHECK:STDOUT: %.17: = interface_witness (%F.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -138,7 +138,7 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self.1) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @F.1.%Self (%Self.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -149,25 +149,25 @@ impl D as SelfNested { // CHECK:STDOUT: interface @SelfNested { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type.4 = fn_decl @F.4 [template = constants.%F.4] { -// CHECK:STDOUT: %x.patt: @F.4.%.loc28_37.1 (%.12) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @F.4.%.loc28_37.1 (%.12) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @F.4.%tuple.type (%tuple.type.2) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @F.4.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc28_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_16.2: type = facet_type_access %Self.ref.loc28_12 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_16.3: type = converted %Self.ref.loc28_12, %.loc28_16.2 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.4: type = ptr_type %Self.2 [symbolic = %.loc28_16.1 (constants.%.9)] +// CHECK:STDOUT: %.loc28_16.4: type = ptr_type %Self.2 [symbolic = %.loc28_16.1 (constants.%.8)] // CHECK:STDOUT: %Self.ref.loc28_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_24.1: type = facet_type_access %Self.ref.loc28_24 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %.loc28_24.2: type = converted %Self.ref.loc28_24, %.loc28_24.1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_35.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc28_36.2: type = struct_type {.x: %Self.2, .y: %.1} [symbolic = %.loc28_36.1 (constants.%.10)] -// CHECK:STDOUT: %.loc28_37.2: %.11 = tuple_literal (%.loc28_16.4, %.loc28_36.2) -// CHECK:STDOUT: %.loc28_37.3: type = converted %.loc28_37.2, constants.%.12 [symbolic = %.loc28_37.1 (constants.%.12)] -// CHECK:STDOUT: %x.param: @F.4.%.loc28_37.1 (%.12) = value_param runtime_param0 -// CHECK:STDOUT: %x: @F.4.%.loc28_37.1 (%.12) = bind_name x, %x.param +// CHECK:STDOUT: %.loc28_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc28_36.2: type = struct_type {.x: %Self.2, .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.9)] +// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%.loc28_16.4, %.loc28_36.2) +// CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %x.param: @F.4.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %x: @F.4.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28: %.13 = assoc_entity element0, %F.decl [template = constants.%.14] +// CHECK:STDOUT: %.loc28: %.10 = assoc_entity element0, %F.decl [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -194,7 +194,7 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -220,7 +220,7 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param2 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -229,21 +229,21 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %C.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.5 = fn_decl @F.5 [template = constants.%F.5] { -// CHECK:STDOUT: %x.patt: %.17 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.17 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %tuple.type.3 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.15] +// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.12] // CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_29.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %.1} [template = constants.%.16] -// CHECK:STDOUT: %.loc32_31.1: %.11 = tuple_literal (%.loc32_13, %.loc32_30) -// CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%.17 [template = constants.%.17] -// CHECK:STDOUT: %x.param: %.17 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.17 = bind_name x, %x.param +// CHECK:STDOUT: %.loc32_29.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%.13] +// CHECK:STDOUT: %.loc32_31.1: %tuple.type.1 = tuple_literal (%.loc32_13, %.loc32_30) +// CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.18] +// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.14] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -252,21 +252,21 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %D.ref as %SelfNested.ref { // CHECK:STDOUT: %F.decl: %F.type.6 = fn_decl @F.6 [template = constants.%F.6] { -// CHECK:STDOUT: %x.patt: %.21 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.21 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %tuple.type.4 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %tuple.type.4 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.19] +// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.15] // CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_35.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %.1} [template = constants.%.20] -// CHECK:STDOUT: %.loc36_37.1: %.11 = tuple_literal (%.loc36_16, %.loc36_36) -// CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%.21 [template = constants.%.21] -// CHECK:STDOUT: %x.param: %.21 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.21 = bind_name x, %x.param +// CHECK:STDOUT: %.loc36_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%.16] +// CHECK:STDOUT: %.loc36_37.1: %tuple.type.1 = tuple_literal (%.loc36_16, %.loc36_36) +// CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %x.param: %tuple.type.4 = value_param runtime_param0 +// CHECK:STDOUT: %x: %tuple.type.4 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.22] +// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.17] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -274,14 +274,14 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -295,7 +295,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %C](%x.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_38.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc20_38.1: %.3 = struct_literal () // CHECK:STDOUT: %.loc20_38.2: init %C = class_init (), %return [template = constants.%struct.1] // CHECK:STDOUT: %.loc20_39: init %C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.1] // CHECK:STDOUT: return %.loc20_39 to %return @@ -303,7 +303,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3[%self.param_patt: %D](%x.param_patt: %D) -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24_47.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc24_47.1: %.3 = struct_literal () // CHECK:STDOUT: %.loc24_47.2: init %D = class_init (), %return [template = constants.%struct.2] // CHECK:STDOUT: %.loc24_48: init %D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc24_48 to %return @@ -311,16 +311,16 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.4(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.1: type = ptr_type @F.4.%Self (%Self.2) [symbolic = %.loc28_16.1 (constants.%.9)] -// CHECK:STDOUT: %.loc28_36.1: type = struct_type {.x: @F.4.%Self (%Self.2), .y: %.1} [symbolic = %.loc28_36.1 (constants.%.10)] -// CHECK:STDOUT: %.loc28_37.1: type = tuple_type (@F.4.%.loc28_16.1 (%.9), @F.4.%.loc28_36.1 (%.10)) [symbolic = %.loc28_37.1 (constants.%.12)] +// CHECK:STDOUT: %.loc28_16.1: type = ptr_type @F.4.%Self (%Self.2) [symbolic = %.loc28_16.1 (constants.%.8)] +// CHECK:STDOUT: %.loc28_36.1: type = struct_type {.x: @F.4.%Self (%Self.2), .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.4.%.loc28_16.1 (%.8), @F.4.%.loc28_36.1 (%.9)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param_patt: @F.4.%.loc28_37.1 (%.12)); +// CHECK:STDOUT: fn(%x.param_patt: @F.4.%tuple.type (%tuple.type.2)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.5(%x.param_patt: %.17); +// CHECK:STDOUT: fn @F.5(%x.param_patt: %tuple.type.3); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.6(%x.param_patt: %.21); +// CHECK:STDOUT: fn @F.6(%x.param_patt: %tuple.type.4); // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 @@ -336,22 +336,22 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.loc28_16.1 => constants.%.9 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.10 -// CHECK:STDOUT: %.loc28_37.1 => constants.%.12 +// CHECK:STDOUT: %.loc28_16.1 => constants.%.8 +// CHECK:STDOUT: %.loc28_36.1 => constants.%.9 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.loc28_16.1 => constants.%.15 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.16 -// CHECK:STDOUT: %.loc28_37.1 => constants.%.17 +// CHECK:STDOUT: %.loc28_16.1 => constants.%.12 +// CHECK:STDOUT: %.loc28_36.1 => constants.%.13 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%D) { // CHECK:STDOUT: %Self => constants.%D -// CHECK:STDOUT: %.loc28_16.1 => constants.%.19 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.20 -// CHECK:STDOUT: %.loc28_37.1 => constants.%.21 +// CHECK:STDOUT: %.loc28_16.1 => constants.%.15 +// CHECK:STDOUT: %.loc28_36.1 => constants.%.16 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index 3f571370b059..ddb03deee6b1 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -24,12 +24,12 @@ impl i32 as I {} // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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: %X: type = class_type @X [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,7 +75,7 @@ impl i32 as I {} // CHECK:STDOUT: impl @impl.1: %.loc13_6.2 as %I.ref.loc13; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %.loc19_6.2 as %I.ref { -// CHECK:STDOUT: %.loc19_15: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc19_15: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc19_15 @@ -88,7 +88,7 @@ impl i32 as I {} // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32.loc16, %.loc16_8.1 [template = i32] // CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 033b84119669..70d7a774325a 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -17,17 +17,17 @@ var d: i32 = a[b]; // 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 2 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 24 [template] -// CHECK:STDOUT: %.7: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %.9: i32 = int_value 1 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %.1: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: i32 = int_value 12 [template] +// CHECK:STDOUT: %.5: i32 = int_value 24 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] +// CHECK:STDOUT: %.7: i32 = int_value 1 [template] +// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,12 +49,12 @@ var d: i32 = a[b]; // 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 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_14: i32 = int_value 2 [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] @@ -76,26 +76,26 @@ var d: i32 = a[b]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_24: i32 = int_value 24 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.1: %.7 = tuple_literal (%.loc11_20, %.loc11_24) -// CHECK:STDOUT: %.loc11_26.2: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 24 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_24) +// CHECK:STDOUT: %.loc11_26.2: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26.3: ref i32 = array_index file.%a.var, %.loc11_26.2 -// CHECK:STDOUT: %.loc11_26.4: init i32 = initialize_from %.loc11_20 to %.loc11_26.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26.5: i32 = int_value 1 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_26.4: init i32 = initialize_from %.loc11_20 to %.loc11_26.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_26.5: i32 = int_value 1 [template = constants.%.7] // CHECK:STDOUT: %.loc11_26.6: ref i32 = array_index file.%a.var, %.loc11_26.5 -// CHECK:STDOUT: %.loc11_26.7: init i32 = initialize_from %.loc11_24 to %.loc11_26.6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.8: init %.3 = array_init (%.loc11_26.4, %.loc11_26.7) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] +// CHECK:STDOUT: %.loc11_26.7: init i32 = initialize_from %.loc11_24 to %.loc11_26.6 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_26.8: init %.2 = array_init (%.loc11_26.4, %.loc11_26.7) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_27: init %.2 = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 -// CHECK:STDOUT: %.loc12: i32 = int_value 1 [template = constants.%.9] +// CHECK:STDOUT: %.loc12: i32 = int_value 1 [template = constants.%.7] // CHECK:STDOUT: assign file.%b.var, %.loc12 -// CHECK:STDOUT: %a.ref.loc13: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %a.ref.loc13: ref %.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc13_17.1: ref i32 = array_index %a.ref.loc13, %.loc13_16 // CHECK:STDOUT: %.loc13_17.2: i32 = bind_value %.loc13_17.1 // CHECK:STDOUT: assign file.%c.var, %.loc13_17.2 -// CHECK:STDOUT: %a.ref.loc14: ref %.3 = name_ref a, file.%a +// CHECK:STDOUT: %a.ref.loc14: ref %.2 = name_ref a, file.%a // CHECK:STDOUT: %b.ref: ref i32 = name_ref b, file.%b // CHECK:STDOUT: %.loc14_16: i32 = bind_value %b.ref // CHECK:STDOUT: %.loc14_17.1: ref i32 = array_index %a.ref.loc14, %.loc14_16 diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 16f98e94fae4..8871ca8eaef5 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -32,22 +32,22 @@ fn ValueBinding(b: [i32; 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 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: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [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 = ptr_type i32 [template] -// CHECK:STDOUT: %.10: i32 = int_value 4 [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 = ptr_type i32 [template] +// CHECK:STDOUT: %.8: i32 = int_value 4 [template] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [template] // CHECK:STDOUT: } @@ -70,129 +70,129 @@ fn ValueBinding(b: [i32; 3]) { // 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: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.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_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 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32, %.loc11_12.1 [template = i32] -// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [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_18: type = array_type %.loc11_17, i32 [template = constants.%.2] +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %b.patt: %.3 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.3 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %.2 = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %.2 = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc13_15: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_15: i32 = int_value 3 [template = constants.%.1] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.3 = bind_name b, %b.param +// CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, i32 [template = constants.%.2] +// CHECK:STDOUT: %b.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %b: %.2 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %ValueBinding.decl: %ValueBinding.type = fn_decl @ValueBinding [template = constants.%ValueBinding] { -// CHECK:STDOUT: %b.patt: %.3 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.3 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %.2 = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %.2 = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc21_26: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc21_26: i32 = int_value 3 [template = constants.%.1] // CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_32.loc21, %.loc21_21.1 [template = i32] -// CHECK:STDOUT: %.loc21_27: type = array_type %.loc21_26, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.3 = bind_name b, %b.param +// CHECK:STDOUT: %.loc21_27: type = array_type %.loc21_26, i32 [template = constants.%.2] +// CHECK:STDOUT: %b.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %b: %.2 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.3; +// CHECK:STDOUT: fn @F() -> %.2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param_patt: %.3) { +// CHECK:STDOUT: fn @G(%b.param_patt: %.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_16: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_16: i32 = int_value 3 [template = constants.%.1] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32.loc14, %.loc14_11.1 [template = i32] -// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_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: %.loc14_22: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_28: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_29.1: %.7 = tuple_literal (%.loc14_22, %.loc14_25, %.loc14_28) -// CHECK:STDOUT: %.loc14_29.2: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_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: %.loc14_22: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_25: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_28: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_29.1: %tuple.type = tuple_literal (%.loc14_22, %.loc14_25, %.loc14_28) +// CHECK:STDOUT: %.loc14_29.2: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc14_29.3: ref i32 = array_index %a.var, %.loc14_29.2 -// CHECK:STDOUT: %.loc14_29.4: init i32 = initialize_from %.loc14_22 to %.loc14_29.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_29.5: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_29.4: init i32 = initialize_from %.loc14_22 to %.loc14_29.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_29.5: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc14_29.6: ref i32 = array_index %a.var, %.loc14_29.5 -// CHECK:STDOUT: %.loc14_29.7: init i32 = initialize_from %.loc14_25 to %.loc14_29.6 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_29.8: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc14_29.7: init i32 = initialize_from %.loc14_25 to %.loc14_29.6 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_29.8: i32 = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc14_29.9: ref i32 = array_index %a.var, %.loc14_29.8 -// CHECK:STDOUT: %.loc14_29.10: init i32 = initialize_from %.loc14_28 to %.loc14_29.9 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_29.11: init %.3 = array_init (%.loc14_29.4, %.loc14_29.7, %.loc14_29.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc14_30: init %.3 = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] +// CHECK:STDOUT: %.loc14_29.10: init i32 = initialize_from %.loc14_28 to %.loc14_29.9 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_29.11: init %.2 = array_init (%.loc14_29.4, %.loc14_29.7, %.loc14_29.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc14_30: init %.2 = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc14_30 // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_14.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_14.2: type = converted %int.make_type_32.loc17, %.loc17_14.1 [template = i32] -// CHECK:STDOUT: %.loc17_14.3: type = ptr_type i32 [template = constants.%.9] -// CHECK:STDOUT: %pa.var: ref %.9 = var pa -// CHECK:STDOUT: %pa: ref %.9 = bind_name pa, %pa.var -// CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, %a -// CHECK:STDOUT: %.loc17_21: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc17_14.3: type = ptr_type i32 [template = constants.%.7] +// CHECK:STDOUT: %pa.var: ref %.7 = var pa +// CHECK:STDOUT: %pa: ref %.7 = bind_name pa, %pa.var +// CHECK:STDOUT: %a.ref.loc17: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %.loc17_21: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc17_22: ref i32 = array_index %a.ref.loc17, %.loc17_21 -// CHECK:STDOUT: %.loc17_18: %.9 = addr_of %.loc17_22 +// CHECK:STDOUT: %.loc17_18: %.7 = addr_of %.loc17_22 // CHECK:STDOUT: assign %pa.var, %.loc17_18 -// CHECK:STDOUT: %a.ref.loc18: ref %.3 = name_ref a, %a -// CHECK:STDOUT: %.loc18_5: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %a.ref.loc18: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %.loc18_5: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc18_6: ref i32 = array_index %a.ref.loc18, %.loc18_5 -// CHECK:STDOUT: %.loc18_10: i32 = int_value 4 [template = constants.%.10] +// CHECK:STDOUT: %.loc18_10: i32 = int_value 4 [template = constants.%.8] // CHECK:STDOUT: assign %.loc18_6, %.loc18_10 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ValueBinding(%b.param_patt: %.3) { +// CHECK:STDOUT: fn @ValueBinding(%b.param_patt: %.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc22_16: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc22_16: i32 = int_value 3 [template = constants.%.1] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32.loc22, %.loc22_11.1 [template = i32] -// CHECK:STDOUT: %.loc22_17: type = array_type %.loc22_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: %.loc22_22: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc22_25: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc22_28: i32 = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc22_29.1: %.7 = tuple_literal (%.loc22_22, %.loc22_25, %.loc22_28) -// CHECK:STDOUT: %.loc22_29.2: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc22_17: type = array_type %.loc22_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: %.loc22_22: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc22_25: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc22_28: i32 = int_value 3 [template = constants.%.1] +// CHECK:STDOUT: %.loc22_29.1: %tuple.type = tuple_literal (%.loc22_22, %.loc22_25, %.loc22_28) +// CHECK:STDOUT: %.loc22_29.2: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc22_29.3: ref i32 = array_index %a.var, %.loc22_29.2 -// CHECK:STDOUT: %.loc22_29.4: init i32 = initialize_from %.loc22_22 to %.loc22_29.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc22_29.5: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc22_29.4: init i32 = initialize_from %.loc22_22 to %.loc22_29.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc22_29.5: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc22_29.6: ref i32 = array_index %a.var, %.loc22_29.5 -// CHECK:STDOUT: %.loc22_29.7: init i32 = initialize_from %.loc22_25 to %.loc22_29.6 [template = constants.%.6] -// CHECK:STDOUT: %.loc22_29.8: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc22_29.7: init i32 = initialize_from %.loc22_25 to %.loc22_29.6 [template = constants.%.5] +// CHECK:STDOUT: %.loc22_29.8: i32 = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc22_29.9: ref i32 = array_index %a.var, %.loc22_29.8 -// CHECK:STDOUT: %.loc22_29.10: init i32 = initialize_from %.loc22_28 to %.loc22_29.9 [template = constants.%.2] -// CHECK:STDOUT: %.loc22_29.11: init %.3 = array_init (%.loc22_29.4, %.loc22_29.7, %.loc22_29.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc22_30: init %.3 = converted %.loc22_29.1, %.loc22_29.11 [template = constants.%array] +// CHECK:STDOUT: %.loc22_29.10: init i32 = initialize_from %.loc22_28 to %.loc22_29.9 [template = constants.%.1] +// CHECK:STDOUT: %.loc22_29.11: init %.2 = array_init (%.loc22_29.4, %.loc22_29.7, %.loc22_29.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc22_30: init %.2 = converted %.loc22_29.1, %.loc22_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc22_30 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, %a -// CHECK:STDOUT: %.loc26_5: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %a.ref: ref %.2 = name_ref a, %a +// CHECK:STDOUT: %.loc26_5: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc26_6: ref i32 = array_index %a.ref, %.loc26_5 -// CHECK:STDOUT: %b.ref: %.3 = name_ref b, %b -// CHECK:STDOUT: %.loc27_5: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc27_6.1: ref %.3 = value_as_ref %b.ref +// CHECK:STDOUT: %b.ref: %.2 = name_ref b, %b +// CHECK:STDOUT: %.loc27_5: i32 = int_value 0 [template = constants.%.6] +// CHECK:STDOUT: %.loc27_6.1: ref %.2 = value_as_ref %b.ref // CHECK:STDOUT: %.loc27_6.2: ref i32 = array_index %.loc27_6.1, %.loc27_5 // CHECK:STDOUT: %.loc27_6.3: i32 = bind_value %.loc27_6.2 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc28_4.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc28_4.1 -// CHECK:STDOUT: %.loc28_7: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc28_4.2: ref %.3 = temporary %.loc28_4.1, %F.call +// CHECK:STDOUT: %.loc28_4.1: ref %.2 = temporary_storage +// CHECK:STDOUT: %F.call: init %.2 = call %F.ref() to %.loc28_4.1 +// CHECK:STDOUT: %.loc28_7: i32 = int_value 0 [template = constants.%.6] +// CHECK:STDOUT: %.loc28_4.2: ref %.2 = temporary %.loc28_4.1, %F.call // CHECK:STDOUT: %.loc28_8.1: ref i32 = array_index %.loc28_4.2, %.loc28_7 // CHECK:STDOUT: %.loc28_8.2: i32 = bind_value %.loc28_8.1 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index e353adf555a3..ebd960067282 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -25,16 +25,16 @@ var c: i32 = a[0x7FFF_FFFF]; // 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 12 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] -// CHECK:STDOUT: %.8: i32 = int_value 2147483647 [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 12 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.2 = tuple_value (%.4) [template] +// CHECK:STDOUT: %.6: i32 = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,12 +55,12 @@ var c: i32 = a[0x7FFF_FFFF]; // 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 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.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.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_32.loc17, %.loc17_8.1 [template = i32] @@ -77,21 +77,21 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: %.6 = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_23.2: i32 = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23.3: ref i32 = array_index file.%a.var, %.loc11_23.2 -// CHECK:STDOUT: %.loc11_23.4: init i32 = initialize_from %.loc11_20 to %.loc11_23.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.5: init %.3 = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] +// CHECK:STDOUT: %.loc11_23.4: init i32 = initialize_from %.loc11_20 to %.loc11_23.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_23.5: init %.2 = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_24: init %.2 = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc17_16: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %a.ref.loc17: ref %.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc17_16: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_17.1: ref i32 = array_index %a.ref.loc17, %.loc17_16 [template = ] // CHECK:STDOUT: %.loc17_17.2: i32 = bind_value %.loc17_17.1 // CHECK:STDOUT: assign file.%b.var, %.loc17_17.2 -// CHECK:STDOUT: %a.ref.loc22: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc22_16: i32 = int_value 2147483647 [template = constants.%.8] +// CHECK:STDOUT: %a.ref.loc22: ref %.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc22_16: i32 = int_value 2147483647 [template = constants.%.6] // CHECK:STDOUT: %.loc22_27.1: ref i32 = array_index %a.ref.loc22, %.loc22_16 [template = ] // CHECK:STDOUT: %.loc22_27.2: i32 = bind_value %.loc22_27.1 // CHECK:STDOUT: assign file.%c.var, %.loc22_27.2 diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index e1e63ab5f98b..4b0ede386bd2 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -21,16 +21,16 @@ var b: i32 = a[2.6]; // 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 12 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] -// CHECK:STDOUT: %.8: f64 = float_literal 2.6000000000000001 [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 12 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.2 = tuple_value (%.4) [template] +// CHECK:STDOUT: %.6: f64 = float_literal 2.6000000000000001 [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] @@ -40,14 +40,14 @@ var b: i32 = a[2.6]; // 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: %.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: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.8: %.7 = 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: %.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: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,7 +60,7 @@ var b: i32 = a[2.6]; // 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 (%.9) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.7) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] // 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 @@ -74,12 +74,12 @@ var b: i32 = a[2.6]; // 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 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.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.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_8.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_8.2: type = converted %int.make_type_32.loc18, %.loc18_8.1 [template = i32] @@ -96,8 +96,8 @@ var b: i32 = a[2.6]; // 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.%.9)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -119,16 +119,16 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: %.6 = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_23.2: i32 = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23.3: ref i32 = array_index file.%a.var, %.loc11_23.2 -// CHECK:STDOUT: %.loc11_23.4: init i32 = initialize_from %.loc11_20 to %.loc11_23.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.5: init %.3 = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] +// CHECK:STDOUT: %.loc11_23.4: init i32 = initialize_from %.loc11_20 to %.loc11_23.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_23.5: init %.2 = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_24: init %.2 = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.8] +// CHECK:STDOUT: %a.ref: ref %.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.6] // CHECK:STDOUT: %.loc18_16.2: i32 = converted %.loc18_16.1, [template = ] // CHECK:STDOUT: %.loc18_19.1: ref i32 = array_index %a.ref, [template = ] // CHECK:STDOUT: %.loc18_19.2: i32 = bind_value %.loc18_19.1 @@ -166,7 +166,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index dbf936a66eaa..943f3517ab40 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -18,15 +18,15 @@ var b: i32 = a[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: %.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 12 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [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 12 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.2 = tuple_value (%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,12 +46,12 @@ var b: i32 = a[1]; // 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 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.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] @@ -63,16 +63,16 @@ var b: i32 = a[1]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: %.6 = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_20: i32 = int_value 12 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_23.2: i32 = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23.3: ref i32 = array_index file.%a.var, %.loc11_23.2 -// CHECK:STDOUT: %.loc11_23.4: init i32 = initialize_from %.loc11_20 to %.loc11_23.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.5: init %.3 = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] +// CHECK:STDOUT: %.loc11_23.4: init i32 = initialize_from %.loc11_20 to %.loc11_23.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_23.5: init %.2 = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_24: init %.2 = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15_16: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %a.ref: ref %.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc15_16: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc15_17.1: ref i32 = array_index %a.ref, %.loc15_16 [template = ] // CHECK:STDOUT: %.loc15_17.2: i32 = bind_value %.loc15_17.1 // CHECK:STDOUT: assign file.%b.var, %.loc15_17.2 diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index edaaaf4e4b72..b3e14476d532 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -40,18 +40,18 @@ fn G(b: [i32; 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 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: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type i32 [template] -// CHECK:STDOUT: %.6: i32 = int_value 0 [template] -// CHECK:STDOUT: %.7: i32 = int_value 4 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type i32 [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.6: i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,80 +71,80 @@ fn G(b: [i32; 3]) { // 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: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.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_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 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32, %.loc11_12.1 [template = i32] -// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [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_18: type = array_type %.loc11_17, i32 [template = constants.%.2] +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %b.patt: %.3 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %.3 = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %.2 = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %.2 = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc13_15: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_15: i32 = int_value 3 [template = constants.%.1] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %b: %.3 = bind_name b, %b.param +// CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, i32 [template = constants.%.2] +// CHECK:STDOUT: %b.param: %.2 = value_param runtime_param0 +// CHECK:STDOUT: %b: %.2 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.3; +// CHECK:STDOUT: fn @F() -> %.2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b.param_patt: %.3) { +// CHECK:STDOUT: fn @G(%b.param_patt: %.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_32.loc19, %.loc19_14.1 [template = i32] -// CHECK:STDOUT: %.loc19_14.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %pb.var: ref %.5 = var pb -// CHECK:STDOUT: %pb: ref %.5 = bind_name pb, %pb.var -// CHECK:STDOUT: %b.ref.loc19: %.3 = name_ref b, %b -// CHECK:STDOUT: %.loc19_21: i32 = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_22.1: ref %.3 = value_as_ref %b.ref.loc19 +// CHECK:STDOUT: %.loc19_14.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %pb.var: ref %.4 = var pb +// CHECK:STDOUT: %pb: ref %.4 = bind_name pb, %pb.var +// CHECK:STDOUT: %b.ref.loc19: %.2 = name_ref b, %b +// CHECK:STDOUT: %.loc19_21: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_22.1: ref %.2 = value_as_ref %b.ref.loc19 // CHECK:STDOUT: %.loc19_22.2: ref i32 = array_index %.loc19_22.1, %.loc19_21 // CHECK:STDOUT: %.loc19_22.3: i32 = bind_value %.loc19_22.2 -// CHECK:STDOUT: %.loc19_18: %.5 = addr_of [template = ] +// CHECK:STDOUT: %.loc19_18: %.4 = addr_of [template = ] // CHECK:STDOUT: assign %pb.var, %.loc19_18 -// CHECK:STDOUT: %b.ref.loc24: %.3 = name_ref b, %b -// CHECK:STDOUT: %.loc24_5: i32 = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_6.1: ref %.3 = value_as_ref %b.ref.loc24 +// CHECK:STDOUT: %b.ref.loc24: %.2 = name_ref b, %b +// CHECK:STDOUT: %.loc24_5: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc24_6.1: ref %.2 = value_as_ref %b.ref.loc24 // CHECK:STDOUT: %.loc24_6.2: ref i32 = array_index %.loc24_6.1, %.loc24_5 // CHECK:STDOUT: %.loc24_6.3: i32 = bind_value %.loc24_6.2 -// CHECK:STDOUT: %.loc24_10: i32 = int_value 4 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_10: i32 = int_value 4 [template = constants.%.6] // CHECK:STDOUT: assign %.loc24_6.3, %.loc24_10 // CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_32.loc32 [template = i32] // CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_32.loc32, %.loc32_14.1 [template = i32] -// CHECK:STDOUT: %.loc32_14.3: type = ptr_type i32 [template = constants.%.5] -// CHECK:STDOUT: %pf.var: ref %.5 = var pf -// CHECK:STDOUT: %pf: ref %.5 = bind_name pf, %pf.var +// CHECK:STDOUT: %.loc32_14.3: type = ptr_type i32 [template = constants.%.4] +// CHECK:STDOUT: %pf.var: ref %.4 = var pf +// CHECK:STDOUT: %pf: ref %.4 = bind_name pf, %pf.var // CHECK:STDOUT: %F.ref.loc32: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc32_20.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call.loc32: init %.3 = call %F.ref.loc32() to %.loc32_20.1 -// CHECK:STDOUT: %.loc32_23: i32 = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc32_20.2: ref %.3 = temporary %.loc32_20.1, %F.call.loc32 +// CHECK:STDOUT: %.loc32_20.1: ref %.2 = temporary_storage +// CHECK:STDOUT: %F.call.loc32: init %.2 = call %F.ref.loc32() to %.loc32_20.1 +// CHECK:STDOUT: %.loc32_23: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc32_20.2: ref %.2 = temporary %.loc32_20.1, %F.call.loc32 // CHECK:STDOUT: %.loc32_24.1: ref i32 = array_index %.loc32_20.2, %.loc32_23 // CHECK:STDOUT: %.loc32_24.2: i32 = bind_value %.loc32_24.1 -// CHECK:STDOUT: %.loc32_18: %.5 = addr_of [template = ] +// CHECK:STDOUT: %.loc32_18: %.4 = addr_of [template = ] // CHECK:STDOUT: assign %pf.var, %.loc32_18 // CHECK:STDOUT: %F.ref.loc36: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc36_4.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call.loc36: init %.3 = call %F.ref.loc36() to %.loc36_4.1 -// CHECK:STDOUT: %.loc36_7: i32 = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc36_4.2: ref %.3 = temporary %.loc36_4.1, %F.call.loc36 +// CHECK:STDOUT: %.loc36_4.1: ref %.2 = temporary_storage +// CHECK:STDOUT: %F.call.loc36: init %.2 = call %F.ref.loc36() to %.loc36_4.1 +// CHECK:STDOUT: %.loc36_7: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc36_4.2: ref %.2 = temporary %.loc36_4.1, %F.call.loc36 // CHECK:STDOUT: %.loc36_8.1: ref i32 = array_index %.loc36_4.2, %.loc36_7 // CHECK:STDOUT: %.loc36_8.2: i32 = bind_value %.loc36_8.1 -// CHECK:STDOUT: %.loc36_12: i32 = int_value 4 [template = constants.%.7] +// CHECK:STDOUT: %.loc36_12: i32 = int_value 4 [template = constants.%.6] // CHECK:STDOUT: assign %.loc36_8.2, %.loc36_12 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index 0ce530a6eaa0..af6ecb60ea3b 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -37,16 +37,16 @@ var d: i32 = {.a: i32, .b: i32}[0]; // 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 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct: %.5 = struct_value (%.3, %.4) [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct: %.4 = struct_value (%.2, %.3) [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType: type = bind_symbolic_name ElementType, 1 [symbolic] @@ -58,8 +58,8 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic] // CHECK:STDOUT: %At: %At.type = struct_value () [symbolic] -// CHECK:STDOUT: %.7: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -123,8 +123,8 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type) = struct_value () [symbolic = %At (constants.%At)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.7) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -150,17 +150,17 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref: = name_ref N, file.%N [template = file.%N] -// CHECK:STDOUT: %.loc16: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc16: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%a.var, // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: assign file.%b.var, -// CHECK:STDOUT: %.loc29_20: i32 = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc29_28: i32 = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc29_29.1: %.5 = struct_literal (%.loc29_20, %.loc29_28) -// CHECK:STDOUT: %.loc29_31: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %struct: %.5 = struct_value (%.loc29_20, %.loc29_28) [template = constants.%struct] -// CHECK:STDOUT: %.loc29_29.2: %.5 = converted %.loc29_29.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc29_20: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc29_28: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc29_29.1: %.4 = struct_literal (%.loc29_20, %.loc29_28) +// CHECK:STDOUT: %.loc29_31: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc29_20, %.loc29_28) [template = constants.%struct] +// CHECK:STDOUT: %.loc29_29.2: %.4 = converted %.loc29_29.1, %struct [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: %int.make_type_32.loc34_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_19.1: type = value_of_initializer %int.make_type_32.loc34_19 [template = i32] @@ -168,8 +168,8 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %int.make_type_32.loc34_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_28.1: type = value_of_initializer %int.make_type_32.loc34_28 [template = i32] // CHECK:STDOUT: %.loc34_28.2: type = converted %int.make_type_32.loc34_28, %.loc34_28.1 [template = i32] -// CHECK:STDOUT: %.loc34_31: type = struct_type {.a: i32, .b: i32} [template = constants.%.5] -// CHECK:STDOUT: %.loc34_33: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc34_31: type = struct_type {.a: i32, .b: i32} [template = constants.%.4] +// CHECK:STDOUT: %.loc34_33: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index fa62d31b4616..18e18ba53159 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -19,11 +19,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.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 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,7 +52,7 @@ fn Main() { // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] -// CHECK:STDOUT: %.loc15_18: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_18: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign %b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 8103a8521b88..0c84c787e216 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -19,23 +19,23 @@ var d: i32 = c[-10]; // 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 2 [template] -// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 42 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] -// CHECK:STDOUT: %.8: i32 = int_value 1 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.5) [template] -// CHECK:STDOUT: %.9: i32 = int_value 10 [template] +// CHECK:STDOUT: %.1: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: i32 = int_value 42 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.4) [template] +// CHECK:STDOUT: %.7: i32 = int_value 10 [template] // CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] // CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %Negate.type, %Op.type [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Negate.type, %Op.type [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,7 +48,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+85, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+87, unloaded -// CHECK:STDOUT: %import_ref.4: %.10 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: } @@ -61,12 +61,12 @@ var d: i32 = c[-10]; // 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 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_14: i32 = int_value 2 [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: %c.var: ref %.3 = var c -// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var +// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_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.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] @@ -91,20 +91,20 @@ var d: i32 = c[-10]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20: i32 = int_value 42 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_24: i32 = int_value 42 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26.1: %.6 = tuple_literal (%.loc11_20, %.loc11_24) -// CHECK:STDOUT: %.loc11_26.2: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_20: i32 = int_value 42 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 42 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_24) +// CHECK:STDOUT: %.loc11_26.2: i32 = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26.3: ref i32 = array_index file.%c.var, %.loc11_26.2 -// CHECK:STDOUT: %.loc11_26.4: init i32 = initialize_from %.loc11_20 to %.loc11_26.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26.5: i32 = int_value 1 [template = constants.%.8] +// CHECK:STDOUT: %.loc11_26.4: init i32 = initialize_from %.loc11_20 to %.loc11_26.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_26.5: i32 = int_value 1 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26.6: ref i32 = array_index file.%c.var, %.loc11_26.5 -// CHECK:STDOUT: %.loc11_26.7: init i32 = initialize_from %.loc11_24 to %.loc11_26.6 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26.8: init %.3 = array_init (%.loc11_26.4, %.loc11_26.7) to file.%c.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] +// CHECK:STDOUT: %.loc11_26.7: init i32 = initialize_from %.loc11_24 to %.loc11_26.6 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_26.8: init %.2 = array_init (%.loc11_26.4, %.loc11_26.7) to file.%c.var [template = constants.%array] +// CHECK:STDOUT: %.loc11_27: init %.2 = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] // CHECK:STDOUT: assign file.%c.var, %.loc11_27 -// CHECK:STDOUT: %c.ref: ref %.3 = name_ref c, file.%c -// CHECK:STDOUT: %.loc15_17: i32 = int_value 10 [template = constants.%.9] +// CHECK:STDOUT: %c.ref: ref %.2 = name_ref c, file.%c +// CHECK:STDOUT: %.loc15_17: i32 = int_value 10 [template = constants.%.7] // CHECK:STDOUT: %.loc15_19.1: ref i32 = array_index %c.ref, [template = ] // CHECK:STDOUT: %.loc15_19.2: i32 = bind_value %.loc15_19.1 // CHECK:STDOUT: assign file.%d.var, %.loc15_19.2 diff --git a/toolchain/check/testdata/index/fail_non_tuple_access.carbon b/toolchain/check/testdata/index/fail_non_tuple_access.carbon index 58764c21fcaf..3c46f93ed9c7 100644 --- a/toolchain/check/testdata/index/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_non_tuple_access.carbon @@ -19,10 +19,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType: type = bind_symbolic_name ElementType, 1 [symbolic] @@ -34,8 +34,8 @@ fn Main() { // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic] // CHECK:STDOUT: %At: %At.type = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,8 +71,8 @@ fn Main() { // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type) = struct_value () [symbolic = %At (constants.%At)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -84,8 +84,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_3: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_5: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_3: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_5: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index 4f14c2fe5447..bb01b4825866 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -21,10 +21,10 @@ interface I { // CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, i32 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, i32 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ interface I { // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32, %.loc13_11.1 [template = i32] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc13_14: %.4 = assoc_entity element1, %N [template = constants.%.5] +// CHECK:STDOUT: %.loc13_14: %.3 = assoc_entity element1, %N [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 79427e56fcbe..f10ac213422c 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -25,7 +25,7 @@ interface I { // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.1: i32 = int_value 42 [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] @@ -34,16 +34,16 @@ interface I { // CHECK:STDOUT: %Self.3: %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: %.8: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @I.%T [template] +// 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: %.7: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,7 +54,7 @@ interface I { // 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 @@ -74,7 +74,7 @@ interface I { // CHECK:STDOUT: %.loc18_18: i32 = int_value 42 [template = constants.%.1] // CHECK:STDOUT: %.loc18_20.1: type = converted %.loc18_18, [template = ] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_20.2: %.8 = assoc_entity element0, %T [template = constants.%.9] +// CHECK:STDOUT: %.loc18_20.2: %.7 = assoc_entity element0, %T [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -91,8 +91,8 @@ interface I { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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: @@ -140,7 +140,7 @@ interface I { // CHECK:STDOUT: %Self => constants.%Self.3 // 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: diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 63976a8b2b7d..1d131c958d8a 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -26,15 +26,15 @@ interface I { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %.6: i32 = int_value 42 [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %I.type, i32 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.3: i32 = int_value 42 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, i32 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,20 +59,20 @@ interface I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc16_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc16_35: %.2 = tuple_literal (%int.make_type_32.loc16_27, %int.make_type_32.loc16_32) +// CHECK:STDOUT: %.loc16_35: %tuple.type.1 = tuple_literal (%int.make_type_32.loc16_27, %int.make_type_32.loc16_32) // CHECK:STDOUT: %.loc16_36.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_36.2: type = converted %int.make_type_32.loc16_27, %.loc16_36.1 [template = i32] // CHECK:STDOUT: %.loc16_36.3: type = value_of_initializer %int.make_type_32.loc16_32 [template = i32] // CHECK:STDOUT: %.loc16_36.4: type = converted %int.make_type_32.loc16_32, %.loc16_36.3 [template = i32] -// CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16_36.6: %.4 = assoc_entity element0, %T [template = constants.%.5] +// CHECK:STDOUT: %.loc16_36.6: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_32.loc20, %.loc20_19.1 [template = i32] -// CHECK:STDOUT: %.loc20_25: i32 = int_value 42 [template = constants.%.6] +// CHECK:STDOUT: %.loc20_25: i32 = int_value 42 [template = constants.%.3] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc20_27: %.7 = assoc_entity element1, %N [template = constants.%.8] +// CHECK:STDOUT: %.loc20_27: %.4 = assoc_entity element1, %N [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index 003cd61f4e5c..e0770b5c9c57 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -27,16 +27,16 @@ interface Interface { // CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, %G.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Interface.type, %G.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,7 +60,7 @@ interface Interface { // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc16: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc16: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -85,7 +85,7 @@ interface Interface { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc21: %.3 = assoc_entity element1, %G.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index e1c11abed827..4d5210afcc3e 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -69,20 +69,20 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, %G.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Interface.type, %G.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.6: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.7: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.6: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,8 +101,8 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%Interface.type] {} {} -// CHECK:STDOUT: %.decl.loc23: %.type.1 = fn_decl @.1 [template = constants.%.6] {} {} -// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.7] { +// CHECK:STDOUT: %.decl.loc23: %.type.1 = fn_decl @.1 [template = constants.%.5] {} {} +// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.6] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: i32 = binding_pattern b @@ -131,7 +131,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc7: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -156,7 +156,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element1, %G.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -209,12 +209,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt.1: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @C(%Self) [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %U.patt.2: type = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -296,7 +296,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.param.loc14: ref @F.%U.loc14_22.1 (%U) = out_param runtime_param2 // CHECK:STDOUT: %.loc14_38: ref @F.%U.loc14_22.1 (%U) = return_slot %return.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 diff --git a/toolchain/check/testdata/interface/no_prelude/as_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type.carbon index a0302b13e18a..4f785e871481 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type.carbon @@ -18,7 +18,7 @@ fn F(e: Empty) {} // CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] // CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index 9f5c4a3a6ea8..87bf6d13d9d1 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon @@ -22,7 +22,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T: %Empty.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %Empty.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon index 43a991014d3e..fab33e2d28e7 100644 --- a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon @@ -29,7 +29,7 @@ fn H() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] @@ -37,19 +37,19 @@ fn H() { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 2 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = specific_function %G, @G(%.4) [template] -// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.4) [template] -// CHECK:STDOUT: %F.type.2: type = fn_type @F, @I(%.4) [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type.3, %F.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: = specific_function %G, @G(%.3) [template] +// CHECK:STDOUT: %I.type.3: type = interface_type @I, @I(%.3) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F, @I(%.3) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.3, %F.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,8 +84,8 @@ fn H() { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc12_22.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc12_22.2 (constants.%.2)] -// CHECK:STDOUT: %.loc12_22.3: @I.%.loc12_22.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc12_22.3 (constants.%.3)] +// CHECK:STDOUT: %.loc12_22.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc12_22.2 (constants.%.1)] +// CHECK:STDOUT: %.loc12_22.3: @I.%.loc12_22.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_22.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -101,7 +101,7 @@ fn H() { // CHECK:STDOUT: %return.param: ref @F.%U.loc12_8.1 (%U) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @F.%U.loc12_8.1 (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_22.1: @I.%.loc12_22.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc12_22.3 (constants.%.3)] +// CHECK:STDOUT: %.loc12_22.1: @I.%.loc12_22.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc12_22.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -124,16 +124,16 @@ fn H() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc19_4.2: type = interface_type @I, @I(%T.loc15_6.2) [symbolic = %I.type.loc19_4.2 (constants.%I.type.2)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc15_6.2) [symbolic = %F.type (constants.%F.type.1)] -// CHECK:STDOUT: %.loc19_7.2: type = assoc_entity_type @G.%I.type.loc19_4.2 (%I.type.2), @G.%F.type (%F.type.1) [symbolic = %.loc19_7.2 (constants.%.2)] -// CHECK:STDOUT: %.loc19_7.3: @G.%.loc19_7.2 (%.2) = assoc_entity element0, @I.%F.decl [symbolic = %.loc19_7.3 (constants.%.3)] +// CHECK:STDOUT: %.loc19_7.2: type = assoc_entity_type @G.%I.type.loc19_4.2 (%I.type.2), @G.%F.type (%F.type.1) [symbolic = %.loc19_7.2 (constants.%.1)] +// CHECK:STDOUT: %.loc19_7.3: @G.%.loc19_7.2 (%.1) = assoc_entity element0, @I.%F.decl [symbolic = %.loc19_7.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_6.1 [symbolic = %T.loc15_6.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc19_4.1: type = interface_type @I, @I(constants.%T) [symbolic = %I.type.loc19_4.2 (constants.%I.type.2)] -// CHECK:STDOUT: %.loc19_7.1: @G.%.loc19_7.2 (%.2) = specific_constant @I.%.loc12_22.1, @I(constants.%T) [symbolic = %.loc19_7.3 (constants.%.3)] -// CHECK:STDOUT: %F.ref: @G.%.loc19_7.2 (%.2) = name_ref F, %.loc19_7.1 [symbolic = %.loc19_7.3 (constants.%.3)] +// CHECK:STDOUT: %.loc19_7.1: @G.%.loc19_7.2 (%.1) = specific_constant @I.%.loc12_22.1, @I(constants.%T) [symbolic = %.loc19_7.3 (constants.%.2)] +// CHECK:STDOUT: %F.ref: @G.%.loc19_7.2 (%.1) = name_ref F, %.loc19_7.1 [symbolic = %.loc19_7.3 (constants.%.2)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -141,10 +141,10 @@ fn H() { // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc23_6: %.4 = struct_literal () -// CHECK:STDOUT: %.loc23_4: type = converted %.loc23_6, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %.loc23_3: = specific_function %G.ref, @G(constants.%.4) [template = constants.%.5] -// CHECK:STDOUT: %G.call: init %.1 = call %.loc23_3() +// CHECK:STDOUT: %.loc23_6: %.3 = struct_literal () +// CHECK:STDOUT: %.loc23_4: type = converted %.loc23_6, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc23_3: = specific_function %G.ref, @G(constants.%.3) [template = constants.%.4] +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc23_3() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -157,8 +157,8 @@ fn H() { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc12_22.2 => constants.%.2 -// CHECK:STDOUT: %.loc12_22.3 => constants.%.3 +// CHECK:STDOUT: %.loc12_22.2 => constants.%.1 +// CHECK:STDOUT: %.loc12_22.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%Self, constants.%U) { @@ -181,19 +181,19 @@ fn H() { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%.4) { -// CHECK:STDOUT: %T.loc15_6.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc15_6.2 => constants.%.4 +// CHECK:STDOUT: specific @G(constants.%.3) { +// CHECK:STDOUT: %T.loc15_6.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc15_6.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc19_4.2 => constants.%I.type.3 // CHECK:STDOUT: %F.type => constants.%F.type.2 -// CHECK:STDOUT: %.loc19_7.2 => constants.%.6 -// CHECK:STDOUT: %.loc19_7.3 => constants.%.7 +// CHECK:STDOUT: %.loc19_7.2 => constants.%.5 +// CHECK:STDOUT: %.loc19_7.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.4) { -// CHECK:STDOUT: %T.loc11_13.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%.4 +// CHECK:STDOUT: specific @I(constants.%.3) { +// CHECK:STDOUT: %T.loc11_13.2 => constants.%.3 +// CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/basic.carbon b/toolchain/check/testdata/interface/no_prelude/basic.carbon index 03a9fab08533..9dfb5f7252ff 100644 --- a/toolchain/check/testdata/interface/no_prelude/basic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/basic.carbon @@ -25,10 +25,10 @@ interface ForwardDeclared { // CHECK:STDOUT: %ForwardDeclared.type: type = interface_type @ForwardDeclared [template] // CHECK:STDOUT: %Self.2: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ForwardDeclared.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %ForwardDeclared.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @ForwardDeclared.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,7 +52,7 @@ interface ForwardDeclared { // CHECK:STDOUT: interface @ForwardDeclared { // CHECK:STDOUT: %Self: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc17: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc17: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index 8b95d1b7ea1b..645eaf699223 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -30,16 +30,16 @@ class C { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -53,7 +53,7 @@ class C { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -63,7 +63,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -76,7 +76,7 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc24: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc24: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -91,15 +91,15 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc16_19.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc16_19.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc16_19.2: init %C = class_init (), %c.var [template = constants.%struct] // CHECK:STDOUT: %.loc16_20: init %C = converted %.loc16_19.1, %.loc16_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc16_20 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc14 [template = constants.%.3] -// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.1 = call %.loc17() +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc14 [template = constants.%.2] +// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc17() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/export_name.carbon b/toolchain/check/testdata/interface/no_prelude/export_name.carbon index be19f8322bff..9af0c2409c85 100644 --- a/toolchain/check/testdata/interface/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/interface/no_prelude/export_name.carbon @@ -92,7 +92,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon index 29bb3b4e8ca6..4bad496636db 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon @@ -37,7 +37,7 @@ interface Outer { // CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] // CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %Outer.type: type = interface_type @Outer [template] // CHECK:STDOUT: %Self.2: %Outer.type = bind_symbolic_name Self, 0 [symbolic] @@ -45,7 +45,7 @@ interface Outer { // CHECK:STDOUT: %Inner.type.2: type = interface_type @Inner, @Inner(%Self.2) [symbolic] // CHECK:STDOUT: %Self.3: %Inner.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1, @Inner(%Self.2) [symbolic] -// CHECK:STDOUT: %.2: %.type = struct_value () [symbolic] +// CHECK:STDOUT: %.1: %.type = struct_value () [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @Inner(%Self.2) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] // CHECK:STDOUT: } @@ -86,11 +86,11 @@ interface Outer { // CHECK:STDOUT: %Inner.type: type = interface_type @Inner, @Inner(%Self.2) [symbolic = %Inner.type (constants.%Inner.type.2)] // CHECK:STDOUT: %Self.3: %Inner.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.3)] // CHECK:STDOUT: %.type: type = fn_type @.1, @Inner(%Self.2) [symbolic = %.type (constants.%.type)] -// CHECK:STDOUT: %.loc26: @Inner.%.type (%.type) = struct_value () [symbolic = %.loc26 (constants.%.2)] +// CHECK:STDOUT: %.loc26: @Inner.%.type (%.type) = struct_value () [symbolic = %.loc26 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Inner.%Inner.type (%Inner.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.3)] -// CHECK:STDOUT: %.decl: @Inner.%.type (%.type) = fn_decl @.1 [symbolic = @Inner.%.loc26 (constants.%.2)] {} {} +// CHECK:STDOUT: %.decl: @Inner.%.type (%.type) = fn_decl @.1 [symbolic = @Inner.%.loc26 (constants.%.1)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -126,7 +126,7 @@ interface Outer { // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 // CHECK:STDOUT: %Self.3 => constants.%Self.3 // CHECK:STDOUT: %.type => constants.%.type -// CHECK:STDOUT: %.loc26 => constants.%.2 +// CHECK:STDOUT: %.loc26 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @.1(constants.%Self.2, constants.%Self.3) {} diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon index 06c4e2ecff62..f99b3ad3b1ec 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon @@ -30,7 +30,7 @@ alias UseOther = I.other; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index 6e7f5520de40..75736e4b94a2 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -77,10 +77,10 @@ interface Class { } // CHECK:STDOUT: %.type: type = interface_type @.1 [template] // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,7 +102,7 @@ interface Class { } // CHECK:STDOUT: interface @.1 { // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -125,10 +125,10 @@ interface Class { } // CHECK:STDOUT: %.type: type = interface_type @.1 [template] // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -159,7 +159,7 @@ interface Class { } // CHECK:STDOUT: %self.param: @F.%Self (%Self.2) = value_param runtime_param0 // CHECK:STDOUT: %self: @F.%Self (%Self.2) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -181,7 +181,7 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Function.type: type = fn_type @Function [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Function: %Function.type = struct_value () [template] // CHECK:STDOUT: %.type: type = interface_type @.1 [template] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index c84d8eef693f..adc7f2e6db18 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -44,8 +44,8 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%T.1) [symbolic] // CHECK:STDOUT: %Self.1: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] @@ -56,10 +56,10 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.patt.3: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %DifferentParams.type: type = generic_interface_type @DifferentParams [template] // CHECK:STDOUT: %DifferentParams: %DifferentParams.type = struct_value () [template] -// CHECK:STDOUT: %T.2: %.1 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt.4: %.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.4: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type.4: type = generic_interface_type @.3 [template] -// CHECK:STDOUT: %.3: %.type.4 = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.4 = struct_value () [template] // CHECK:STDOUT: %.type.5: type = interface_type @.3, @.3(%T.2) [symbolic] // CHECK:STDOUT: %Self.3: %.type.5 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -71,7 +71,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: .DifferentParams = %DifferentParams.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NotGeneric.decl: type = interface_decl @NotGeneric [template = constants.%NotGeneric.type] {} {} -// CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %T.patt.loc19_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_22.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_22.1, runtime_param [symbolic = %T.patt.loc19_22.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { @@ -93,14 +93,14 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc31_27.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc31_27.2 (constants.%T.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc38: %.type.4 = interface_decl @.3 [template = constants.%.3] { -// CHECK:STDOUT: %T.patt.loc38_27.1: %.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.4)] -// CHECK:STDOUT: %T.param_patt: %.1 = value_param_pattern %T.patt.loc38_27.1, runtime_param [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.4)] +// CHECK:STDOUT: %.decl.loc38: %.type.4 = interface_decl @.3 [template = constants.%.2] { +// CHECK:STDOUT: %T.patt.loc38_27.1: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.4)] +// CHECK:STDOUT: %T.param_patt: %empty_tuple.type = value_param_pattern %T.patt.loc38_27.1, runtime_param [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.4)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc38_32.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %T.param: %.1 = value_param runtime_param -// CHECK:STDOUT: %T.loc38_27.1: %.1 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc38_27.2 (constants.%T.2)] +// CHECK:STDOUT: %.loc38_32.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %T.param: %empty_tuple.type = value_param runtime_param +// CHECK:STDOUT: %T.loc38_27.1: %empty_tuple.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc38_27.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,9 +145,9 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: interface; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @.3(%T.loc38_27.1: %.1) { -// CHECK:STDOUT: %T.loc38_27.2: %.1 = bind_symbolic_name T, 0 [symbolic = %T.loc38_27.2 (constants.%T.2)] -// CHECK:STDOUT: %T.patt.loc38_27.2: %.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.4)] +// CHECK:STDOUT: generic interface @.3(%T.loc38_27.1: %empty_tuple.type) { +// CHECK:STDOUT: %T.loc38_27.2: %empty_tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc38_27.2 (constants.%T.2)] +// CHECK:STDOUT: %T.patt.loc38_27.2: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.type: type = interface_type @.3, @.3(%T.loc38_27.2) [symbolic = %.type (constants.%.type.5)] diff --git a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon index b2db68d046c3..90fbc13b8d18 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon @@ -54,18 +54,18 @@ interface BeingDefined { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Undefined.type: type = interface_type @Undefined [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %BeingDefined.type: type = interface_type @BeingDefined [template] // CHECK:STDOUT: %Self: %BeingDefined.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %BeingDefined.type, %H.type [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @BeingDefined.%H.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %BeingDefined.type, %H.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @BeingDefined.%H.decl [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.5: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.4: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,7 +75,7 @@ interface BeingDefined { // CHECK:STDOUT: .BeingDefined = %BeingDefined.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Undefined.decl: type = interface_decl @Undefined [template = constants.%Undefined.type] {} {} -// CHECK:STDOUT: %.decl: %.type.1 = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type.1 = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} {} // CHECK:STDOUT: %BeingDefined.decl: type = interface_decl @BeingDefined [template = constants.%BeingDefined.type] {} {} // CHECK:STDOUT: } @@ -93,8 +93,8 @@ interface BeingDefined { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: %.3 = assoc_entity element0, %H.decl [template = constants.%.4] -// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.5] {} {} +// CHECK:STDOUT: %.loc45: %.2 = assoc_entity element0, %H.decl [template = constants.%.3] +// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.4] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon index 71662d986f94..1abb464c1019 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -33,12 +33,12 @@ fn F() { // CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Interface.type, type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Interface.%T [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type.1 [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Interface.type, type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Interface.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } @@ -55,9 +55,9 @@ fn F() { // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element1, %T [template = constants.%.5] +// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element1, %T [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -74,9 +74,9 @@ fn F() { // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Interface.ref.loc22: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Interface.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Interface.%.loc12 [template = constants.%.2] // CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %T.ref: %.4 = name_ref T, @Interface.%.loc14 [template = constants.%.5] +// CHECK:STDOUT: %T.ref: %.3 = name_ref T, @Interface.%.loc14 [template = constants.%.4] // CHECK:STDOUT: %.loc27: type = converted %T.ref, [template = ] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var diff --git a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon index 51c79d6785d3..675765d79191 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon @@ -25,12 +25,12 @@ interface Interface { // CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: %.type = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,8 +43,8 @@ interface Interface { // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {} {} +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index 62a9941070d9..e48b4b120ed5 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -31,10 +31,10 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %Interface.type: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Interface.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Interface.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %T: %Interface.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: %Interface.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CallStatic.type: type = fn_type @CallStatic [template] @@ -79,7 +79,7 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -101,7 +101,7 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: fn(%T.param_patt: %Interface.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc13_15.1 [symbolic = %T.loc13_15.2 (constants.%T)] -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @Interface.%.loc11 [template = constants.%.3] +// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Interface.%.loc11 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index 3a92af0f9fa9..60b65888c076 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -27,17 +27,17 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = interface_type @I, @I(%T) [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.2, %F.type [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1, @I(%T) [symbolic] -// CHECK:STDOUT: %.4: %.type = struct_value () [symbolic] +// CHECK:STDOUT: %.3: %.type = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,7 +51,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.3] { // CHECK:STDOUT: %self.patt: @.1.%Self (%Self) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @.1.%Self (%Self) = return_slot_pattern @@ -83,8 +83,8 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @I.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc13_29.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.loc13_29.2 (constants.%.2)] -// CHECK:STDOUT: %.loc13_29.3: @I.%.loc13_29.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.3)] +// CHECK:STDOUT: %.loc13_29.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.loc13_29.2 (constants.%.1)] +// CHECK:STDOUT: %.loc13_29.3: @I.%.loc13_29.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -107,7 +107,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %return.param: ref @F.%Self (%Self) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_29.1: @I.%.loc13_29.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.3)] +// CHECK:STDOUT: %.loc13_29.1: @I.%.loc13_29.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -148,8 +148,8 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc13_29.2 => constants.%.2 -// CHECK:STDOUT: %.loc13_29.3 => constants.%.3 +// CHECK:STDOUT: %.loc13_29.2 => constants.%.1 +// CHECK:STDOUT: %.loc13_29.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@F.%T) { diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon index 25fd8608b51e..8740c57006c4 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon @@ -26,14 +26,14 @@ interface Modifiers { // CHECK:STDOUT: %Modifiers.type: type = interface_type @Modifiers [template] // CHECK:STDOUT: %Self: %Modifiers.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Final.type: type = fn_type @Final [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Final: %Final.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Modifiers.type, %Final.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Modifiers.%Final.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Modifiers.type, %Final.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Modifiers.%Final.decl [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] // CHECK:STDOUT: %Default: %Default.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Modifiers.type, %Default.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Modifiers.%Default.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Modifiers.type, %Default.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Modifiers.%Default.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,9 +46,9 @@ interface Modifiers { // CHECK:STDOUT: interface @Modifiers { // CHECK:STDOUT: %Self: %Modifiers.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] {} {} -// CHECK:STDOUT: %.loc16: %.2 = assoc_entity element0, %Final.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc16: %.1 = assoc_entity element0, %Final.decl [template = constants.%.2] // CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] {} {} -// CHECK:STDOUT: %.loc20: %.4 = assoc_entity element1, %Default.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc20: %.3 = assoc_entity element1, %Default.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 4cfd45a93eff..0c55f1fa0ccc 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -64,13 +64,13 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Simple.type.1: type = generic_interface_type @Simple [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Simple: %Simple.type.1 = struct_value () [template] // CHECK:STDOUT: %Simple.type.2: type = interface_type @Simple, @Simple(%T.1) [symbolic] // CHECK:STDOUT: %Self.1: %Simple.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %WithAssocFn.type.1: type = generic_interface_type @WithAssocFn [template] // CHECK:STDOUT: %WithAssocFn: %WithAssocFn.type.1 = struct_value () [template] @@ -78,20 +78,20 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Self.2: %WithAssocFn.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @WithAssocFn(%T.1) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %WithAssocFn.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @WithAssocFn.%F.decl [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %WithAssocFn.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @WithAssocFn.%F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Simple.type.3: type = interface_type @Simple, @Simple(%C) [template] -// CHECK:STDOUT: %.6: = interface_witness () [template] +// CHECK:STDOUT: %.5: = interface_witness () [template] // CHECK:STDOUT: %WithAssocFn.type.3: type = interface_type @WithAssocFn, @WithAssocFn(%C) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @WithAssocFn(%C) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %WithAssocFn.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @WithAssocFn.%F.decl [template] -// CHECK:STDOUT: %.9: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.10: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %WithAssocFn.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @WithAssocFn.%F.decl [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %X = struct_value () [template] // CHECK:STDOUT: %T.patt.3: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %N: %T.1 = bind_symbolic_name N, 1 [symbolic] @@ -105,7 +105,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.5: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Pass.type: type = fn_type @Pass [template] // CHECK:STDOUT: %Pass: %Pass.type = struct_value () [template] -// CHECK:STDOUT: %.11: = specific_function %Receive, @Receive(%T.2) [symbolic] +// CHECK:STDOUT: %.10: = specific_function %Receive, @Receive(%T.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -194,8 +194,8 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Self.2: %WithAssocFn.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @WithAssocFn(%T.loc8_23.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @WithAssocFn.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc10_14.2: type = assoc_entity_type @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2), @WithAssocFn.%F.type (%F.type.1) [symbolic = %.loc10_14.2 (constants.%.4)] -// CHECK:STDOUT: %.loc10_14.3: @WithAssocFn.%.loc10_14.2 (%.4) = assoc_entity element0, %F.decl [symbolic = %.loc10_14.3 (constants.%.5)] +// CHECK:STDOUT: %.loc10_14.2: type = assoc_entity_type @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2), @WithAssocFn.%F.type (%F.type.1) [symbolic = %.loc10_14.2 (constants.%.3)] +// CHECK:STDOUT: %.loc10_14.3: @WithAssocFn.%.loc10_14.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.loc10_14.3 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] @@ -207,7 +207,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_14.1: @WithAssocFn.%.loc10_14.2 (%.4) = assoc_entity element0, %F.decl [symbolic = %.loc10_14.3 (constants.%.5)] +// CHECK:STDOUT: %.loc10_14.1: @WithAssocFn.%.loc10_14.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.loc10_14.3 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -226,7 +226,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %Simple.type { -// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.6] +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14 @@ -241,7 +241,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -249,7 +249,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X @@ -268,7 +268,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %WithAssocFn.type: type = interface_type @WithAssocFn, @WithAssocFn(constants.%C) [template = constants.%WithAssocFn.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -281,7 +281,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %X { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_15.1: %.2 = struct_literal () +// CHECK:STDOUT: %.loc17_15.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc17_15.2: init %X = class_init (), %return [template = constants.%struct] // CHECK:STDOUT: %.loc17_16: init %X = converted %.loc17_15.1, %.loc17_15.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc17_16 to %return @@ -304,14 +304,14 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc25_9.2: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.5)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_9.2) [symbolic = %.loc26_3.2 (constants.%.11)] +// CHECK:STDOUT: %.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_9.2) [symbolic = %.loc26_3.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Simple.type.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [template = constants.%Receive] // CHECK:STDOUT: %T.ref: %Simple.type.3 = name_ref T, %T.loc25_9.1 [symbolic = %T.loc25_9.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.2) [symbolic = %.loc26_3.2 (constants.%.11)] -// CHECK:STDOUT: %Receive.call: init %.1 = call %.loc26_3.1() +// CHECK:STDOUT: %.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.2) [symbolic = %.loc26_3.2 (constants.%.10)] +// CHECK:STDOUT: %Receive.call: init %empty_tuple.type = call %.loc26_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -356,8 +356,8 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Self.2 => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc10_14.2 => constants.%.7 -// CHECK:STDOUT: %.loc10_14.3 => constants.%.8 +// CHECK:STDOUT: %.loc10_14.2 => constants.%.6 +// CHECK:STDOUT: %.loc10_14.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%C, constants.%C) {} @@ -392,13 +392,13 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.1: type = generic_interface_type @Generic [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Generic: %Generic.type.1 = struct_value () [template] // CHECK:STDOUT: %Generic.type.2: type = interface_type @Generic, @Generic(%T.1) [symbolic] // CHECK:STDOUT: %Self: %Generic.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %Generic.type.3: type = interface_type @Generic, @Generic(%A) [template] // CHECK:STDOUT: %T.2: %Generic.type.3 = bind_symbolic_name T, 0 [symbolic] @@ -469,14 +469,14 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc7: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B diff --git a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon index c76ec3f59f21..1eb53b5ba541 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon @@ -24,17 +24,17 @@ interface I { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%U [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @I.%U [template] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type, %G.type [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element2, @I.%G.decl [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type, %G.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element2, @I.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,9 +53,9 @@ interface I { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_8.2: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc12_8.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %U: type = assoc_const_decl U [template] -// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %U [template = constants.%.5] +// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element1, %U [template = constants.%.4] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.patt.loc16_8.2: type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_8.1 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc16_8.2, runtime_param [symbolic = %T.patt.loc16_8.1 (constants.%T.patt.2)] @@ -63,7 +63,7 @@ interface I { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T, 1, %T.param [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: %.6 = assoc_entity element2, %G.decl [template = constants.%.7] +// CHECK:STDOUT: %.loc16: %.5 = assoc_entity element2, %G.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index 272a5fe96400..f61bdd2a7528 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -33,14 +33,14 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.1: type = generic_interface_type @AddWith [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %AddWith: %AddWith.type.1 = struct_value () [template] // CHECK:STDOUT: %AddWith.type.2: type = interface_type @AddWith, @AddWith(%T) [symbolic] // CHECK:STDOUT: %Self: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @AddWith(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %AddWith.type.2, %F.type [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @AddWith.%F.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %AddWith.type.2, %F.type [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @AddWith.%F.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,13 +65,13 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self.2: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @AddWith(%T.loc4_19.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @AddWith.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type) [symbolic = %.loc5_9.2 (constants.%.2)] -// CHECK:STDOUT: %.loc5_9.3: @AddWith.%.loc5_9.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_9.2: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type) [symbolic = %.loc5_9.2 (constants.%.1)] +// CHECK:STDOUT: %.loc5_9.3: @AddWith.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @AddWith.%F.type (%F.type) = fn_decl @F [symbolic = @AddWith.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc5_9.1: @AddWith.%.loc5_9.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.3)] +// CHECK:STDOUT: %.loc5_9.1: @AddWith.%.loc5_9.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_9.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -104,7 +104,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %AddWith.type.1: type = generic_interface_type @AddWith [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %AddWith: %AddWith.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.2: type = interface_type @AddWith, @AddWith(%T) [symbolic] @@ -113,16 +113,16 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self.2: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @AddWith(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %AddWith.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %AddWith.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %AddWith.type.3: type = interface_type @AddWith, @AddWith(%C) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @AddWith(%C) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %AddWith.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %AddWith.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -157,8 +157,8 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self: %AddWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @AddWith(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @AddWith.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @AddWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @AddWith.%AddWith.type (%AddWith.type.2), @AddWith.%F.type (%F.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @AddWith.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -170,7 +170,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc7_6 as %AddWith.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -215,8 +215,8 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%C, constants.%C) {} diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index 9619ef6b472c..7d78a90addd5 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -53,7 +53,7 @@ interface A(T: type) {} // CHECK:STDOUT: %NotGenericNoParams.type: type = interface_type @NotGenericNoParams [template] // CHECK:STDOUT: %Self.1: %NotGenericNoParams.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %NotGenericButParams.type.1: type = generic_interface_type @NotGenericButParams [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NotGenericButParams: %NotGenericButParams.type.1 = struct_value () [template] // CHECK:STDOUT: %NotGenericButParams.type.2: type = interface_type @NotGenericButParams [template] // CHECK:STDOUT: %Self.2: %NotGenericButParams.type.2 = bind_symbolic_name Self, 0 [symbolic] @@ -76,15 +76,15 @@ interface A(T: type) {} // CHECK:STDOUT: %GenericAndParams.2: %GenericAndParams.type.3 = struct_value () [symbolic] // CHECK:STDOUT: %GenericAndParams.type.4: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] // CHECK:STDOUT: %Self.5: %GenericAndParams.type.4 = bind_symbolic_name Self, 2 [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %X: type = class_type @X [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: %GenericAndParams.type.5: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] // CHECK:STDOUT: %GenericAndParams.type.6: type = generic_interface_type @GenericAndParams.2, @C(%X) [template] // CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.6 = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %GenericAndParams.type.7: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,35 +214,35 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %X.ref as %NotGenericNoParams.ref { -// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %X.ref as %NotGenericButParams.type { -// CHECK:STDOUT: %.loc15: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc15: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %X.ref.loc16_6 as %GenericAndParams.type { -// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %X.ref.loc17_6 as %GenericNoParams.ref { -// CHECK:STDOUT: %.loc17: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5: %X.ref.loc18_6 as %GenericAndParams.type { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_36 @@ -265,7 +265,7 @@ interface A(T: type) {} // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc10_30.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc10_30.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -275,7 +275,7 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X @@ -347,7 +347,7 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type.1: type = generic_interface_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type.1 = struct_value () [template] // CHECK:STDOUT: %A.type.2: type = interface_type @A [template] // CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic] @@ -372,7 +372,7 @@ interface A(T: type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type.1: type = generic_interface_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type.1 = struct_value () [template] // CHECK:STDOUT: %A.type.2: type = interface_type @A [template] // CHECK:STDOUT: %Self: %A.type.2 = bind_symbolic_name Self, 0 [symbolic] diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index 75e78c9f6a2b..1100a6ef1b3e 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -58,20 +58,20 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %.1: type = assoc_entity_type %Basic.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Basic.%T [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Basic.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Basic.%F.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Basic.type, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Basic.%F.decl [template] // CHECK:STDOUT: %ForwardDeclared.type: type = interface_type @ForwardDeclared [template] // CHECK:STDOUT: %Self.3: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ForwardDeclared.type, type [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @ForwardDeclared.%T [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ForwardDeclared.type, type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @ForwardDeclared.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, @ForwardDeclared.%F.decl [template] -// CHECK:STDOUT: %.10: type = struct_type {.f: %ForwardDeclared.type} [template] -// CHECK:STDOUT: %.11: type = struct_type {.f: %.3} [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %.9: type = struct_type {.f: %ForwardDeclared.type} [template] +// CHECK:STDOUT: %.10: type = struct_type {.f: %empty_tuple.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,9 +85,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%Basic.type] {} {} // CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%ForwardDeclared.type] {} {} // CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, %ForwardDeclared.decl [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %.loc20: type = struct_type {.f: %ForwardDeclared.type} [template = constants.%.10] -// CHECK:STDOUT: %f_ref.var: ref %.10 = var f_ref -// CHECK:STDOUT: %f_ref: ref %.10 = bind_name f_ref, %f_ref.var +// CHECK:STDOUT: %.loc20: type = struct_type {.f: %ForwardDeclared.type} [template = constants.%.9] +// CHECK:STDOUT: %f_ref.var: ref %.9 = var f_ref +// CHECK:STDOUT: %f_ref: ref %.9 = bind_name f_ref, %f_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -103,7 +103,7 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc9: %.4 = assoc_entity element1, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc9: %.3 = assoc_entity element1, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -115,9 +115,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: interface @ForwardDeclared { // CHECK:STDOUT: %Self: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16: %.6 = assoc_entity element0, %T [template = constants.%.7] +// CHECK:STDOUT: %.loc16: %.5 = assoc_entity element0, %T [template = constants.%.6] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: %.8 = assoc_entity element1, %F.decl [template = constants.%.9] +// CHECK:STDOUT: %.loc17: %.7 = assoc_entity element1, %F.decl [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -146,7 +146,7 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] // CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [template] // CHECK:STDOUT: %Basic.type: type = interface_type @Basic [template] // CHECK:STDOUT: %Self.2: %Basic.type = bind_symbolic_name Self, 0 [symbolic] @@ -156,37 +156,37 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Self.3: %ForwardDeclared.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %UseForwardDeclared.type: type = fn_type @UseForwardDeclared [template] // CHECK:STDOUT: %UseForwardDeclared: %UseForwardDeclared.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Basic.type, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %Basic.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Basic.type, %F.type.1 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, imports.%import_ref.17 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ForwardDeclared.type, type [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Basic.type, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, imports.%import_ref.17 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ForwardDeclared.type, type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.19 [template] -// CHECK:STDOUT: %.10: type = ptr_type %ForwardDeclared.type [template] -// CHECK:STDOUT: %.11: type = struct_type {.f: %ForwardDeclared.type} [template] -// CHECK:STDOUT: %.12: type = struct_type {.f: %.1} [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ForwardDeclared.type, %F.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.19 [template] +// CHECK:STDOUT: %.9: type = ptr_type %ForwardDeclared.type [template] +// CHECK:STDOUT: %.10: type = struct_type {.f: %ForwardDeclared.type} [template] +// CHECK:STDOUT: %.11: type = struct_type {.f: %empty_tuple.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Empty.type] // CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%Basic.type] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+20, loaded [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %import_ref.4: ref %.11 = import_ref Main//a, inst+39, loaded +// CHECK:STDOUT: %import_ref.4: ref %.10 = import_ref Main//a, inst+39, loaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+3, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: %.2 = import_ref Main//a, inst+11, loaded [template = constants.%.3] -// CHECK:STDOUT: %import_ref.8: %.4 = import_ref Main//a, inst+18, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.7: %.1 = import_ref Main//a, inst+11, loaded [template = constants.%.2] +// CHECK:STDOUT: %import_ref.8: %.3 = import_ref Main//a, inst+18, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.9 = import_ref Main//a, inst+9, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//a, inst+13, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst+22, unloaded -// CHECK:STDOUT: %import_ref.12: %.6 = import_ref Main//a, inst+26, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.13: %.8 = import_ref Main//a, inst+32, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.12: %.5 = import_ref Main//a, inst+26, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.13: %.7 = import_ref Main//a, inst+32, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.14 = import_ref Main//a, inst+24, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//a, inst+28, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref Main//a, inst+9, unloaded @@ -236,21 +236,21 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %f: %ForwardDeclared.type = bind_name f, %f.param // CHECK:STDOUT: } // CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] -// CHECK:STDOUT: %T.ref.loc10: %.2 = name_ref T, imports.%import_ref.7 [template = constants.%.3] -// CHECK:STDOUT: %UseBasicT: %.2 = bind_alias UseBasicT, imports.%import_ref.7 [template = constants.%.3] +// CHECK:STDOUT: %T.ref.loc10: %.1 = name_ref T, imports.%import_ref.7 [template = constants.%.2] +// CHECK:STDOUT: %UseBasicT: %.1 = bind_alias UseBasicT, imports.%import_ref.7 [template = constants.%.2] // CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] -// CHECK:STDOUT: %F.ref.loc11: %.4 = name_ref F, imports.%import_ref.8 [template = constants.%.5] -// CHECK:STDOUT: %UseBasicF: %.4 = bind_alias UseBasicF, imports.%import_ref.8 [template = constants.%.5] +// CHECK:STDOUT: %F.ref.loc11: %.3 = name_ref F, imports.%import_ref.8 [template = constants.%.4] +// CHECK:STDOUT: %UseBasicF: %.3 = bind_alias UseBasicF, imports.%import_ref.8 [template = constants.%.4] // CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %T.ref.loc13: %.6 = name_ref T, imports.%import_ref.12 [template = constants.%.7] -// CHECK:STDOUT: %UseForwardDeclaredT: %.6 = bind_alias UseForwardDeclaredT, imports.%import_ref.12 [template = constants.%.7] +// CHECK:STDOUT: %T.ref.loc13: %.5 = name_ref T, imports.%import_ref.12 [template = constants.%.6] +// CHECK:STDOUT: %UseForwardDeclaredT: %.5 = bind_alias UseForwardDeclaredT, imports.%import_ref.12 [template = constants.%.6] // CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %F.ref.loc14: %.8 = name_ref F, imports.%import_ref.13 [template = constants.%.9] -// CHECK:STDOUT: %UseForwardDeclaredF: %.8 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%.9] +// CHECK:STDOUT: %F.ref.loc14: %.7 = name_ref F, imports.%import_ref.13 [template = constants.%.8] +// CHECK:STDOUT: %UseForwardDeclaredF: %.7 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%.8] // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %.loc16: type = ptr_type %ForwardDeclared.type [template = constants.%.10] -// CHECK:STDOUT: %f.var: ref %.10 = var f -// CHECK:STDOUT: %f: ref %.10 = bind_name f, %f.var +// CHECK:STDOUT: %.loc16: type = ptr_type %ForwardDeclared.type [template = constants.%.9] +// CHECK:STDOUT: %f.var: ref %.9 = var f +// CHECK:STDOUT: %f: ref %.9 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -302,9 +302,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %f_ref.ref: ref %.11 = name_ref f_ref, imports.%import_ref.4 +// CHECK:STDOUT: %f_ref.ref: ref %.10 = name_ref f_ref, imports.%import_ref.4 // CHECK:STDOUT: %.loc16_33: ref %ForwardDeclared.type = struct_access %f_ref.ref, element0 -// CHECK:STDOUT: %.loc16_27: %.10 = addr_of %.loc16_33 +// CHECK:STDOUT: %.loc16_27: %.9 = addr_of %.loc16_33 // CHECK:STDOUT: assign file.%f.var, %.loc16_27 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/import_access.carbon b/toolchain/check/testdata/interface/no_prelude/import_access.carbon index 9853bc301921..34d6733b9a5b 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -197,7 +197,7 @@ private interface Redecl {} // CHECK:STDOUT: %Def.type: type = interface_type @Def [template] // CHECK:STDOUT: %Self: %Def.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -238,7 +238,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -266,7 +266,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -304,7 +304,7 @@ private interface Redecl {} // CHECK:STDOUT: %ForwardWithDef.type: type = interface_type @ForwardWithDef [template] // CHECK:STDOUT: %Self: %ForwardWithDef.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -345,7 +345,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -373,7 +373,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -409,7 +409,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Forward.type: type = interface_type @Forward [template] // CHECK:STDOUT: %Self: %Forward.type = bind_symbolic_name Self, 0 [symbolic] @@ -451,7 +451,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -480,7 +480,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon b/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon index 5fbb60ccd42d..ce04ffe9e67f 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_interface_decl.carbon @@ -21,7 +21,7 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = interface_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,8 +30,8 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%A.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc3_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc3_7.2: type = converted %.loc3_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc3_7.2: type = converted %.loc3_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -44,12 +44,12 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = interface_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//a, inst+1, unloaded -// CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%.1] +// CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, inst+5, loaded [template = constants.%empty_tuple.type] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, inst+6, loaded [template = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 0365ae2d7f65..ba5fa18437fd 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -18,10 +18,10 @@ interface UseSelf { // CHECK:STDOUT: %UseSelf.type: type = interface_type @UseSelf [template] // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %UseSelf.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,7 +50,7 @@ interface UseSelf { // CHECK:STDOUT: %return.param: ref @F.%Self (%Self) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%Self (%Self) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index 3c5ee1d1e918..9526fc999e7c 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -194,7 +194,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.2: type = interface_type @Foo, @Foo(%a) [symbolic] @@ -321,7 +321,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.2: type = interface_type @Foo, @Foo(%a) [symbolic] @@ -395,11 +395,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -418,7 +418,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc6_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc14_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_15.1, runtime_param [symbolic = %a.patt.loc14_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -483,7 +483,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.1: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type.1 = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type.2: type = interface_type @Foo, @Foo(%a) [symbolic] @@ -557,7 +557,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Bar.type: type = generic_interface_type @Bar [template] @@ -632,18 +632,18 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: %Self.1: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %a.patt.3: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Bar.type: type = generic_interface_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: %.type.3: type = generic_interface_type @.2 [template] -// CHECK:STDOUT: %.5: %.type.3 = struct_value () [template] +// CHECK:STDOUT: %.4: %.type.3 = struct_value () [template] // CHECK:STDOUT: %.type.4: type = interface_type @.2, @.2(%a) [symbolic] // CHECK:STDOUT: %Self.2: %.type.4 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -665,7 +665,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %.decl.loc12: %.type.1 = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl.loc12: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc12_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc12_15.2 (constants.%a.patt.1)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc12_15.1, runtime_param [symbolic = %a.patt.loc12_15.2 (constants.%a.patt.1)] // CHECK:STDOUT: } { @@ -673,7 +673,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc12_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc12_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc21: %.type.3 = interface_decl @.2 [template = constants.%.5] { +// CHECK:STDOUT: %.decl.loc21: %.type.3 = interface_decl @.2 [template = constants.%.4] { // CHECK:STDOUT: %a.patt.loc21_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc21_15.2 (constants.%a.patt.3)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc21_15.1, runtime_param [symbolic = %a.patt.loc21_15.2 (constants.%a.patt.3)] // CHECK:STDOUT: } { @@ -775,12 +775,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %b: %C = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt: %C = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%b) [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -802,7 +802,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %b.patt.loc15_15.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_15.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_15.1, runtime_param [symbolic = %b.patt.loc15_15.2 (constants.%b.patt)] // CHECK:STDOUT: } { @@ -867,11 +867,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -893,7 +893,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc15_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_15.1, runtime_param [symbolic = %a.patt.loc15_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -958,11 +958,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -984,7 +984,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %C = value_param runtime_param // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc15_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_15.1, runtime_param [symbolic = %a.patt.loc15_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { @@ -1049,7 +1049,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1097,11 +1097,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %C = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -1122,7 +1122,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %a.patt.loc17_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt.1)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt.1)] // CHECK:STDOUT: } { @@ -1186,11 +1186,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a: %.3 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt.1: %.3 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %a.patt.2: %.3 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template] -// CHECK:STDOUT: %.5: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %.4: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = interface_type @.1, @.1(%a) [symbolic] // CHECK:STDOUT: %Self: %.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: } @@ -1210,7 +1210,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.param: %.3 = value_param runtime_param // CHECK:STDOUT: %a.loc6_15.1: %.3 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %a.patt.loc17_15.1: %.3 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: %a.param_patt: %.3 = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt.2)] // CHECK:STDOUT: } { diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 858c4b3841b0..0c5766268c4c 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -25,23 +25,23 @@ interface I { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %G.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%G.decl [template] -// CHECK:STDOUT: %.6: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.7: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element2, @I.%T [template] -// CHECK:STDOUT: %.10: i32 = int_value 42 [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %I.type, i32 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element3, @I.%N [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %G.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @I.%G.decl [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element2, @I.%T [template] +// CHECK:STDOUT: %.7: i32 = int_value 42 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %I.type, i32 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element3, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,7 +65,7 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %.loc13: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc13: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: i32 = value_param_pattern %a.patt, runtime_param0 @@ -90,23 +90,23 @@ interface I { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] +// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element1, %G.decl [template = constants.%.4] // CHECK:STDOUT: %int.make_type_32.loc18_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc18_24: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_27: %.6 = tuple_literal (%int.make_type_32.loc18_19, %int.make_type_32.loc18_24) +// CHECK:STDOUT: %.loc18_27: %tuple.type.1 = tuple_literal (%int.make_type_32.loc18_19, %int.make_type_32.loc18_24) // CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_32.loc18_19 [template = i32] // CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_32.loc18_19, %.loc18_28.1 [template = i32] // CHECK:STDOUT: %.loc18_28.3: type = value_of_initializer %int.make_type_32.loc18_24 [template = i32] // CHECK:STDOUT: %.loc18_28.4: type = converted %int.make_type_32.loc18_24, %.loc18_28.3 [template = i32] -// CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%.7 [template = constants.%.7] +// CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_28.6: %.8 = assoc_entity element2, %T [template = constants.%.9] +// CHECK:STDOUT: %.loc18_28.6: %.5 = assoc_entity element2, %T [template = constants.%.6] // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32] -// CHECK:STDOUT: %.loc19_17: i32 = int_value 42 [template = constants.%.10] +// CHECK:STDOUT: %.loc19_17: i32 = int_value 42 [template = constants.%.7] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc19_19: %.11 = assoc_entity element3, %N [template = constants.%.12] +// CHECK:STDOUT: %.loc19_19: %.8 = assoc_entity element3, %N [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index fa3e04f31d43..6e3baef44022 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -14,13 +14,13 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,7 +43,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_14: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc11_14: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc11_14 br !if.then.loc11_18 else br !if.else.loc11_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_18: @@ -52,12 +52,12 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_32.loc11_29, %.loc11_29.1 [template = i32] // CHECK:STDOUT: %n.var.loc11_26: ref i32 = var n // CHECK:STDOUT: %n.loc11_26: ref i32 = bind_name n, %n.var.loc11_26 -// CHECK:STDOUT: %.loc11_35: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_35: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: assign %n.var.loc11_26, %.loc11_35 // CHECK:STDOUT: br !if.else.loc11_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11_18: -// CHECK:STDOUT: %.loc11_44: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc11_44: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc11_44 br !if.then.loc11_48 else br !if.else.loc11_48 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_48: @@ -66,7 +66,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %.loc11_59.2: type = converted %int.make_type_32.loc11_59, %.loc11_59.1 [template = i32] // CHECK:STDOUT: %n.var.loc11_56: ref i32 = var n // CHECK:STDOUT: %n.loc11_56: ref i32 = bind_name n, %n.var.loc11_56 -// CHECK:STDOUT: %.loc11_65: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_65: i32 = int_value 2 [template = constants.%.3] // CHECK:STDOUT: assign %n.var.loc11_56, %.loc11_65 // CHECK:STDOUT: br !if.else.loc11_48 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index cb7b342b8112..867b7ca94318 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -166,12 +166,12 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -192,21 +192,21 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc5_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_12.2: type = converted %.loc10_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_17: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc10_18: %.1 = converted %.loc10_17, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %x: %.1 = bind_name x, %.loc10_18 -// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_12.2: type = converted %.loc10_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_17: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_18: %empty_tuple.type = converted %.loc10_17, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %.loc10_18 +// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -214,9 +214,9 @@ impl i32 as Empty { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.1 { +// CHECK:STDOUT: fn @F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.1 = name_ref x, @C.%x +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, @C.%x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -224,12 +224,12 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -249,22 +249,22 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc9_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_12.2: type = converted %.loc9_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc9_17: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc9_18: %.1 = converted %.loc9_17, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %x: %.1 = bind_name x, %.loc9_18 +// CHECK:STDOUT: %.loc9_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_12.2: type = converted %.loc9_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_17: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_18: %empty_tuple.type = converted %.loc9_17, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %.loc9_18 // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_14.2: type = converted %.loc10_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc10_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_14.2: type = converted %.loc10_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -272,9 +272,9 @@ impl i32 as Empty { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.1 { +// CHECK:STDOUT: fn @F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.1 = name_ref x, @C.%x +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, @C.%x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -282,23 +282,23 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple.1: %.1 = tuple_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (%.1) [template] -// CHECK:STDOUT: %b: %.2 = bind_symbolic_name b, 0 [symbolic] -// CHECK:STDOUT: %b.patt: %.2 = symbolic_binding_pattern b, 0 [symbolic] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (%empty_tuple.type) [template] +// CHECK:STDOUT: %b: %tuple.type.1 = bind_symbolic_name b, 0 [symbolic] +// CHECK:STDOUT: %b.patt: %tuple.type.1 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %tuple.2: %.3 = tuple_value (%tuple.1, %tuple.1, %tuple.1) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.1, %.1) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] -// CHECK:STDOUT: %tuple.3: %.7 = tuple_value (%tuple.1, %tuple.1) [template] -// CHECK:STDOUT: %c: %.7 = bind_symbolic_name c, 1 [symbolic] -// CHECK:STDOUT: %tuple.4: %.2 = tuple_value (%tuple.1) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [template] +// CHECK:STDOUT: %.4: type = ptr_type %tuple.type.3 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.3 = tuple_value (%empty_tuple, %empty_tuple) [template] +// CHECK:STDOUT: %c: %tuple.type.3 = bind_symbolic_name c, 1 [symbolic] +// CHECK:STDOUT: %tuple.3: %tuple.type.1 = tuple_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -318,45 +318,45 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc9_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_12.2: type = converted %.loc9_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc9_17: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple.loc9: %.1 = tuple_value () [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc9_18: %.1 = converted %.loc9_17, %tuple.loc9 [template = constants.%tuple.1] -// CHECK:STDOUT: %a: %.1 = bind_name a, %.loc9_18 +// CHECK:STDOUT: %.loc9_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_12.2: type = converted %.loc9_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_17: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple.loc9: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_18: %empty_tuple.type = converted %.loc9_17, %empty_tuple.loc9 [template = constants.%empty_tuple] +// CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %.loc9_18 // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %b.patt.loc10_8.2: %.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] -// CHECK:STDOUT: %b.param_patt: %.2 = value_param_pattern %b.patt.loc10_8.2, runtime_param [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] +// CHECK:STDOUT: %b.patt.loc10_8.2: %tuple.type.1 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] +// CHECK:STDOUT: %b.param_patt: %tuple.type.1 = value_param_pattern %b.patt.loc10_8.2, runtime_param [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_14: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_16.1: %.2 = tuple_literal (%.loc10_14) -// CHECK:STDOUT: %.loc10_16.2: type = converted %.loc10_14, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_16.3: type = converted %.loc10_16.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %b.param: %.2 = value_param runtime_param -// CHECK:STDOUT: %b.loc10_8.2: %.2 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_8.1 (constants.%b)] +// CHECK:STDOUT: %.loc10_14: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_16.1: %tuple.type.1 = tuple_literal (%.loc10_14) +// CHECK:STDOUT: %.loc10_16.2: type = converted %.loc10_14, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_16.3: type = converted %.loc10_16.1, constants.%tuple.type.1 [template = constants.%tuple.type.1] +// CHECK:STDOUT: %b.param: %tuple.type.1 = value_param runtime_param +// CHECK:STDOUT: %b.loc10_8.2: %tuple.type.1 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_8.1 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22_13: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_17: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_21: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_22.1: %.3 = tuple_literal (%.loc22_13, %.loc22_17, %.loc22_21) -// CHECK:STDOUT: %.loc22_22.2: type = converted %.loc22_13, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc22_22.3: type = converted %.loc22_17, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc22_22.4: type = converted %.loc22_21, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc22_22.5: type = converted %.loc22_22.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc22_28: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_32: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_36: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_37.1: %.3 = tuple_literal (%.loc22_28, %.loc22_32, %.loc22_36) -// CHECK:STDOUT: %tuple.loc22_28: %.1 = tuple_value () [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc22_37.2: %.1 = converted %.loc22_28, %tuple.loc22_28 [template = constants.%tuple.1] -// CHECK:STDOUT: %tuple.loc22_32: %.1 = tuple_value () [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc22_37.3: %.1 = converted %.loc22_32, %tuple.loc22_32 [template = constants.%tuple.1] -// CHECK:STDOUT: %tuple.loc22_36: %.1 = tuple_value () [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc22_37.4: %.1 = converted %.loc22_36, %tuple.loc22_36 [template = constants.%tuple.1] -// CHECK:STDOUT: %tuple.loc22_37: %.3 = tuple_value (%.loc22_37.2, %.loc22_37.3, %.loc22_37.4) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc22_38: %.3 = converted %.loc22_37.1, %tuple.loc22_37 [template = constants.%tuple.2] -// CHECK:STDOUT: %d: %.3 = bind_name d, %.loc22_38 -// CHECK:STDOUT: %.loc23: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc22_13: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_17: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_21: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_22.1: %tuple.type.2 = tuple_literal (%.loc22_13, %.loc22_17, %.loc22_21) +// CHECK:STDOUT: %.loc22_22.2: type = converted %.loc22_13, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc22_22.3: type = converted %.loc22_17, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc22_22.4: type = converted %.loc22_21, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc22_22.5: type = converted %.loc22_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc22_28: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_32: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_36: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_37.1: %tuple.type.2 = tuple_literal (%.loc22_28, %.loc22_32, %.loc22_36) +// CHECK:STDOUT: %empty_tuple.loc22_28: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc22_37.2: %empty_tuple.type = converted %.loc22_28, %empty_tuple.loc22_28 [template = constants.%empty_tuple] +// CHECK:STDOUT: %empty_tuple.loc22_32: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc22_37.3: %empty_tuple.type = converted %.loc22_32, %empty_tuple.loc22_32 [template = constants.%empty_tuple] +// CHECK:STDOUT: %empty_tuple.loc22_36: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc22_37.4: %empty_tuple.type = converted %.loc22_36, %empty_tuple.loc22_36 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc22_37.2, %.loc22_37.3, %.loc22_37.4) [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc22_38: %tuple.type.2 = converted %.loc22_37.1, %tuple [template = constants.%tuple.1] +// CHECK:STDOUT: %d: %tuple.type.2 = bind_name d, %.loc22_38 +// CHECK:STDOUT: %.loc23: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -365,98 +365,98 @@ impl i32 as Empty { // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%b.loc10_8.2: %.2) { -// CHECK:STDOUT: %b.loc10_8.1: %.2 = bind_symbolic_name b, 0 [symbolic = %b.loc10_8.1 (constants.%b)] -// CHECK:STDOUT: %b.patt.loc10_8.1: %.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] +// CHECK:STDOUT: generic fn @F(%b.loc10_8.2: %tuple.type.1) { +// CHECK:STDOUT: %b.loc10_8.1: %tuple.type.1 = bind_symbolic_name b, 0 [symbolic = %b.loc10_8.1 (constants.%b)] +// CHECK:STDOUT: %b.patt.loc10_8.1: %tuple.type.1 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %c.loc11_9.2: %.7 = bind_symbolic_name c, 1 [symbolic = %c.loc11_9.2 (constants.%c)] +// CHECK:STDOUT: %c.loc11_9.2: %tuple.type.3 = bind_symbolic_name c, 1 [symbolic = %c.loc11_9.2 (constants.%c)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%b.param_patt: %.2) { +// CHECK:STDOUT: fn(%b.param_patt: %tuple.type.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_15: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_19: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_20.1: %.7 = tuple_literal (%.loc11_15, %.loc11_19) -// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_20.3: type = converted %.loc11_19, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_20.4: type = converted %.loc11_20.1, constants.%.7 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_26: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_30: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_31.1: %.7 = tuple_literal (%.loc11_26, %.loc11_30) -// CHECK:STDOUT: %tuple.loc11_26: %.1 = tuple_value () [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_31.2: %.1 = converted %.loc11_26, %tuple.loc11_26 [template = constants.%tuple.1] -// CHECK:STDOUT: %tuple.loc11_30: %.1 = tuple_value () [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_31.3: %.1 = converted %.loc11_30, %tuple.loc11_30 [template = constants.%tuple.1] -// CHECK:STDOUT: %tuple.loc11_31: %.7 = tuple_value (%.loc11_31.2, %.loc11_31.3) [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc11_32: %.7 = converted %.loc11_31.1, %tuple.loc11_31 [template = constants.%tuple.3] -// CHECK:STDOUT: %c.loc11_9.1: %.7 = bind_symbolic_name c, 1, %.loc11_32 [symbolic = %c.loc11_9.2 (constants.%c)] -// CHECK:STDOUT: %.loc13_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc13_14.2: type = converted %.loc13_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a1.var: ref %.1 = var a1 -// CHECK:STDOUT: %a1: ref %.1 = bind_name a1, %a1.var -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, @C.%a -// CHECK:STDOUT: %.loc13_18: init %.1 = tuple_init () to %a1.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc13_19: init %.1 = converted %a.ref, %.loc13_18 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_15: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_19: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%.loc11_15, %.loc11_19) +// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_20.3: type = converted %.loc11_19, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_20.4: type = converted %.loc11_20.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %.loc11_26: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_30: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_31.1: %tuple.type.3 = tuple_literal (%.loc11_26, %.loc11_30) +// CHECK:STDOUT: %empty_tuple.loc11_26: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_31.2: %empty_tuple.type = converted %.loc11_26, %empty_tuple.loc11_26 [template = constants.%empty_tuple] +// CHECK:STDOUT: %empty_tuple.loc11_30: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_31.3: %empty_tuple.type = converted %.loc11_30, %empty_tuple.loc11_30 [template = constants.%empty_tuple] +// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.loc11_31.2, %.loc11_31.3) [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc11_32: %tuple.type.3 = converted %.loc11_31.1, %tuple [template = constants.%tuple.2] +// CHECK:STDOUT: %c.loc11_9.1: %tuple.type.3 = bind_symbolic_name c, 1, %.loc11_32 [symbolic = %c.loc11_9.2 (constants.%c)] +// CHECK:STDOUT: %.loc13_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc13_14.2: type = converted %.loc13_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a1.var: ref %empty_tuple.type = var a1 +// CHECK:STDOUT: %a1: ref %empty_tuple.type = bind_name a1, %a1.var +// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, @C.%a +// CHECK:STDOUT: %.loc13_18: init %empty_tuple.type = tuple_init () to %a1.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_19: init %empty_tuple.type = converted %a.ref, %.loc13_18 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a1.var, %.loc13_19 -// CHECK:STDOUT: %.loc14_15: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_17.1: %.2 = tuple_literal (%.loc14_15) -// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_17.3: type = converted %.loc14_17.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %b1.var: ref %.2 = var b1 -// CHECK:STDOUT: %b1: ref %.2 = bind_name b1, %b1.var -// CHECK:STDOUT: %b.ref: %.2 = name_ref b, %b.loc10_8.2 [symbolic = %b.loc10_8.1 (constants.%b)] -// CHECK:STDOUT: %.loc14_21.1: %.1 = tuple_access %b.ref, element0 -// CHECK:STDOUT: %.loc14_21.2: ref %.1 = tuple_access %b1.var, element0 -// CHECK:STDOUT: %.loc14_21.3: init %.1 = tuple_init () to %.loc14_21.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc14_21.4: init %.1 = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc14_21.5: init %.2 = tuple_init (%.loc14_21.4) to %b1.var [template = constants.%tuple.4] -// CHECK:STDOUT: %.loc14_22: init %.2 = converted %b.ref, %.loc14_21.5 [template = constants.%tuple.4] +// CHECK:STDOUT: %.loc14_15: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%.loc14_15) +// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc14_17.3: type = converted %.loc14_17.1, constants.%tuple.type.1 [template = constants.%tuple.type.1] +// CHECK:STDOUT: %b1.var: ref %tuple.type.1 = var b1 +// CHECK:STDOUT: %b1: ref %tuple.type.1 = bind_name b1, %b1.var +// CHECK:STDOUT: %b.ref: %tuple.type.1 = name_ref b, %b.loc10_8.2 [symbolic = %b.loc10_8.1 (constants.%b)] +// CHECK:STDOUT: %.loc14_21.1: %empty_tuple.type = tuple_access %b.ref, element0 +// CHECK:STDOUT: %.loc14_21.2: ref %empty_tuple.type = tuple_access %b1.var, element0 +// CHECK:STDOUT: %.loc14_21.3: init %empty_tuple.type = tuple_init () to %.loc14_21.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_21.4: init %empty_tuple.type = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_21.5: init %tuple.type.1 = tuple_init (%.loc14_21.4) to %b1.var [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc14_22: init %tuple.type.1 = converted %b.ref, %.loc14_21.5 [template = constants.%tuple.3] // CHECK:STDOUT: assign %b1.var, %.loc14_22 -// CHECK:STDOUT: %.loc15_15: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_19: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_20.1: %.7 = tuple_literal (%.loc15_15, %.loc15_19) -// CHECK:STDOUT: %.loc15_20.2: type = converted %.loc15_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_20.3: type = converted %.loc15_19, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc15_20.4: type = converted %.loc15_20.1, constants.%.7 [template = constants.%.7] -// CHECK:STDOUT: %c1.var: ref %.7 = var c1 -// CHECK:STDOUT: %c1: ref %.7 = bind_name c1, %c1.var -// CHECK:STDOUT: %c.ref: %.7 = name_ref c, %c.loc11_9.1 [symbolic = %c.loc11_9.2 (constants.%c)] -// CHECK:STDOUT: %.loc15_24.1: %.1 = tuple_access %c.ref, element0 -// CHECK:STDOUT: %.loc15_24.2: ref %.1 = tuple_access %c1.var, element0 -// CHECK:STDOUT: %.loc15_24.3: init %.1 = tuple_init () to %.loc15_24.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc15_24.4: init %.1 = converted %.loc15_24.1, %.loc15_24.3 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc15_24.5: %.1 = tuple_access %c.ref, element1 -// CHECK:STDOUT: %.loc15_24.6: ref %.1 = tuple_access %c1.var, element1 -// CHECK:STDOUT: %.loc15_24.7: init %.1 = tuple_init () to %.loc15_24.6 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc15_24.8: init %.1 = converted %.loc15_24.5, %.loc15_24.7 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc15_24.9: init %.7 = tuple_init (%.loc15_24.4, %.loc15_24.8) to %c1.var [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc15_25: init %.7 = converted %c.ref, %.loc15_24.9 [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc15_15: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_19: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_20.1: %tuple.type.3 = tuple_literal (%.loc15_15, %.loc15_19) +// CHECK:STDOUT: %.loc15_20.2: type = converted %.loc15_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_20.3: type = converted %.loc15_19, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_20.4: type = converted %.loc15_20.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %c1.var: ref %tuple.type.3 = var c1 +// CHECK:STDOUT: %c1: ref %tuple.type.3 = bind_name c1, %c1.var +// CHECK:STDOUT: %c.ref: %tuple.type.3 = name_ref c, %c.loc11_9.1 [symbolic = %c.loc11_9.2 (constants.%c)] +// CHECK:STDOUT: %.loc15_24.1: %empty_tuple.type = tuple_access %c.ref, element0 +// CHECK:STDOUT: %.loc15_24.2: ref %empty_tuple.type = tuple_access %c1.var, element0 +// CHECK:STDOUT: %.loc15_24.3: init %empty_tuple.type = tuple_init () to %.loc15_24.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.4: init %empty_tuple.type = converted %.loc15_24.1, %.loc15_24.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.5: %empty_tuple.type = tuple_access %c.ref, element1 +// CHECK:STDOUT: %.loc15_24.6: ref %empty_tuple.type = tuple_access %c1.var, element1 +// CHECK:STDOUT: %.loc15_24.7: init %empty_tuple.type = tuple_init () to %.loc15_24.6 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.8: init %empty_tuple.type = converted %.loc15_24.5, %.loc15_24.7 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_24.9: init %tuple.type.3 = tuple_init (%.loc15_24.4, %.loc15_24.8) to %c1.var [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc15_25: init %tuple.type.3 = converted %c.ref, %.loc15_24.9 [template = constants.%tuple.2] // CHECK:STDOUT: assign %c1.var, %.loc15_25 -// CHECK:STDOUT: %.loc16_15: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_19: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_23: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc16_24.1: %.3 = tuple_literal (%.loc16_15, %.loc16_19, %.loc16_23) -// CHECK:STDOUT: %.loc16_24.2: type = converted %.loc16_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc16_24.3: type = converted %.loc16_19, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc16_24.4: type = converted %.loc16_23, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc16_24.5: type = converted %.loc16_24.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %d1.var: ref %.3 = var d1 -// CHECK:STDOUT: %d1: ref %.3 = bind_name d1, %d1.var -// CHECK:STDOUT: %d.ref: %.3 = name_ref d, @C.%d -// CHECK:STDOUT: %.loc16_28.1: %.1 = tuple_access %d.ref, element0 -// CHECK:STDOUT: %.loc16_28.2: ref %.1 = tuple_access %d1.var, element0 -// CHECK:STDOUT: %.loc16_28.3: init %.1 = tuple_init () to %.loc16_28.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_28.4: init %.1 = converted %.loc16_28.1, %.loc16_28.3 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_28.5: %.1 = tuple_access %d.ref, element1 -// CHECK:STDOUT: %.loc16_28.6: ref %.1 = tuple_access %d1.var, element1 -// CHECK:STDOUT: %.loc16_28.7: init %.1 = tuple_init () to %.loc16_28.6 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_28.8: init %.1 = converted %.loc16_28.5, %.loc16_28.7 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_28.9: %.1 = tuple_access %d.ref, element2 -// CHECK:STDOUT: %.loc16_28.10: ref %.1 = tuple_access %d1.var, element2 -// CHECK:STDOUT: %.loc16_28.11: init %.1 = tuple_init () to %.loc16_28.10 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_28.12: init %.1 = converted %.loc16_28.9, %.loc16_28.11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_28.13: init %.3 = tuple_init (%.loc16_28.4, %.loc16_28.8, %.loc16_28.12) to %d1.var [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc16_29: init %.3 = converted %d.ref, %.loc16_28.13 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc16_15: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_19: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_23: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc16_24.1: %tuple.type.2 = tuple_literal (%.loc16_15, %.loc16_19, %.loc16_23) +// CHECK:STDOUT: %.loc16_24.2: type = converted %.loc16_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc16_24.3: type = converted %.loc16_19, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc16_24.4: type = converted %.loc16_23, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc16_24.5: type = converted %.loc16_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %d1.var: ref %tuple.type.2 = var d1 +// CHECK:STDOUT: %d1: ref %tuple.type.2 = bind_name d1, %d1.var +// CHECK:STDOUT: %d.ref: %tuple.type.2 = name_ref d, @C.%d +// CHECK:STDOUT: %.loc16_28.1: %empty_tuple.type = tuple_access %d.ref, element0 +// CHECK:STDOUT: %.loc16_28.2: ref %empty_tuple.type = tuple_access %d1.var, element0 +// CHECK:STDOUT: %.loc16_28.3: init %empty_tuple.type = tuple_init () to %.loc16_28.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.4: init %empty_tuple.type = converted %.loc16_28.1, %.loc16_28.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.5: %empty_tuple.type = tuple_access %d.ref, element1 +// CHECK:STDOUT: %.loc16_28.6: ref %empty_tuple.type = tuple_access %d1.var, element1 +// CHECK:STDOUT: %.loc16_28.7: init %empty_tuple.type = tuple_init () to %.loc16_28.6 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.8: init %empty_tuple.type = converted %.loc16_28.5, %.loc16_28.7 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.9: %empty_tuple.type = tuple_access %d.ref, element2 +// CHECK:STDOUT: %.loc16_28.10: ref %empty_tuple.type = tuple_access %d1.var, element2 +// CHECK:STDOUT: %.loc16_28.11: init %empty_tuple.type = tuple_init () to %.loc16_28.10 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.12: init %empty_tuple.type = converted %.loc16_28.9, %.loc16_28.11 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc16_28.13: init %tuple.type.2 = tuple_init (%.loc16_28.4, %.loc16_28.8, %.loc16_28.12) to %d1.var [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc16_29: init %tuple.type.2 = converted %d.ref, %.loc16_28.13 [template = constants.%tuple.1] // CHECK:STDOUT: assign %d1.var, %.loc16_29 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -471,12 +471,12 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -497,18 +497,18 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc5_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x: %.1 = bind_name x, -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, +// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -516,11 +516,11 @@ impl i32 as Empty { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.1 { +// CHECK:STDOUT: fn @F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.1 = name_ref x, @C.%x -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc5_26: %.1 = converted %x.ref, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, @C.%x +// CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc5_26: %empty_tuple.type = converted %x.ref, %tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc5_26 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -528,11 +528,11 @@ impl i32 as Empty { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -570,7 +570,7 @@ impl i32 as Empty { // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5, %.loc5_14.1 [template = i32] -// CHECK:STDOUT: %.loc5_20: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc5_20: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %Zero: i32 = bind_symbolic_name Zero, 0, %.loc5_20 [symbolic = constants.%Zero] // CHECK:STDOUT: %Zero.ref: i32 = name_ref Zero, %Zero [symbolic = constants.%Zero] // CHECK:STDOUT: return %Zero.ref @@ -580,14 +580,14 @@ impl i32 as Empty { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: i32 = bind_symbolic_name Zero, 0 [symbolic] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -621,20 +621,20 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc5: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc5 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_32.loc6, %.loc6_16.1 [template = i32] -// CHECK:STDOUT: %.loc6_22: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_22: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %Zero: i32 = bind_symbolic_name Zero, 0, %.loc6_22 [symbolic = constants.%Zero] // CHECK:STDOUT: %Zero.ref: i32 = name_ref Zero, %Zero [symbolic = constants.%Zero] // CHECK:STDOUT: return %Zero.ref // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc9: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc9: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: return %.loc9 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -644,10 +644,10 @@ impl i32 as Empty { // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // 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 = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [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] @@ -657,18 +657,18 @@ impl i32 as Empty { // CHECK:STDOUT: %Self.3: %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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [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: %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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element1, @I.%F.decl [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -681,7 +681,7 @@ impl i32 as Empty { // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -702,17 +702,17 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc5_21.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_21.2: type = converted %int.make_type_32, %.loc5_21.1 [template = i32] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc5_21.3: %.2 = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc5_21.3: %.1 = assoc_entity element0, %T [template = constants.%.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: %.2 = name_ref T, @I.%.loc5_21.3 [template = constants.%.3] +// CHECK:STDOUT: %T.ref: %.1 = name_ref T, @I.%.loc5_21.3 [template = constants.%.2] // CHECK:STDOUT: %.loc13: type = converted %T.ref, [template = ] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.9 = assoc_entity element1, %F.decl [template = constants.%.10] +// CHECK:STDOUT: %.loc13: %.8 = assoc_entity element1, %F.decl [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -730,8 +730,8 @@ impl i32 as Empty { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -786,8 +786,8 @@ impl i32 as Empty { // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.1) {} @@ -797,12 +797,12 @@ impl i32 as Empty { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I: type = class_type @I [template] // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -836,7 +836,7 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%I @@ -852,7 +852,7 @@ impl i32 as Empty { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -903,10 +903,10 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.type: type = interface_type @Empty [template] // CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [symbolic] // 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 0 [template] -// CHECK:STDOUT: %.3: = interface_witness () [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -945,9 +945,9 @@ impl i32 as Empty { // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_14.2: type = converted %int.make_type_32.loc10, %.loc10_14.1 [template = i32] -// CHECK:STDOUT: %.loc10_20: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_20: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %Zero: i32 = bind_name Zero, %.loc10_20 -// CHECK:STDOUT: %.loc6_19: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc6_19: = interface_witness () [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index 502ce261e1df..6c92efd37aff 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -19,17 +19,17 @@ fn F() -> 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,52 +66,52 @@ fn F() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_21: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_24.1: %.2 = tuple_literal (%int.make_type_32.loc12_11, %int.make_type_32.loc12_16, %int.make_type_32.loc12_21) +// CHECK:STDOUT: %.loc12_24.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12_11, %int.make_type_32.loc12_16, %int.make_type_32.loc12_21) // CHECK:STDOUT: %.loc12_24.2: type = value_of_initializer %int.make_type_32.loc12_11 [template = i32] // CHECK:STDOUT: %.loc12_24.3: type = converted %int.make_type_32.loc12_11, %.loc12_24.2 [template = i32] // CHECK:STDOUT: %.loc12_24.4: type = value_of_initializer %int.make_type_32.loc12_16 [template = i32] // CHECK:STDOUT: %.loc12_24.5: type = converted %int.make_type_32.loc12_16, %.loc12_24.4 [template = i32] // CHECK:STDOUT: %.loc12_24.6: type = value_of_initializer %int.make_type_32.loc12_21 [template = i32] // CHECK:STDOUT: %.loc12_24.7: type = converted %int.make_type_32.loc12_21, %.loc12_24.6 [template = i32] -// CHECK:STDOUT: %.loc12_24.8: type = converted %.loc12_24.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %v.var: ref %.3 = var v -// CHECK:STDOUT: %v: ref %.3 = bind_name v, %v.var -// CHECK:STDOUT: %.loc12_29: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_32: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_35: i32 = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_36.1: %.3 = tuple_literal (%.loc12_29, %.loc12_32, %.loc12_35) +// CHECK:STDOUT: %.loc12_24.8: type = converted %.loc12_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v +// CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var +// CHECK:STDOUT: %.loc12_29: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_32: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_35: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_36.1: %tuple.type.2 = tuple_literal (%.loc12_29, %.loc12_32, %.loc12_35) // CHECK:STDOUT: %.loc12_36.2: ref i32 = tuple_access %v.var, element0 -// CHECK:STDOUT: %.loc12_36.3: init i32 = initialize_from %.loc12_29 to %.loc12_36.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_36.3: init i32 = initialize_from %.loc12_29 to %.loc12_36.2 [template = constants.%.2] // CHECK:STDOUT: %.loc12_36.4: ref i32 = tuple_access %v.var, element1 -// CHECK:STDOUT: %.loc12_36.5: init i32 = initialize_from %.loc12_32 to %.loc12_36.4 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_36.5: init i32 = initialize_from %.loc12_32 to %.loc12_36.4 [template = constants.%.3] // CHECK:STDOUT: %.loc12_36.6: ref i32 = tuple_access %v.var, element2 -// CHECK:STDOUT: %.loc12_36.7: init i32 = initialize_from %.loc12_35 to %.loc12_36.6 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_36.8: init %.3 = tuple_init (%.loc12_36.3, %.loc12_36.5, %.loc12_36.7) to %v.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_37: init %.3 = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_36.7: init i32 = initialize_from %.loc12_35 to %.loc12_36.6 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_36.8: init %tuple.type.2 = tuple_init (%.loc12_36.3, %.loc12_36.5, %.loc12_36.7) to %v.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_37: init %tuple.type.2 = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] // CHECK:STDOUT: assign %v.var, %.loc12_37 // 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: %.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.1: %tuple.type.1 = 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.%.3 [template = constants.%.3] -// CHECK:STDOUT: %v.ref: ref %.3 = name_ref v, %v +// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %v.ref: ref %tuple.type.2 = name_ref v, %v // CHECK:STDOUT: %.loc14_28.1: ref i32 = tuple_access %v.ref, element0 // CHECK:STDOUT: %.loc14_28.2: i32 = bind_value %.loc14_28.1 // CHECK:STDOUT: %.loc14_28.3: ref i32 = tuple_access %v.ref, element1 // CHECK:STDOUT: %.loc14_28.4: i32 = bind_value %.loc14_28.3 // CHECK:STDOUT: %.loc14_28.5: ref i32 = tuple_access %v.ref, element2 // CHECK:STDOUT: %.loc14_28.6: i32 = bind_value %.loc14_28.5 -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_28.2, %.loc14_28.4, %.loc14_28.6) -// CHECK:STDOUT: %.loc14_29: %.3 = converted %v.ref, %tuple -// CHECK:STDOUT: %w: %.3 = bind_name w, %.loc14_29 -// CHECK:STDOUT: %w.ref: %.3 = name_ref w, %w -// CHECK:STDOUT: %.loc15_12: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_28.2, %.loc14_28.4, %.loc14_28.6) +// CHECK:STDOUT: %.loc14_29: %tuple.type.2 = converted %v.ref, %tuple +// CHECK:STDOUT: %w: %tuple.type.2 = bind_name w, %.loc14_29 +// CHECK:STDOUT: %w.ref: %tuple.type.2 = name_ref w, %w +// CHECK:STDOUT: %.loc15_12: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc15_11: i32 = tuple_access %w.ref, element1 // CHECK:STDOUT: return %.loc15_11 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 29084c19751d..cf0590df8e90 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -23,12 +23,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.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 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,12 +54,12 @@ fn F() { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_16: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %a.loc12: i32 = bind_name a, %.loc12_16 // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_10.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_10.2: type = converted %int.make_type_32.loc19, %.loc19_10.1 [template = i32] -// CHECK:STDOUT: %.loc19_16: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_16: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: %a.loc19: i32 = bind_name a, %.loc19_16 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 8c37f0d92521..c21283c8b93b 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -32,12 +32,12 @@ fn F(a: i32) -> 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: i32 = int_value 5 [template] +// CHECK:STDOUT: %.1: i32 = int_value 5 [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] @@ -47,19 +47,19 @@ fn F(a: i32) -> i32 { // 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(%T) [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// 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 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: %.2 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.3 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,7 +72,7 @@ fn F(a: i32) -> i32 { // 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 @@ -112,8 +112,8 @@ fn F(a: i32) -> i32 { // 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: @@ -132,7 +132,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_32.loc13, %.loc13_21.1 [template = i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc13_21.2 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc21_14: i32 = int_value 5 [template = constants.%.2] +// CHECK:STDOUT: %.loc21_14: i32 = int_value 5 [template = constants.%.1] // CHECK:STDOUT: %.loc21_15: %T = converted %.loc21_14, [template = ] // CHECK:STDOUT: %x: %T = bind_name x, // CHECK:STDOUT: %x.ref: %T = name_ref x, %x @@ -178,8 +178,8 @@ fn F(a: i32) -> i32 { // 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: // CHECK:STDOUT: specific @ImplicitAs(i32) { @@ -191,7 +191,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index af534c4f217d..47f68fab4f14 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -32,7 +32,7 @@ let a: T = 0; // 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: diff --git a/toolchain/check/testdata/let/fail_missing_value.carbon b/toolchain/check/testdata/let/fail_missing_value.carbon index 65bf5c1e5da2..239cbcb4257f 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -25,7 +25,7 @@ fn F() { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index a2ab07de47c8..5912749674e3 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -87,9 +87,9 @@ protected protected let i: i32 = 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: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -144,21 +144,21 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc15 -// CHECK:STDOUT: %.loc21: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc21: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc21 -// CHECK:STDOUT: %.loc27: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc27: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %d: i32 = bind_name d, %.loc27 -// CHECK:STDOUT: %.loc33: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc33: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %e: i32 = bind_name e, %.loc33 -// CHECK:STDOUT: %.loc46: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc46: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %f: i32 = bind_name f, %.loc46 -// CHECK:STDOUT: %.loc59: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc59: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %g: i32 = bind_name g, %.loc59 -// CHECK:STDOUT: %.loc72: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc72: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %h: i32 = bind_name h, %.loc72 -// CHECK:STDOUT: %.loc84: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc84: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %i: i32 = bind_name i, %.loc84 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index ae317186b797..76529718b32a 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -19,7 +19,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 19e724c38d25..e29555207bb9 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -18,12 +18,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,14 +51,14 @@ fn F() { // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_32, %.loc12_21.1 [template = i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc12_21.2 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc13: type = ptr_type %T [symbolic = constants.%.2] -// CHECK:STDOUT: %p.var: ref %.2 = var p -// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var +// CHECK:STDOUT: %.loc13: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: %p.var: ref %.1 = var p +// CHECK:STDOUT: %p: ref %.1 = bind_name p, %p.var // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %a.var: ref %T = var a // CHECK:STDOUT: %a: ref %T = bind_name a, %a.var -// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p -// CHECK:STDOUT: %.loc14_15: %.2 = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref %.1 = name_ref p, %p +// CHECK:STDOUT: %.loc14_15: %.1 = bind_value %p.ref // CHECK:STDOUT: %.loc14_14.1: ref %T = deref %.loc14_15 // CHECK:STDOUT: %.loc14_14.2: %T = bind_value %.loc14_14.1 // CHECK:STDOUT: assign %a.var, %.loc14_14.2 diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 3f9352cd498a..0f7972bfa99d 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -36,7 +36,7 @@ var b: T = *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: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index 127bd059c0c8..c1a0f1bee0b9 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -16,9 +16,9 @@ fn F() -> i32 { return n; } // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -64,7 +64,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc11 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 05438fcbaf84..5119977cd0e5 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -17,7 +17,7 @@ fn F(a: i32) -> 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] diff --git a/toolchain/check/testdata/let/no_prelude/import.carbon b/toolchain/check/testdata/let/no_prelude/import.carbon index 624ccc057e14..56fdc5a4f306 100644 --- a/toolchain/check/testdata/let/no_prelude/import.carbon +++ b/toolchain/check/testdata/let/no_prelude/import.carbon @@ -35,35 +35,35 @@ let b: () = Other.a; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .a = @__global_init.%a // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_15: %.1 = converted %.loc4_14, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %a: %.1 = bind_name a, %.loc4_15 +// CHECK:STDOUT: %.loc4_14: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_15: %empty_tuple.type = converted %.loc4_14, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %.loc4_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: %.1 = import_ref Implicit//default, inst+4, loaded +// CHECK:STDOUT: %import_ref: %empty_tuple.type = import_ref Implicit//default, inst+4, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -73,45 +73,45 @@ let b: () = Other.a; // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, imports.%import_ref -// CHECK:STDOUT: %b: %.1 = bind_name b, %a.ref +// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, imports.%import_ref +// CHECK:STDOUT: %b: %empty_tuple.type = bind_name b, %a.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- other.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .a = @__global_init.%a // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_15: %.1 = converted %.loc4_14, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %a: %.1 = bind_name a, %.loc4_15 +// CHECK:STDOUT: %.loc4_14: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_15: %empty_tuple.type = converted %.loc4_14, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %.loc4_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_other.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,7 +119,7 @@ let b: () = Other.a; // CHECK:STDOUT: .a = %import_ref // CHECK:STDOUT: import Other//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %.1 = import_ref Other//default, inst+4, loaded +// CHECK:STDOUT: %import_ref: %empty_tuple.type = import_ref Other//default, inst+4, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -128,15 +128,15 @@ let b: () = Other.a; // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %a.ref: %.1 = name_ref a, imports.%import_ref -// CHECK:STDOUT: %b: %.1 = bind_name b, %a.ref +// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, imports.%import_ref +// CHECK:STDOUT: %b: %empty_tuple.type = bind_name b, %a.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/no_prelude/import_access.carbon b/toolchain/check/testdata/let/no_prelude/import_access.carbon index 6c5553da8f9f..9d7e9bb94a8a 100644 --- a/toolchain/check/testdata/let/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/let/no_prelude/import_access.carbon @@ -54,35 +54,35 @@ let v2: () = Test.v; // CHECK:STDOUT: --- def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v [private] = @__global_init.%v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_22: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_23: %.1 = converted %.loc4_22, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %v: %.1 = bind_name v, %.loc4_23 +// CHECK:STDOUT: %.loc4_22: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_23: %empty_tuple.type = converted %.loc4_22, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %v: %empty_tuple.type = bind_name v, %.loc4_23 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: %.1 = import_ref Test//def, inst+4, loaded +// CHECK:STDOUT: %import_ref: %empty_tuple.type = import_ref Test//def, inst+4, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -92,21 +92,21 @@ let v2: () = Test.v; // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: %.1 = name_ref v, imports.%import_ref -// CHECK:STDOUT: %v2: %.1 = bind_name v2, %v.ref +// CHECK:STDOUT: %v.ref: %empty_tuple.type = name_ref v, imports.%import_ref +// CHECK:STDOUT: %v2: %empty_tuple.type = bind_name v2, %v.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,21 +114,21 @@ let v2: () = Test.v; // CHECK:STDOUT: .v2 = @__global_init.%v2 // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.ref: = name_ref v, [template = ] -// CHECK:STDOUT: %v2: %.1 = bind_name v2, +// CHECK:STDOUT: %v2: %empty_tuple.type = bind_name v2, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_other_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -143,15 +143,15 @@ let v2: () = Test.v; // CHECK:STDOUT: .v2 = @__global_init.%v2 // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc9_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_10.2: type = converted %.loc9_10.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_10.2: type = converted %.loc9_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] // CHECK:STDOUT: %v.ref: = name_ref v, [template = ] -// CHECK:STDOUT: %v2: %.1 = bind_name v2, +// CHECK:STDOUT: %v2: %empty_tuple.type = bind_name v2, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 9c4399e2fbe9..b4d2122ca0e6 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -18,11 +18,11 @@ fn F(a: i32) -> 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,7 +66,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_16: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %a.loc12: i32 = bind_name a, %.loc12_16 // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a.loc12 // CHECK:STDOUT: return %a.ref diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index c5956d80f293..6d08329debc4 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -44,11 +44,11 @@ var a: i32 = NS.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: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -94,7 +94,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_27: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_27: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc4_27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index bfb48843697c..3c8be8b0c83a 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -24,11 +24,11 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -98,7 +98,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_27: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_27: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc15_27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon index 320a612c4617..0b9db3fd3fe3 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon @@ -69,10 +69,10 @@ fn NS(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.3: %.type.2 = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,9 +92,9 @@ fn NS(); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %NS.loc8: = namespace [template] {} -// CHECK:STDOUT: %.decl.loc18: %.type.1 = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl.loc18: %.type.1 = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: %NS.loc22: = namespace [template] {} -// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.3] {} {} +// CHECK:STDOUT: %.decl.loc31: %.type.2 = fn_decl @.2 [template = constants.%.2] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon index 0768c9fd2dc0..95698e0809ee 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon @@ -53,8 +53,8 @@ fn NS.Foo(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -77,7 +77,7 @@ fn NS.Foo(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon index fd68a902aa0b..c94b3de03913 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon @@ -55,7 +55,7 @@ fn Other.Nested.F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon index 49db13ae0980..b3580275a8cd 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon @@ -43,7 +43,7 @@ fn NS.Foo(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -69,10 +69,10 @@ fn NS.Foo(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,7 +91,7 @@ fn NS.Foo(); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %.loc14: = namespace [template] {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon index 537fe09e6461..ffea48582364 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon @@ -42,7 +42,7 @@ fn NS.Bar() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -74,7 +74,7 @@ fn NS.Bar() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -103,7 +103,7 @@ fn NS.Bar() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon index e2a46f76f78c..3761fe7d991d 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon @@ -42,7 +42,7 @@ fn NS.Bar() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,7 +71,7 @@ fn NS.Bar() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -103,7 +103,7 @@ fn NS.Bar() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index abec4fa8a7db..b1bdff29d5d7 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -25,11 +25,11 @@ fn ns.A() -> i32 { return 0; } // 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: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,7 +51,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %NS: = namespace [template] {} // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %ns: = bind_alias ns, %NS [template = %NS] -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { @@ -67,7 +67,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_27: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc22_27: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: return %.loc22_27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index a9b5873809e5..9e278fee4cf7 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.carbon @@ -26,7 +26,7 @@ fn Foo.Baz() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Baz: %Baz.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 71a25e58ba80..5234478410a9 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -42,7 +42,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] @@ -50,7 +50,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,7 +88,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %x: %T = bind_name x, %x.param // CHECK:STDOUT: %C: = namespace [template] {} // CHECK:STDOUT: %D: = namespace [template] {} -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc39_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc39_6.2 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon index 6af7bae82fec..b8d477375335 100644 --- a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon +++ b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon @@ -18,8 +18,8 @@ fn Foo.Baz() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: %.type = struct_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -34,7 +34,7 @@ fn Foo.Baz() { // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1() { diff --git a/toolchain/check/testdata/namespace/function.carbon b/toolchain/check/testdata/namespace/function.carbon index 632801f7e475..2a1f30197116 100644 --- a/toolchain/check/testdata/namespace/function.carbon +++ b/toolchain/check/testdata/namespace/function.carbon @@ -25,7 +25,7 @@ fn Bar() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Baz.type.1: type = fn_type @Baz.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Baz.1: %Baz.type.1 = struct_value () [template] // CHECK:STDOUT: %Baz.type.2: type = fn_type @Baz.2 [template] // CHECK:STDOUT: %Baz.2: %Baz.type.2 = struct_value () [template] @@ -70,7 +70,7 @@ fn Bar() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo [template = file.%Foo] // CHECK:STDOUT: %Baz.ref: %Baz.type.2 = name_ref Baz, file.%Baz.decl.loc17 [template = constants.%Baz.2] -// CHECK:STDOUT: %Baz.call: init %.1 = call %Baz.ref() +// CHECK:STDOUT: %Baz.call: init %empty_tuple.type = call %Baz.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/imported.carbon b/toolchain/check/testdata/namespace/imported.carbon index 27e852018c15..ec024e9dc882 100644 --- a/toolchain/check/testdata/namespace/imported.carbon +++ b/toolchain/check/testdata/namespace/imported.carbon @@ -32,7 +32,7 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] @@ -69,7 +69,7 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] @@ -106,22 +106,22 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var -// CHECK:STDOUT: %.loc7_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_17.2: type = converted %.loc7_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %package_a.var: ref %.1 = var package_a -// CHECK:STDOUT: %package_a: ref %.1 = bind_name package_a, %package_a.var -// CHECK:STDOUT: %.loc8_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %package_b.var: ref %.1 = var package_b -// CHECK:STDOUT: %package_b: ref %.1 = bind_name package_b, %package_b.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %.loc5_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var +// CHECK:STDOUT: %.loc7_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_17.2: type = converted %.loc7_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %package_a.var: ref %empty_tuple.type = var package_a +// CHECK:STDOUT: %package_a: ref %empty_tuple.type = bind_name package_a, %package_a.var +// CHECK:STDOUT: %.loc8_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %package_b.var: ref %empty_tuple.type = var package_b +// CHECK:STDOUT: %package_b: ref %empty_tuple.type = bind_name package_b, %package_b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -132,23 +132,23 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref.loc4: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %A.ref.loc4: %A.type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %A.call.loc4: init %.1 = call %A.ref.loc4() +// CHECK:STDOUT: %A.call.loc4: init %empty_tuple.type = call %A.ref.loc4() // CHECK:STDOUT: assign file.%a.var, %A.call.loc4 // CHECK:STDOUT: %NS.ref.loc5: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %ChildNS.ref.loc5: = name_ref ChildNS, imports.%ChildNS [template = imports.%ChildNS] // CHECK:STDOUT: %B.ref.loc5: %B.type = name_ref B, imports.%import_ref.4 [template = constants.%B] -// CHECK:STDOUT: %B.call.loc5: init %.1 = call %B.ref.loc5() +// CHECK:STDOUT: %B.call.loc5: init %empty_tuple.type = call %B.ref.loc5() // CHECK:STDOUT: assign file.%b.var, %B.call.loc5 // CHECK:STDOUT: %package.ref.loc7: = name_ref package, package [template = package] // CHECK:STDOUT: %NS.ref.loc7: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %A.ref.loc7: %A.type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %A.call.loc7: init %.1 = call %A.ref.loc7() +// CHECK:STDOUT: %A.call.loc7: init %empty_tuple.type = call %A.ref.loc7() // CHECK:STDOUT: assign file.%package_a.var, %A.call.loc7 // CHECK:STDOUT: %package.ref.loc8: = name_ref package, package [template = package] // CHECK:STDOUT: %NS.ref.loc8: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %ChildNS.ref.loc8: = name_ref ChildNS, imports.%ChildNS [template = imports.%ChildNS] // CHECK:STDOUT: %B.ref.loc8: %B.type = name_ref B, imports.%import_ref.4 [template = constants.%B] -// CHECK:STDOUT: %B.call.loc8: init %.1 = call %B.ref.loc8() +// CHECK:STDOUT: %B.call.loc8: init %empty_tuple.type = call %B.ref.loc8() // CHECK:STDOUT: assign file.%package_b.var, %B.call.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/imported_indirect.carbon b/toolchain/check/testdata/namespace/imported_indirect.carbon index 31161b39d05b..d0ebe1d994a5 100644 --- a/toolchain/check/testdata/namespace/imported_indirect.carbon +++ b/toolchain/check/testdata/namespace/imported_indirect.carbon @@ -114,7 +114,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -155,7 +155,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: --- e.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } @@ -188,10 +188,10 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc5_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @D(); @@ -202,7 +202,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: %B.ref: = name_ref B, imports.%B [template = imports.%B] // CHECK:STDOUT: %C.ref: = name_ref C, imports.%C [template = imports.%C] // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() +// CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() // CHECK:STDOUT: assign file.%e.var, %D.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/merging.carbon b/toolchain/check/testdata/namespace/merging.carbon index 1b2bd4e0fe50..3fa9d5191cf1 100644 --- a/toolchain/check/testdata/namespace/merging.carbon +++ b/toolchain/check/testdata/namespace/merging.carbon @@ -50,7 +50,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -82,7 +82,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B1.type: type = fn_type @B1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %B1: %B1.type = struct_value () [template] // CHECK:STDOUT: %B2.type: type = fn_type @B2 [template] // CHECK:STDOUT: %B2: %B2.type = struct_value () [template] @@ -127,7 +127,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] @@ -183,16 +183,16 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref.loc12: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: %NS.ref.loc13: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %B1.ref: %B1.type = name_ref B1, imports.%import_ref.3 [template = constants.%B1] -// CHECK:STDOUT: %B1.call: init %.1 = call %B1.ref() +// CHECK:STDOUT: %B1.call: init %empty_tuple.type = call %B1.ref() // CHECK:STDOUT: %NS.ref.loc14: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %B2.ref: %B2.type = name_ref B2, imports.%import_ref.4 [template = constants.%B2] -// CHECK:STDOUT: %B2.call: init %.1 = call %B2.ref() +// CHECK:STDOUT: %B2.call: init %empty_tuple.type = call %B2.ref() // CHECK:STDOUT: %NS.ref.loc15: = name_ref NS, imports.%NS [template = imports.%NS] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.call: init %.1 = call %C.ref() +// CHECK:STDOUT: %C.call: init %empty_tuple.type = call %C.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index c8f717179e03..b38854f844a4 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -83,9 +83,9 @@ fn Run() { // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -151,14 +151,14 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/namespace/nested.carbon b/toolchain/check/testdata/namespace/nested.carbon index e6ec87def785..099689529cf6 100644 --- a/toolchain/check/testdata/namespace/nested.carbon +++ b/toolchain/check/testdata/namespace/nested.carbon @@ -22,7 +22,7 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Wiz.type: type = fn_type @Wiz [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Wiz: %Wiz.type = struct_value () [template] // CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] // CHECK:STDOUT: %Baz: %Baz.type = struct_value () [template] @@ -62,7 +62,7 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo [template = file.%Foo] // CHECK:STDOUT: %Bar.ref: = name_ref Bar, file.%Bar [template = file.%Bar] // CHECK:STDOUT: %Wiz.ref: %Wiz.type = name_ref Wiz, file.%Wiz.decl [template = constants.%Wiz] -// CHECK:STDOUT: %Wiz.call: init %.1 = call %Wiz.ref() +// CHECK:STDOUT: %Wiz.call: init %empty_tuple.type = call %Wiz.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index bac8daaa84ec..3bda376d1d6e 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -31,7 +31,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type.1: type = fn_type @A.1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.1: %A.type.1 = struct_value () [template] // CHECK:STDOUT: %A.type.2: type = fn_type @A.2 [template] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [template] @@ -39,8 +39,8 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,8 +89,8 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref.loc20: %A.type.2 = name_ref A, file.%A.decl.loc14 [template = constants.%A.2] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref.loc20() -// CHECK:STDOUT: %.loc21: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref.loc20() +// CHECK:STDOUT: %.loc21: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc21 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: @@ -99,14 +99,14 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %.loc22_12.2: type = converted %int.make_type_32.loc22, %.loc22_12.1 [template = i32] // CHECK:STDOUT: %A.var: ref i32 = var A // CHECK:STDOUT: %A: ref i32 = bind_name A, %A.var -// CHECK:STDOUT: %.loc22_18: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc22_18: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: assign %A.var, %.loc22_18 // CHECK:STDOUT: %A.ref.loc25: ref i32 = name_ref A, %A // CHECK:STDOUT: %.loc25: i32 = bind_value %A.ref.loc25 // CHECK:STDOUT: return %.loc25 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc27: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc27: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: return %.loc27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/unqualified_lookup.carbon b/toolchain/check/testdata/namespace/unqualified_lookup.carbon index 94e20cfe1f56..611d58dc6883 100644 --- a/toolchain/check/testdata/namespace/unqualified_lookup.carbon +++ b/toolchain/check/testdata/namespace/unqualified_lookup.carbon @@ -34,7 +34,7 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] @@ -89,27 +89,27 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: fn @CallA() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallAB() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %B.call: init %.1 = call %B.ref() +// CHECK:STDOUT: %B.call: init %empty_tuple.type = call %B.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallABC() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() +// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref() // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %B.call: init %.1 = call %B.ref() +// CHECK:STDOUT: %B.call: init %empty_tuple.type = call %B.ref() // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.call: init %.1 = call %C.ref() +// CHECK:STDOUT: %C.call: init %empty_tuple.type = call %C.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index 99f40c2163de..04f5fe72c659 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -30,19 +30,19 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %.3: bool = bool_literal false [template] +// CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] // CHECK:STDOUT: } @@ -113,13 +113,13 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_25: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc11_25: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: return %.loc11_25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_25: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc12_25: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: return %.loc12_25 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -129,7 +129,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc15_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc15_14.2: bool = converted %F.call, %.loc15_14.1 -// CHECK:STDOUT: %.loc15_14.3: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc15_14.3: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc15_14.2 br !and.rhs else br !and.result(%.loc15_14.3) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: @@ -146,16 +146,16 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc19_18.1: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc19_13: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc19_18.1: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc19_13 br !and.rhs.loc19 else br !and.result.loc19(%.loc19_18.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc19: -// CHECK:STDOUT: %.loc19_22: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc19_22: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: br !and.result.loc19(%.loc19_22) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc19: -// CHECK:STDOUT: %.loc19_18.2: bool = block_arg !and.result.loc19 [template = constants.%.2] +// CHECK:STDOUT: %.loc19_18.2: bool = block_arg !and.result.loc19 [template = constants.%.1] // CHECK:STDOUT: if %.loc19_18.2 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: @@ -165,26 +165,26 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_32.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_43: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_37: type = converted %.loc19_43, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_43: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_37: type = converted %.loc19_43, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_37) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc19: // CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %.loc19_47: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc19_47: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: assign %a.var, %.loc19_47 -// CHECK:STDOUT: %.loc20_13: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc20_18.1: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc20_13: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc20_18.1: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc20_13 br !and.rhs.loc20 else br !and.result.loc20(%.loc20_18.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc20: -// CHECK:STDOUT: %.loc20_22: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc20_22: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: br !and.result.loc20(%.loc20_22) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc20: -// CHECK:STDOUT: %.loc20_18.2: bool = block_arg !and.result.loc20 [template = constants.%.3] +// CHECK:STDOUT: %.loc20_18.2: bool = block_arg !and.result.loc20 [template = constants.%.2] // CHECK:STDOUT: if %.loc20_18.2 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: @@ -194,28 +194,28 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_33.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_44: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_38: type = converted %.loc20_44, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_44: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_38: type = converted %.loc20_44, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_38) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc20: -// CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var -// CHECK:STDOUT: %.loc20_49.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_49.2: init %.1 = tuple_init () to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc20_50: init %.1 = converted %.loc20_49.1, %.loc20_49.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var +// CHECK:STDOUT: %.loc20_49.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_49.2: init %empty_tuple.type = tuple_init () to %b.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc20_50: init %empty_tuple.type = converted %.loc20_49.1, %.loc20_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %b.var, %.loc20_50 -// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc21_19.1: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc21_19.1: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc21_13 br !and.rhs.loc21 else br !and.result.loc21(%.loc21_19.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc21: -// CHECK:STDOUT: %.loc21_23: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc21_23: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: br !and.result.loc21(%.loc21_23) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc21: -// CHECK:STDOUT: %.loc21_19.2: bool = block_arg !and.result.loc21 [template = constants.%.3] +// CHECK:STDOUT: %.loc21_19.2: bool = block_arg !and.result.loc21 [template = constants.%.2] // CHECK:STDOUT: if %.loc21_19.2 br !if.expr.then.loc21 else br !if.expr.else.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc21: @@ -225,28 +225,28 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_33.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc21: -// CHECK:STDOUT: %.loc21_44: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc21_38: type = converted %.loc21_44, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc21_44: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_38: type = converted %.loc21_44, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_38) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc21: -// CHECK:STDOUT: %.loc21_10: type = block_arg !if.expr.result.loc21 [template = constants.%.1] -// CHECK:STDOUT: %c.var: ref %.1 = var c -// CHECK:STDOUT: %c: ref %.1 = bind_name c, %c.var -// CHECK:STDOUT: %.loc21_49.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc21_49.2: init %.1 = tuple_init () to %c.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc21_50: init %.1 = converted %.loc21_49.1, %.loc21_49.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc21_10: type = block_arg !if.expr.result.loc21 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %c.var: ref %empty_tuple.type = var c +// CHECK:STDOUT: %c: ref %empty_tuple.type = bind_name c, %c.var +// CHECK:STDOUT: %.loc21_49.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_49.2: init %empty_tuple.type = tuple_init () to %c.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc21_50: init %empty_tuple.type = converted %.loc21_49.1, %.loc21_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %c.var, %.loc21_50 -// CHECK:STDOUT: %.loc22_13: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc22_19.1: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc22_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc22_19.1: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc22_13 br !and.rhs.loc22 else br !and.result.loc22(%.loc22_19.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs.loc22: -// CHECK:STDOUT: %.loc22_23: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc22_23: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: br !and.result.loc22(%.loc22_23) // CHECK:STDOUT: // CHECK:STDOUT: !and.result.loc22: -// CHECK:STDOUT: %.loc22_19.2: bool = block_arg !and.result.loc22 [template = constants.%.3] +// CHECK:STDOUT: %.loc22_19.2: bool = block_arg !and.result.loc22 [template = constants.%.2] // CHECK:STDOUT: if %.loc22_19.2 br !if.expr.then.loc22 else br !if.expr.else.loc22 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc22: @@ -256,25 +256,25 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_34.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc22: -// CHECK:STDOUT: %.loc22_45: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_39: type = converted %.loc22_45, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc22_45: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_39: type = converted %.loc22_45, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_39) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc22: -// CHECK:STDOUT: %.loc22_10: type = block_arg !if.expr.result.loc22 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc22_50.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_50.2: init %.1 = tuple_init () to %d.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc22_51: init %.1 = converted %.loc22_50.1, %.loc22_50.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc22_10: type = block_arg !if.expr.result.loc22 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc22_50.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_50.2: init %empty_tuple.type = tuple_init () to %d.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc22_51: init %empty_tuple.type = converted %.loc22_50.1, %.loc22_50.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %d.var, %.loc22_51 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26_13: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc26_19.1: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc26_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc26_19.1: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc26_13 br !and.rhs else br !and.result(%.loc26_19.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: @@ -282,7 +282,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !and.result(%x.ref) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc26_19.2: bool = block_arg !and.result [template = constants.%.3] +// CHECK:STDOUT: %.loc26_19.2: bool = block_arg !and.result [template = constants.%.2] // CHECK:STDOUT: if %.loc26_19.2 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -292,17 +292,17 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result(%.loc26_30.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc26_41: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc26_35: type = converted %.loc26_41, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc26_41: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc26_35: type = converted %.loc26_41, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result(%.loc26_35) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %.loc26_46.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc26_46.2: init %.1 = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc26_47: init %.1 = converted %.loc26_46.1, %.loc26_46.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %.loc26_46.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc26_46.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_47: init %empty_tuple.type = converted %.loc26_46.1, %.loc26_46.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc26_47 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 63449d416bdd..2e736ca4a14b 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -30,28 +30,28 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.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 12 [template] -// CHECK:STDOUT: %.3: i32 = int_value 9 [template] -// CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.5: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %.5 = tuple_value (%.7, %.8) [template] -// CHECK:STDOUT: %.9: i32 = int_value 0 [template] -// CHECK:STDOUT: %.10: i32 = int_value 3 [template] -// CHECK:STDOUT: %.11: i32 = int_value 4 [template] -// CHECK:STDOUT: %.12: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] -// CHECK:STDOUT: %struct: %.12 = struct_value (%.7, %.8) [template] -// CHECK:STDOUT: %.14: type = ptr_type i32 [template] -// CHECK:STDOUT: %.15: i32 = int_value 5 [template] -// CHECK:STDOUT: %.16: bool = bool_literal true [template] -// CHECK:STDOUT: %.17: i32 = int_value 10 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %.2: i32 = int_value 9 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.4, %.5) [template] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] +// CHECK:STDOUT: %.7: i32 = int_value 3 [template] +// CHECK:STDOUT: %.8: i32 = int_value 4 [template] +// CHECK:STDOUT: %.9: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %struct: %.9 = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %.11: type = ptr_type i32 [template] +// CHECK:STDOUT: %.12: i32 = int_value 5 [template] +// CHECK:STDOUT: %.13: bool = bool_literal true [template] +// CHECK:STDOUT: %.14: i32 = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,40 +79,40 @@ fn Main() { // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 12 [template = constants.%.1] // CHECK:STDOUT: assign %a.var, %.loc12_16 // CHECK:STDOUT: %a.ref.loc13: ref i32 = name_ref a, %a -// CHECK:STDOUT: %.loc13: i32 = int_value 9 [template = constants.%.3] +// CHECK:STDOUT: %.loc13: i32 = int_value 9 [template = constants.%.2] // CHECK:STDOUT: assign %a.ref.loc13, %.loc13 // CHECK:STDOUT: %int.make_type_32.loc15_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc15_16: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_19.1: %.4 = tuple_literal (%int.make_type_32.loc15_11, %int.make_type_32.loc15_16) +// CHECK:STDOUT: %.loc15_19.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc15_11, %int.make_type_32.loc15_16) // CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_32.loc15_11 [template = i32] // CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_32.loc15_11, %.loc15_19.2 [template = i32] // CHECK:STDOUT: %.loc15_19.4: type = value_of_initializer %int.make_type_32.loc15_16 [template = i32] // CHECK:STDOUT: %.loc15_19.5: type = converted %int.make_type_32.loc15_16, %.loc15_19.4 [template = i32] -// CHECK:STDOUT: %.loc15_19.6: type = converted %.loc15_19.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %b.var: ref %.5 = var b -// CHECK:STDOUT: %b: ref %.5 = bind_name b, %b.var -// CHECK:STDOUT: %.loc15_24: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_27: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc15_28.1: %.5 = tuple_literal (%.loc15_24, %.loc15_27) +// CHECK:STDOUT: %.loc15_19.6: type = converted %.loc15_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b +// CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var +// CHECK:STDOUT: %.loc15_24: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_27: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_28.1: %tuple.type.2 = tuple_literal (%.loc15_24, %.loc15_27) // CHECK:STDOUT: %.loc15_28.2: ref i32 = tuple_access %b.var, element0 -// CHECK:STDOUT: %.loc15_28.3: init i32 = initialize_from %.loc15_24 to %.loc15_28.2 [template = constants.%.7] +// CHECK:STDOUT: %.loc15_28.3: init i32 = initialize_from %.loc15_24 to %.loc15_28.2 [template = constants.%.4] // CHECK:STDOUT: %.loc15_28.4: ref i32 = tuple_access %b.var, element1 -// CHECK:STDOUT: %.loc15_28.5: init i32 = initialize_from %.loc15_27 to %.loc15_28.4 [template = constants.%.8] -// CHECK:STDOUT: %.loc15_28.6: init %.5 = tuple_init (%.loc15_28.3, %.loc15_28.5) to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_29: init %.5 = converted %.loc15_28.1, %.loc15_28.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc15_28.5: init i32 = initialize_from %.loc15_27 to %.loc15_28.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc15_28.6: init %tuple.type.2 = tuple_init (%.loc15_28.3, %.loc15_28.5) to %b.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc15_29: init %tuple.type.2 = converted %.loc15_28.1, %.loc15_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign %b.var, %.loc15_29 -// CHECK:STDOUT: %b.ref.loc16: ref %.5 = name_ref b, %b -// CHECK:STDOUT: %.loc16_5: i32 = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %b.ref.loc16: ref %tuple.type.2 = name_ref b, %b +// CHECK:STDOUT: %.loc16_5: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc16_4: ref i32 = tuple_access %b.ref.loc16, element0 -// CHECK:STDOUT: %.loc16_9: i32 = int_value 3 [template = constants.%.10] +// CHECK:STDOUT: %.loc16_9: i32 = int_value 3 [template = constants.%.7] // CHECK:STDOUT: assign %.loc16_4, %.loc16_9 -// CHECK:STDOUT: %b.ref.loc17: ref %.5 = name_ref b, %b -// CHECK:STDOUT: %.loc17_5: i32 = int_value 1 [template = constants.%.7] +// CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.2 = name_ref b, %b +// CHECK:STDOUT: %.loc17_5: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc17_4: ref i32 = tuple_access %b.ref.loc17, element1 -// CHECK:STDOUT: %.loc17_9: i32 = int_value 4 [template = constants.%.11] +// CHECK:STDOUT: %.loc17_9: i32 = int_value 4 [template = constants.%.8] // CHECK:STDOUT: assign %.loc17_4, %.loc17_9 // CHECK:STDOUT: %int.make_type_32.loc19_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_15.1: type = value_of_initializer %int.make_type_32.loc19_15 [template = i32] @@ -120,58 +120,58 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32.loc19_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_32.loc19_24 [template = i32] // CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_32.loc19_24, %.loc19_24.1 [template = i32] -// CHECK:STDOUT: %.loc19_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.12] -// CHECK:STDOUT: %c.var: ref %.12 = var c -// CHECK:STDOUT: %c: ref %.12 = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_37: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc19_45: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc19_46.1: %.12 = struct_literal (%.loc19_37, %.loc19_45) +// CHECK:STDOUT: %.loc19_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.9] +// CHECK:STDOUT: %c.var: ref %.9 = var c +// CHECK:STDOUT: %c: ref %.9 = bind_name c, %c.var +// CHECK:STDOUT: %.loc19_37: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc19_45: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_46.1: %.9 = struct_literal (%.loc19_37, %.loc19_45) // CHECK:STDOUT: %.loc19_46.2: ref i32 = struct_access %c.var, element0 -// CHECK:STDOUT: %.loc19_46.3: init i32 = initialize_from %.loc19_37 to %.loc19_46.2 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_46.3: init i32 = initialize_from %.loc19_37 to %.loc19_46.2 [template = constants.%.4] // CHECK:STDOUT: %.loc19_46.4: ref i32 = struct_access %c.var, element1 -// CHECK:STDOUT: %.loc19_46.5: init i32 = initialize_from %.loc19_45 to %.loc19_46.4 [template = constants.%.8] -// CHECK:STDOUT: %.loc19_46.6: init %.12 = struct_init (%.loc19_46.3, %.loc19_46.5) to %c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_47: init %.12 = converted %.loc19_46.1, %.loc19_46.6 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_46.5: init i32 = initialize_from %.loc19_45 to %.loc19_46.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc19_46.6: init %.9 = struct_init (%.loc19_46.3, %.loc19_46.5) to %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_47: init %.9 = converted %.loc19_46.1, %.loc19_46.6 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_47 -// CHECK:STDOUT: %c.ref.loc20: ref %.12 = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc20: ref %.9 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref i32 = struct_access %c.ref.loc20, element0 -// CHECK:STDOUT: %.loc20_9: i32 = int_value 3 [template = constants.%.10] +// CHECK:STDOUT: %.loc20_9: i32 = int_value 3 [template = constants.%.7] // CHECK:STDOUT: assign %.loc20_4, %.loc20_9 -// CHECK:STDOUT: %c.ref.loc21: ref %.12 = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc21: ref %.9 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref i32 = struct_access %c.ref.loc21, element1 -// CHECK:STDOUT: %.loc21_9: i32 = int_value 4 [template = constants.%.11] +// CHECK:STDOUT: %.loc21_9: i32 = int_value 4 [template = constants.%.8] // CHECK:STDOUT: assign %.loc21_4, %.loc21_9 // CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_13.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_13.2: type = converted %int.make_type_32.loc23, %.loc23_13.1 [template = i32] -// CHECK:STDOUT: %.loc23_13.3: type = ptr_type i32 [template = constants.%.14] -// CHECK:STDOUT: %p.var: ref %.14 = var p -// CHECK:STDOUT: %p: ref %.14 = bind_name p, %p.var +// CHECK:STDOUT: %.loc23_13.3: type = ptr_type i32 [template = constants.%.11] +// CHECK:STDOUT: %p.var: ref %.11 = var p +// CHECK:STDOUT: %p: ref %.11 = bind_name p, %p.var // CHECK:STDOUT: %a.ref.loc23: ref i32 = name_ref a, %a -// CHECK:STDOUT: %.loc23_17: %.14 = addr_of %a.ref.loc23 +// CHECK:STDOUT: %.loc23_17: %.11 = addr_of %a.ref.loc23 // CHECK:STDOUT: assign %p.var, %.loc23_17 -// CHECK:STDOUT: %p.ref.loc24: ref %.14 = name_ref p, %p -// CHECK:STDOUT: %.loc24_4: %.14 = bind_value %p.ref.loc24 +// CHECK:STDOUT: %p.ref.loc24: ref %.11 = name_ref p, %p +// CHECK:STDOUT: %.loc24_4: %.11 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref i32 = deref %.loc24_4 -// CHECK:STDOUT: %.loc24_8: i32 = int_value 5 [template = constants.%.15] +// CHECK:STDOUT: %.loc24_8: i32 = int_value 5 [template = constants.%.12] // CHECK:STDOUT: assign %.loc24_3, %.loc24_8 -// CHECK:STDOUT: %.loc26_8: bool = bool_literal true [template = constants.%.16] +// CHECK:STDOUT: %.loc26_8: bool = bool_literal true [template = constants.%.13] // CHECK:STDOUT: if %.loc26_8 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %p.ref.loc26: ref %.14 = name_ref p, %p -// CHECK:STDOUT: %.loc26_18: %.14 = bind_value %p.ref.loc26 +// CHECK:STDOUT: %p.ref.loc26: ref %.11 = name_ref p, %p +// CHECK:STDOUT: %.loc26_18: %.11 = bind_value %p.ref.loc26 // CHECK:STDOUT: br !if.expr.result(%.loc26_18) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %a.ref.loc26: ref i32 = name_ref a, %a -// CHECK:STDOUT: %.loc26_25: %.14 = addr_of %a.ref.loc26 +// CHECK:STDOUT: %.loc26_25: %.11 = addr_of %a.ref.loc26 // CHECK:STDOUT: br !if.expr.result(%.loc26_25) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_5: %.14 = block_arg !if.expr.result +// CHECK:STDOUT: %.loc26_5: %.11 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref i32 = deref %.loc26_5 -// CHECK:STDOUT: %.loc26_31: i32 = int_value 10 [template = constants.%.17] +// CHECK:STDOUT: %.loc26_31: i32 = int_value 10 [template = constants.%.14] // CHECK:STDOUT: assign %.loc26_3, %.loc26_31 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index b9cfb4705e5d..8f965e104206 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -45,17 +45,17 @@ var or_: F(true or true); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: 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: %.3: bool = bool_literal true [template] -// CHECK:STDOUT: %.4: bool = bool_literal false [template] +// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %.3: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,7 +72,7 @@ var or_: F(true or true); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%.3] +// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%.2] // CHECK:STDOUT: %F.call: init type = call .inst+73.loc42_10(%.loc42_17) // CHECK:STDOUT: %.loc42_24.1: type = value_of_initializer %F.call // CHECK:STDOUT: %.loc42_24.2: type = converted %F.call, %.loc42_24.1 @@ -94,7 +94,7 @@ var or_: F(true or true); // CHECK:STDOUT: br !if.expr.result(%.loc13_20.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc13_29: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_29: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc13_29) [template = f64] // CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc13_24.2: type = converted %float.make_type, %.loc13_24.1 [template = f64] diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 04d4778a7715..44c8ced8c410 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -47,12 +47,12 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: bool = bool_literal false [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -86,8 +86,8 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_13: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc9_18.1: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc9_13: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc9_18.1: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: if %.loc9_13 br !and.rhs else br !and.result(%.loc9_18.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: @@ -105,17 +105,17 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_29.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc9: -// CHECK:STDOUT: %.loc9_40: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_34: type = converted %.loc9_40, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_40: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_34: type = converted %.loc9_40, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_34) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_10: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_13: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc14_19.1: bool = not %.loc14_13 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_19.2: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc14_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc14_19.1: bool = not %.loc14_13 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_19.2: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc14_19.1 br !or.rhs else br !or.result(%.loc14_19.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: @@ -133,8 +133,8 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc14(%.loc14_29.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc14: -// CHECK:STDOUT: %.loc14_40: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_34: type = converted %.loc14_40, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_40: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_34: type = converted %.loc14_40, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc14(%.loc14_34) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc14: @@ -148,12 +148,12 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition.type: type = fn_type @KnownValueButNonConstantCondition [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition: %KnownValueButNonConstantCondition.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] -// CHECK:STDOUT: %.3: bool = bool_literal true [template] +// CHECK:STDOUT: %.1: bool = bool_literal false [template] +// CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -188,11 +188,11 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: fn @KnownValueButNonConstantCondition(%x.param_patt: bool) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref.loc11: bool = name_ref x, %x -// CHECK:STDOUT: %.loc11_15.1: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc11_15.1: bool = bool_literal false [template = constants.%.1] // CHECK:STDOUT: if %x.ref.loc11 br !and.rhs else br !and.result(%.loc11_15.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %.loc11_19: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc11_19: bool = bool_literal false [template = constants.%.1] // CHECK:STDOUT: br !and.result(%.loc11_19) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: @@ -206,8 +206,8 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc11(%.loc11_30.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc11: -// CHECK:STDOUT: %.loc11_41: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_35: type = converted %.loc11_41, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_41: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_35: type = converted %.loc11_41, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc11(%.loc11_35) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: @@ -216,11 +216,11 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: %x.ref.loc15: bool = name_ref x, %x // CHECK:STDOUT: %.loc15_15.1: bool = not %x.ref.loc15 -// CHECK:STDOUT: %.loc15_15.2: bool = bool_literal true [template = constants.%.3] +// CHECK:STDOUT: %.loc15_15.2: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: if %.loc15_15.1 br !or.rhs else br !or.result(%.loc15_15.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %.loc15_18: bool = bool_literal true [template = constants.%.3] +// CHECK:STDOUT: %.loc15_18: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: br !or.result(%.loc15_18) // CHECK:STDOUT: // CHECK:STDOUT: !or.result: @@ -234,8 +234,8 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc15(%.loc15_28.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc15: -// CHECK:STDOUT: %.loc15_39: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_33: type = converted %.loc15_39, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_39: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_33: type = converted %.loc15_39, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc15(%.loc15_33) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc15: diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon index 3dc30b4f898c..462b4fcf9d98 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon @@ -24,9 +24,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 42 [template] +// CHECK:STDOUT: %.1: i32 = int_value 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,11 +48,11 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %undeclared.ref: = name_ref undeclared, [template = ] -// CHECK:STDOUT: %.loc16: i32 = int_value 42 [template = constants.%.2] +// CHECK:STDOUT: %.loc16: i32 = int_value 42 [template = constants.%.1] // CHECK:STDOUT: assign %undeclared.ref, // CHECK:STDOUT: %also_undeclared.ref: = name_ref also_undeclared, [template = ] // CHECK:STDOUT: %.loc20_3: ref = deref -// CHECK:STDOUT: %.loc20_22: i32 = int_value 42 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_22: i32 = int_value 42 [template = constants.%.1] // CHECK:STDOUT: assign %.loc20_3, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 54f4d07cb25b..e590130e346e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -60,28 +60,28 @@ fn Main() { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: i32 = int_value 2 [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 4 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %tuple.1: %.4 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %tuple.2: %.4 = tuple_value (%.2, %.3) [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %.9: type = ptr_type i32 [template] -// CHECK:STDOUT: %.10: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] -// CHECK:STDOUT: %struct.1: %.10 = struct_value (%.5, %.6) [template] -// CHECK:STDOUT: %struct.2: %.10 = struct_value (%.2, %.3) [template] -// CHECK:STDOUT: %.12: bool = bool_literal true [template] -// CHECK:STDOUT: %.13: i32 = int_value 10 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: i32 = int_value 4 [template] +// CHECK:STDOUT: %.5: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %tuple.1: %tuple.type = tuple_value (%.3, %.4) [template] +// CHECK:STDOUT: %tuple.2: %tuple.type = tuple_value (%.1, %.2) [template] +// CHECK:STDOUT: %.6: i32 = int_value 0 [template] +// CHECK:STDOUT: %.7: type = ptr_type i32 [template] +// CHECK:STDOUT: %.8: type = struct_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %struct.1: %.8 = struct_value (%.3, %.4) [template] +// CHECK:STDOUT: %struct.2: %.8 = struct_value (%.1, %.2) [template] +// CHECK:STDOUT: %.10: bool = bool_literal true [template] +// CHECK:STDOUT: %.11: i32 = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,94 +119,94 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_3: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_7: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc18_3: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_7: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: assign %.loc18_3, %.loc18_7 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() -// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: assign %F.call, %.loc23 -// CHECK:STDOUT: %.loc28_4: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc28_7: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc28_8.1: %.4 = tuple_literal (%.loc28_4, %.loc28_7) -// CHECK:STDOUT: %.loc28_13: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc28_16: i32 = int_value 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc28_17.1: %.4 = tuple_literal (%.loc28_13, %.loc28_16) +// CHECK:STDOUT: %.loc28_4: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_7: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc28_8.1: %tuple.type = tuple_literal (%.loc28_4, %.loc28_7) +// CHECK:STDOUT: %.loc28_13: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc28_16: i32 = int_value 4 [template = constants.%.4] +// CHECK:STDOUT: %.loc28_17.1: %tuple.type = tuple_literal (%.loc28_13, %.loc28_16) // CHECK:STDOUT: %.loc28_17.2: i32 = tuple_access %.loc28_8.1, element0 -// CHECK:STDOUT: %.loc28_17.3: init i32 = initialize_from %.loc28_13 to %.loc28_17.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc28_17.3: init i32 = initialize_from %.loc28_13 to %.loc28_17.2 [template = constants.%.3] // CHECK:STDOUT: %.loc28_17.4: i32 = tuple_access %.loc28_8.1, element1 -// CHECK:STDOUT: %.loc28_17.5: init i32 = initialize_from %.loc28_16 to %.loc28_17.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc28_17.6: init %.4 = tuple_init (%.loc28_17.3, %.loc28_17.5) to %.loc28_8.1 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc28_10: init %.4 = converted %.loc28_17.1, %.loc28_17.6 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc28_17.5: init i32 = initialize_from %.loc28_16 to %.loc28_17.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc28_17.6: init %tuple.type = tuple_init (%.loc28_17.3, %.loc28_17.5) to %.loc28_8.1 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc28_10: init %tuple.type = converted %.loc28_17.1, %.loc28_17.6 [template = constants.%tuple.1] // CHECK:STDOUT: assign %.loc28_8.1, %.loc28_10 -// CHECK:STDOUT: %tuple.loc28: %.4 = tuple_value (%.loc28_4, %.loc28_7) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc28_8.2: %.4 = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] +// CHECK:STDOUT: %tuple.loc28: %tuple.type = tuple_value (%.loc28_4, %.loc28_7) [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc28_8.2: %tuple.type = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_10.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_10.2: type = converted %int.make_type_32.loc29, %.loc29_10.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n // CHECK:STDOUT: %n: ref i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc29_16: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc29_16: i32 = int_value 0 [template = constants.%.6] // CHECK:STDOUT: assign %n.var, %.loc29_16 // CHECK:STDOUT: %n.ref.loc34_4: ref i32 = name_ref n, %n // CHECK:STDOUT: %n.ref.loc34_7: ref i32 = name_ref n, %n -// CHECK:STDOUT: %.loc34_8.1: %.4 = tuple_literal (%n.ref.loc34_4, %n.ref.loc34_7) -// CHECK:STDOUT: %.loc34_13: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc34_16: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc34_17.1: %.4 = tuple_literal (%.loc34_13, %.loc34_16) +// CHECK:STDOUT: %.loc34_8.1: %tuple.type = tuple_literal (%n.ref.loc34_4, %n.ref.loc34_7) +// CHECK:STDOUT: %.loc34_13: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc34_16: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc34_17.1: %tuple.type = tuple_literal (%.loc34_13, %.loc34_16) // CHECK:STDOUT: %.loc34_17.2: i32 = tuple_access %.loc34_8.1, element0 -// CHECK:STDOUT: %.loc34_17.3: init i32 = initialize_from %.loc34_13 to %.loc34_17.2 [template = constants.%.2] +// CHECK:STDOUT: %.loc34_17.3: init i32 = initialize_from %.loc34_13 to %.loc34_17.2 [template = constants.%.1] // CHECK:STDOUT: %.loc34_17.4: i32 = tuple_access %.loc34_8.1, element1 -// CHECK:STDOUT: %.loc34_17.5: init i32 = initialize_from %.loc34_16 to %.loc34_17.4 [template = constants.%.3] -// CHECK:STDOUT: %.loc34_17.6: init %.4 = tuple_init (%.loc34_17.3, %.loc34_17.5) to %.loc34_8.1 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc34_10: init %.4 = converted %.loc34_17.1, %.loc34_17.6 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc34_17.5: init i32 = initialize_from %.loc34_16 to %.loc34_17.4 [template = constants.%.2] +// CHECK:STDOUT: %.loc34_17.6: init %tuple.type = tuple_init (%.loc34_17.3, %.loc34_17.5) to %.loc34_8.1 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc34_10: init %tuple.type = converted %.loc34_17.1, %.loc34_17.6 [template = constants.%tuple.2] // CHECK:STDOUT: assign %.loc34_8.1, %.loc34_10 // CHECK:STDOUT: %.loc34_4: i32 = bind_value %n.ref.loc34_4 // CHECK:STDOUT: %.loc34_7: i32 = bind_value %n.ref.loc34_7 -// CHECK:STDOUT: %tuple.loc34: %.4 = tuple_value (%.loc34_4, %.loc34_7) -// CHECK:STDOUT: %.loc34_8.2: %.4 = converted %.loc34_8.1, %tuple.loc34 +// CHECK:STDOUT: %tuple.loc34: %tuple.type = tuple_value (%.loc34_4, %.loc34_7) +// CHECK:STDOUT: %.loc34_8.2: %tuple.type = converted %.loc34_8.1, %tuple.loc34 // CHECK:STDOUT: %int.make_type_32.loc39_3: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc39_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc39_12.1: type = value_of_initializer %int.make_type_32.loc39_9 [template = i32] // CHECK:STDOUT: %.loc39_12.2: type = converted %int.make_type_32.loc39_9, %.loc39_12.1 [template = i32] -// CHECK:STDOUT: %.loc39_12.3: type = ptr_type i32 [template = constants.%.9] +// CHECK:STDOUT: %.loc39_12.3: type = ptr_type i32 [template = constants.%.7] // CHECK:STDOUT: assign %int.make_type_32.loc39_3, %.loc39_12.3 -// CHECK:STDOUT: %.loc44_9: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_17: i32 = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_18.1: %.10 = struct_literal (%.loc44_9, %.loc44_17) -// CHECK:STDOUT: %.loc44_28: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc44_36: i32 = int_value 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc44_37.1: %.10 = struct_literal (%.loc44_28, %.loc44_36) +// CHECK:STDOUT: %.loc44_9: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc44_17: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc44_18.1: %.8 = struct_literal (%.loc44_9, %.loc44_17) +// CHECK:STDOUT: %.loc44_28: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc44_36: i32 = int_value 4 [template = constants.%.4] +// CHECK:STDOUT: %.loc44_37.1: %.8 = struct_literal (%.loc44_28, %.loc44_36) // CHECK:STDOUT: %.loc44_37.2: i32 = struct_access %.loc44_18.1, element0 -// CHECK:STDOUT: %.loc44_37.3: init i32 = initialize_from %.loc44_28 to %.loc44_37.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc44_37.3: init i32 = initialize_from %.loc44_28 to %.loc44_37.2 [template = constants.%.3] // CHECK:STDOUT: %.loc44_37.4: i32 = struct_access %.loc44_18.1, element1 -// CHECK:STDOUT: %.loc44_37.5: init i32 = initialize_from %.loc44_36 to %.loc44_37.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc44_37.6: init %.10 = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc44_20: init %.10 = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_37.5: init i32 = initialize_from %.loc44_36 to %.loc44_37.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc44_37.6: init %.8 = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_20: init %.8 = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] // CHECK:STDOUT: assign %.loc44_18.1, %.loc44_20 -// CHECK:STDOUT: %struct: %.10 = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc44_18.2: %.10 = converted %.loc44_18.1, %struct [template = constants.%struct.2] -// CHECK:STDOUT: %.loc49_7: bool = bool_literal true [template = constants.%.12] +// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] +// CHECK:STDOUT: %.loc44_18.2: %.8 = converted %.loc44_18.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %.loc49_7: bool = bool_literal true [template = constants.%.10] // CHECK:STDOUT: if %.loc49_7 br !if.expr.then.loc49 else br !if.expr.else.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc49: -// CHECK:STDOUT: %.loc49_17: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc49_17: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_17) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc49: -// CHECK:STDOUT: %.loc49_24: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc49_24: i32 = int_value 2 [template = constants.%.2] // CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_24) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc49: -// CHECK:STDOUT: %.loc49_4: i32 = block_arg !if.expr.result.loc49 [template = constants.%.2] -// CHECK:STDOUT: %.loc49_29: i32 = int_value 3 [template = constants.%.5] +// CHECK:STDOUT: %.loc49_4: i32 = block_arg !if.expr.result.loc49 [template = constants.%.1] +// CHECK:STDOUT: %.loc49_29: i32 = int_value 3 [template = constants.%.3] // CHECK:STDOUT: assign %.loc49_4, %.loc49_29 // CHECK:STDOUT: %int.make_type_32.loc52: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc52_10.1: type = value_of_initializer %int.make_type_32.loc52 [template = i32] // CHECK:STDOUT: %.loc52_10.2: type = converted %int.make_type_32.loc52, %.loc52_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc56_7: bool = bool_literal true [template = constants.%.12] +// CHECK:STDOUT: %.loc56_7: bool = bool_literal true [template = constants.%.10] // CHECK:STDOUT: if %.loc56_7 br !if.expr.then.loc56 else br !if.expr.else.loc56 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc56: @@ -221,7 +221,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc56: // CHECK:STDOUT: %.loc56_4: i32 = block_arg !if.expr.result.loc56 -// CHECK:STDOUT: %.loc56_29: i32 = int_value 10 [template = constants.%.13] +// CHECK:STDOUT: %.loc56_29: i32 = int_value 10 [template = constants.%.11] // CHECK:STDOUT: assign %.loc56_4, %.loc56_29 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 19fcfcfd4b14..d13b0fe5e843 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -27,14 +27,14 @@ fn Main() { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: i32 = int_value 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,7 +70,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_24: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc11_24 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,7 +81,7 @@ fn Main() { // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_16: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_16: i32 = int_value 3 [template = constants.%.2] // CHECK:STDOUT: assign %a.var, %.loc14_16 // CHECK:STDOUT: %a.ref.loc19_3: ref i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc19_7: ref i32 = name_ref a, %a diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 8ec55be636e3..b65b8a77a18b 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -22,11 +22,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [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] @@ -36,14 +36,14 @@ fn Main() { // 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(bool) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(bool) [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 { @@ -56,7 +56,7 @@ fn Main() { // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // 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 @@ -80,8 +80,8 @@ fn Main() { // 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: @@ -98,7 +98,7 @@ fn Main() { // CHECK:STDOUT: %.loc18_10.2: type = converted %bool.make_type, %.loc18_10.1 [template = bool] // CHECK:STDOUT: %x.var: ref bool = var x // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var -// CHECK:STDOUT: %.loc18_21: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_21: i32 = int_value 12 [template = constants.%.1] // CHECK:STDOUT: %.loc18_17.1: bool = converted %.loc18_21, [template = ] // CHECK:STDOUT: %.loc18_17.2: = not [template = ] // CHECK:STDOUT: assign %x.var, @@ -145,7 +145,7 @@ fn Main() { // 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: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 534968ebdd26..7b941f3e3d87 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -23,12 +23,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.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: f64 = float_literal 5.6000000000000005 [template] +// CHECK:STDOUT: %.1: i32 = int_value 3 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 5.6000000000000005 [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] @@ -38,14 +38,14 @@ fn Main() { // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [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: %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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,7 +58,7 @@ fn Main() { // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -82,8 +82,8 @@ fn Main() { // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -100,10 +100,10 @@ fn Main() { // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 3 [template = constants.%.1] // CHECK:STDOUT: assign %a.var, %.loc12_16 // CHECK:STDOUT: %a.ref: ref i32 = name_ref a, %a -// CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.2] // CHECK:STDOUT: %.loc19_5: i32 = converted %.loc19_7, [template = ] // CHECK:STDOUT: assign %a.ref, // CHECK:STDOUT: return @@ -149,7 +149,7 @@ fn Main() { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index c9e28e483c99..0637362e540b 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -25,18 +25,18 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 12 [template] -// CHECK:STDOUT: %.3: f64 = float_literal 3.4000000000000004 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 3.4000000000000004 [template] // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,7 +49,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.4: %.3 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: } @@ -83,9 +83,9 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_10: i32 = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_15: f64 = float_literal 3.4000000000000004 [template = constants.%.3] -// CHECK:STDOUT: %.loc21_21: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc21_10: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc21_15: f64 = float_literal 3.4000000000000004 [template = constants.%.2] +// CHECK:STDOUT: %.loc21_21: i32 = int_value 12 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index 45f86671d839..d0a37cd7c142 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -19,18 +19,18 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 12 [template] -// CHECK:STDOUT: %.3: i32 = int_value 34 [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %.2: i32 = int_value 34 [template] // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,7 +43,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.4: %.3 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: } @@ -77,8 +77,8 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_10: i32 = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_15: i32 = int_value 34 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_10: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc15_15: i32 = int_value 34 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index 1efef2da5833..f04dd4fc9c23 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -30,19 +30,19 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %.3: bool = bool_literal false [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] // CHECK:STDOUT: } @@ -113,13 +113,13 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_25: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc11_25: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: return %.loc11_25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_25: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc12_25: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: return %.loc12_25 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -130,7 +130,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %.loc15_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc15_14.2: bool = converted %F.call, %.loc15_14.1 // CHECK:STDOUT: %.loc15_14.3: bool = not %.loc15_14.2 -// CHECK:STDOUT: %.loc15_14.4: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc15_14.4: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc15_14.3 br !or.rhs else br !or.result(%.loc15_14.4) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: @@ -147,17 +147,17 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc19_18.1: bool = not %.loc19_13 [template = constants.%.3] -// CHECK:STDOUT: %.loc19_18.2: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc19_13: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc19_18.1: bool = not %.loc19_13 [template = constants.%.2] +// CHECK:STDOUT: %.loc19_18.2: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc19_18.1 br !or.rhs.loc19 else br !or.result.loc19(%.loc19_18.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc19: -// CHECK:STDOUT: %.loc19_21: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc19_21: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: br !or.result.loc19(%.loc19_21) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc19: -// CHECK:STDOUT: %.loc19_18.3: bool = block_arg !or.result.loc19 [template = constants.%.2] +// CHECK:STDOUT: %.loc19_18.3: bool = block_arg !or.result.loc19 [template = constants.%.1] // CHECK:STDOUT: if %.loc19_18.3 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: @@ -167,27 +167,27 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_31.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_42: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_36: type = converted %.loc19_42, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_42: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_36: type = converted %.loc19_42, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_36) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc19: // CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %.loc19_46: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc19_46: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: assign %a.var, %.loc19_46 -// CHECK:STDOUT: %.loc20_13: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc20_18.1: bool = not %.loc20_13 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_18.2: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc20_13: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc20_18.1: bool = not %.loc20_13 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_18.2: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc20_18.1 br !or.rhs.loc20 else br !or.result.loc20(%.loc20_18.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc20: -// CHECK:STDOUT: %.loc20_21: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc20_21: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: br !or.result.loc20(%.loc20_21) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc20: -// CHECK:STDOUT: %.loc20_18.3: bool = block_arg !or.result.loc20 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_18.3: bool = block_arg !or.result.loc20 [template = constants.%.1] // CHECK:STDOUT: if %.loc20_18.3 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: @@ -197,27 +197,27 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_32.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_43: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_37: type = converted %.loc20_43, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_43: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_37: type = converted %.loc20_43, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_37) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc20: // CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = bool] // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %.loc20_47: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc20_47: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: assign %b.var, %.loc20_47 -// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc21_19.1: bool = not %.loc21_13 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_19.2: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc21_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc21_19.1: bool = not %.loc21_13 [template = constants.%.1] +// CHECK:STDOUT: %.loc21_19.2: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc21_19.1 br !or.rhs.loc21 else br !or.result.loc21(%.loc21_19.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc21: -// CHECK:STDOUT: %.loc21_22: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc21_22: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: br !or.result.loc21(%.loc21_22) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc21: -// CHECK:STDOUT: %.loc21_19.3: bool = block_arg !or.result.loc21 [template = constants.%.2] +// CHECK:STDOUT: %.loc21_19.3: bool = block_arg !or.result.loc21 [template = constants.%.1] // CHECK:STDOUT: if %.loc21_19.3 br !if.expr.then.loc21 else br !if.expr.else.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc21: @@ -227,27 +227,27 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_32.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc21: -// CHECK:STDOUT: %.loc21_43: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc21_37: type = converted %.loc21_43, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc21_43: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_37: type = converted %.loc21_43, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_37) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc21: // CHECK:STDOUT: %.loc21_10: type = block_arg !if.expr.result.loc21 [template = bool] // CHECK:STDOUT: %c.var: ref bool = var c // CHECK:STDOUT: %c: ref bool = bind_name c, %c.var -// CHECK:STDOUT: %.loc21_47: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc21_47: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: assign %c.var, %.loc21_47 -// CHECK:STDOUT: %.loc22_13: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc22_19.1: bool = not %.loc22_13 [template = constants.%.2] -// CHECK:STDOUT: %.loc22_19.2: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc22_13: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc22_19.1: bool = not %.loc22_13 [template = constants.%.1] +// CHECK:STDOUT: %.loc22_19.2: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc22_19.1 br !or.rhs.loc22 else br !or.result.loc22(%.loc22_19.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs.loc22: -// CHECK:STDOUT: %.loc22_22: bool = bool_literal false [template = constants.%.3] +// CHECK:STDOUT: %.loc22_22: bool = bool_literal false [template = constants.%.2] // CHECK:STDOUT: br !or.result.loc22(%.loc22_22) // CHECK:STDOUT: // CHECK:STDOUT: !or.result.loc22: -// CHECK:STDOUT: %.loc22_19.3: bool = block_arg !or.result.loc22 [template = constants.%.3] +// CHECK:STDOUT: %.loc22_19.3: bool = block_arg !or.result.loc22 [template = constants.%.2] // CHECK:STDOUT: if %.loc22_19.3 br !if.expr.then.loc22 else br !if.expr.else.loc22 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc22: @@ -257,26 +257,26 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_33.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc22: -// CHECK:STDOUT: %.loc22_44: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_38: type = converted %.loc22_44, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc22_44: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_38: type = converted %.loc22_44, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_38) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc22: -// CHECK:STDOUT: %.loc22_10: type = block_arg !if.expr.result.loc22 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc22_49.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_49.2: init %.1 = tuple_init () to %d.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc22_50: init %.1 = converted %.loc22_49.1, %.loc22_49.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc22_10: type = block_arg !if.expr.result.loc22 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc22_49.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_49.2: init %empty_tuple.type = tuple_init () to %d.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc22_50: init %empty_tuple.type = converted %.loc22_49.1, %.loc22_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %d.var, %.loc22_50 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26_13: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc26_18.1: bool = not %.loc26_13 [template = constants.%.3] -// CHECK:STDOUT: %.loc26_18.2: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc26_13: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc26_18.1: bool = not %.loc26_13 [template = constants.%.2] +// CHECK:STDOUT: %.loc26_18.2: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc26_18.1 br !or.rhs else br !or.result(%.loc26_18.2) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: @@ -284,7 +284,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !or.result(%x.ref) // CHECK:STDOUT: // CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc26_18.3: bool = block_arg !or.result [template = constants.%.2] +// CHECK:STDOUT: %.loc26_18.3: bool = block_arg !or.result [template = constants.%.1] // CHECK:STDOUT: if %.loc26_18.3 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -294,15 +294,15 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result(%.loc26_28.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc26_39: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc26_33: type = converted %.loc26_39, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc26_39: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc26_33: type = converted %.loc26_39, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result(%.loc26_33) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %.loc26_43: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc26_43: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: assign %a.var, %.loc26_43 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index 89006de562c3..21928916bb1d 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -24,15 +24,15 @@ fn Constant() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Not.type: type = fn_type @Not [template] // CHECK:STDOUT: %Not: %Not.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: bool = bool_literal false [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,8 +90,8 @@ fn Constant() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_17: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc19_13: bool = not %.loc19_17 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_17: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc19_13: bool = not %.loc19_17 [template = constants.%.2] // CHECK:STDOUT: if %.loc19_13 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: @@ -101,20 +101,20 @@ fn Constant() { // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_27.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_38: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_32: type = converted %.loc19_38, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_38: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_32: type = converted %.loc19_38, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_32) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc19: -// CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %.loc19_43.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_43.2: init %.1 = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_44: init %.1 = converted %.loc19_43.1, %.loc19_43.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %.loc19_43.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_43.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc19_44: init %empty_tuple.type = converted %.loc19_43.1, %.loc19_43.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc19_44 -// CHECK:STDOUT: %.loc20_17: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc20_13: bool = not %.loc20_17 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_17: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc20_13: bool = not %.loc20_17 [template = constants.%.1] // CHECK:STDOUT: if %.loc20_13 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: @@ -124,26 +124,26 @@ fn Constant() { // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_28.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_39: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_33: type = converted %.loc20_39, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_39: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_33: type = converted %.loc20_39, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_33) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc20: // CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = bool] // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %.loc20_43: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc20_43: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: assign %b.var, %.loc20_43 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_26: bool = bool_literal true [template = constants.%.2] -// CHECK:STDOUT: %.loc15_22: bool = not %.loc15_26 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_26: bool = bool_literal true [template = constants.%.1] +// CHECK:STDOUT: %.loc15_22: bool = not %.loc15_26 [template = constants.%.2] // CHECK:STDOUT: %not_true: bool = bind_name not_true, %.loc15_22 -// CHECK:STDOUT: %.loc16_27: bool = bool_literal false [template = constants.%.3] -// CHECK:STDOUT: %.loc16_23: bool = not %.loc16_27 [template = constants.%.2] +// CHECK:STDOUT: %.loc16_27: bool = bool_literal false [template = constants.%.2] +// CHECK:STDOUT: %.loc16_23: bool = not %.loc16_27 [template = constants.%.1] // CHECK:STDOUT: %not_false: bool = bind_name not_false, %.loc16_23 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 69eb89378816..cbd41c1155ec 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self.1: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.2: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+26, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+36, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+55, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+55, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %AddAssign.type) { // CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 4a7bc0f57347..a8e25e1f9fc4 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %BitAnd.type: type = interface_type @BitAnd [template] // CHECK:STDOUT: %Self.1: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %BitAndAssign.type: type = interface_type @BitAndAssign [template] // CHECK:STDOUT: %Self.2: %BitAndAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %BitAnd.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %BitAnd.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %BitAndAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %BitAndAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+27, loaded [template = constants.%BitAnd.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+29, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+57, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/bitwise, inst+57, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+52, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+59, loaded [template = constants.%BitAndAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+61, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+86, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/bitwise, inst+86, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+80, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+52, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+80, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitAndAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %BitAndAssign.type) { // CHECK:STDOUT: %Self: %BitAndAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 2954c6ff9d82..65e432abe48e 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -33,17 +33,17 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %BitComplement.type: type = interface_type @BitComplement [template] // CHECK:STDOUT: %Self: %BitComplement.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %BitComplement.type, %Op.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %BitComplement.type, %Op.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,7 +54,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+1, loaded [template = constants.%BitComplement.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/bitwise, inst+25, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/bitwise, inst+25, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/bitwise, inst+19, unloaded // CHECK:STDOUT: } @@ -108,7 +108,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -139,7 +139,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23_17.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23_17.2 diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index 311aedcb5235..7bdc05fc2d3e 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %BitOr.type: type = interface_type @BitOr [template] // CHECK:STDOUT: %Self.1: %BitOr.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %BitOrAssign.type: type = interface_type @BitOrAssign [template] // CHECK:STDOUT: %Self.2: %BitOrAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %BitOr.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %BitOr.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %BitOrAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %BitOrAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+88, loaded [template = constants.%BitOr.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+90, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+118, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/bitwise, inst+118, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+113, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+120, loaded [template = constants.%BitOrAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+122, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+147, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/bitwise, inst+147, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+141, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+113, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+141, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitOrAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %BitOrAssign.type) { // CHECK:STDOUT: %Self: %BitOrAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index d1872c220743..96374593552d 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %BitXor.type: type = interface_type @BitXor [template] // CHECK:STDOUT: %Self.1: %BitXor.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %BitXorAssign.type: type = interface_type @BitXorAssign [template] // CHECK:STDOUT: %Self.2: %BitXorAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %BitXor.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %BitXor.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %BitXorAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %BitXorAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+149, loaded [template = constants.%BitXor.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+151, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+179, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/bitwise, inst+179, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+174, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+181, loaded [template = constants.%BitXorAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+183, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+208, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/bitwise, inst+208, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+202, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+174, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+202, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitXorAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %BitXorAssign.type) { // CHECK:STDOUT: %Self: %BitXorAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 22254cb5e977..058b0dc9f523 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -33,18 +33,18 @@ fn TestOp() { // CHECK:STDOUT: %Self: %Dec.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %Self [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %Self [symbolic] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Dec.type, %Op.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Dec.type, %Op.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,7 +55,7 @@ fn TestOp() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+171, loaded [template = constants.%Dec.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+173, unloaded -// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+191, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/arithmetic, inst+191, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+185, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+185, unloaded // CHECK:STDOUT: } @@ -94,7 +94,7 @@ fn TestOp() { // CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -112,9 +112,9 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Dec.type) { // CHECK:STDOUT: %Self: %Dec.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+38: @Op.2.%.2 (%.5)](); +// CHECK:STDOUT: fn[addr .inst+38: @Op.2.%.2 (%.4)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { @@ -127,16 +127,16 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.6, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 // CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3.2(%.loc23_5) +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc23_3.2(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.2 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%C) { diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index 12359de4921a..6056706034b1 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Div.type: type = interface_type @Div [template] // CHECK:STDOUT: %Self.1: %Div.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %DivAssign.type: type = interface_type @DivAssign [template] // CHECK:STDOUT: %Self.2: %DivAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Div.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Div.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %DivAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %DivAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+254, loaded [template = constants.%Div.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+256, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+284, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+284, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+279, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+286, loaded [template = constants.%DivAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+288, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+313, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/arithmetic, inst+313, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+307, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+279, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+307, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %DivAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %DivAssign.type) { // CHECK:STDOUT: %Self: %DivAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 3615bde01901..fd7c3605634d 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -91,7 +91,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Eq.type: type = interface_type @Eq [template] // CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] // CHECK:STDOUT: %Equal.1: %Equal.type.1 = struct_value () [template] @@ -101,16 +101,16 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Equal.2: %Equal.type.2 = struct_value () [template] // CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] // CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %.3: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Eq.type, %Equal.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Eq.type, %Equal.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Eq.type, %NotEqual.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Eq.type, %NotEqual.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.9 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -122,8 +122,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%Eq.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/comparison, inst+5, unloaded -// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/comparison, inst+40, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/comparison, inst+68, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/comparison, inst+40, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.7 = import_ref Core//prelude/operators/comparison, inst+68, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.5: %Equal.type.2 = import_ref Core//prelude/operators/comparison, inst+35, loaded [template = constants.%Equal.2] // CHECK:STDOUT: %import_ref.6: %NotEqual.type.2 = import_ref Core//prelude/operators/comparison, inst+63, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] @@ -236,7 +236,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -273,7 +273,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc12_12.2: = bound_method %a.ref, %.loc12_12.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -285,7 +285,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.4, element1 [template = constants.%NotEqual.1] +// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.3, element1 [template = constants.%NotEqual.1] // CHECK:STDOUT: %.loc16_12.2: = bound_method %a.ref, %.loc16_12.1 // CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -316,23 +316,23 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %Eq.type: type = interface_type @Eq [template] // CHECK:STDOUT: %Self: %Eq.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Eq.type, %Equal.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Eq.type, %Equal.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.8 [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [template] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %Eq.type, %NotEqual.type [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Eq.type, %NotEqual.type [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element1, imports.%import_ref.9 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -345,8 +345,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%Eq.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/comparison, inst+5, unloaded -// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/comparison, inst+40, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.5: %.7 = import_ref Core//prelude/operators/comparison, inst+68, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//prelude/operators/comparison, inst+40, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.5: %.6 = import_ref Core//prelude/operators/comparison, inst+68, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/comparison, inst+35, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/comparison, inst+63, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/comparison, inst+35, unloaded @@ -465,7 +465,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Eq.type: type = interface_type @Eq [template] // CHECK:STDOUT: %Self.1: %Eq.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] // CHECK:STDOUT: %Equal.1: %Equal.type.1 = struct_value () [template] @@ -475,12 +475,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Equal.2: %Equal.type.2 = struct_value () [template] // CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] // CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %.3: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Eq.type, %Equal.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.8 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Eq.type, %Equal.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.8 [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] @@ -490,18 +490,18 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Self.3: %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: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.13 [template] -// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.14 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.14 [symbolic] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] // CHECK:STDOUT: %TestLhsBad: %TestLhsBad.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type %Eq.type, %NotEqual.type.2 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element1, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type %Eq.type, %NotEqual.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element1, imports.%import_ref.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -514,15 +514,15 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+3, loaded [template = constants.%Eq.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/comparison, inst+5, unloaded -// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/comparison, inst+40, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: %.13 = import_ref Core//prelude/operators/comparison, inst+68, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/comparison, inst+40, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.12 = import_ref Core//prelude/operators/comparison, inst+68, loaded [template = constants.%.13] // CHECK:STDOUT: %import_ref.5: %Equal.type.2 = import_ref Core//prelude/operators/comparison, inst+35, loaded [template = constants.%Equal.2] // CHECK:STDOUT: %import_ref.6: %NotEqual.type.2 = import_ref Core//prelude/operators/comparison, inst+63, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/comparison, inst+35, unloaded // CHECK:STDOUT: %import_ref.9: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.11: @ImplicitAs.%.1 (%.8) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] +// CHECK:STDOUT: %import_ref.11: @ImplicitAs.%.1 (%.7) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -604,8 +604,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.8)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -656,7 +656,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -700,7 +700,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc23_12.2: = bound_method %a.ref, %.loc23_12.1 // CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %Equal.call: init bool = call %.loc23_12.2(%a.ref, ) @@ -770,7 +770,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.10 -// CHECK:STDOUT: %.2 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index 25cc63a73ad7..ae5fc3c799c1 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -50,29 +50,29 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Self.1: %Inc.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %Self.1 [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %Self.1 [symbolic] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.2: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %Inc.type, %Op.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Inc.type, %Op.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template] // CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -84,11 +84,11 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+63, loaded [template = constants.%Inc.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+65, unloaded -// CHECK:STDOUT: %import_ref.3: %.10 = import_ref Core//prelude/operators/arithmetic, inst+83, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+83, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+36, unloaded -// CHECK:STDOUT: %import_ref.7: %.12 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+55, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+77, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+55, unloaded @@ -161,7 +161,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -202,26 +202,26 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.2(constants.%Self.1: %Inc.type) { // CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self.1) [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self.1) [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+38: @Op.2.%.2 (%.5)](); +// CHECK:STDOUT: fn[addr .inst+38: @Op.2.%.2 (%.4)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.3](%other.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %AddAssign.type) { // CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+77: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+77: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestIncNonRef(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.6, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc30_3.2: = bound_method %a.ref, %.loc30_3.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc30_3.2() +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc30_3.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -229,15 +229,15 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc40_5.2: = bound_method %a.ref, %.loc40_5.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc40_5.2(, %b.ref) +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc40_5.2(, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 -// CHECK:STDOUT: %.2 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%C) { @@ -247,7 +247,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index d52ebbee1304..c94796005161 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -48,23 +48,23 @@ fn TestRef(b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %TestUnary.type: type = fn_type @TestUnary [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %TestUnary: %TestUnary.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] // CHECK:STDOUT: %Self.1: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Negate.type, %Op.type.1 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Negate.type, %Op.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: %TestBinary.type: type = fn_type @TestBinary [template] // CHECK:STDOUT: %TestBinary: %TestBinary.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self.2: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: %TestRef.type: type = fn_type @TestRef [template] // CHECK:STDOUT: %TestRef: %TestRef.type = struct_value () [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] @@ -72,16 +72,16 @@ fn TestRef(b: C) { // CHECK:STDOUT: %Self.3: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type %Self.3 [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %AddAssign.type, %Op.type.3 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.3 [symbolic] +// CHECK:STDOUT: %.9: type = assoc_entity_type %AddAssign.type, %Op.type.3 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.15 [template] // CHECK:STDOUT: %Inc.type: type = interface_type @Inc [template] // CHECK:STDOUT: %Self.4: %Inc.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.12: type = ptr_type %Self.4 [symbolic] -// CHECK:STDOUT: %.13: type = assoc_entity_type %Inc.type, %Op.type.4 [template] -// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.20 [template] +// CHECK:STDOUT: %.11: type = ptr_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %Inc.type, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.20 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -95,22 +95,22 @@ fn TestRef(b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+85, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+87, unloaded -// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.3: %.4 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.8: %.7 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.8: %.6 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/arithmetic, inst+36, unloaded -// CHECK:STDOUT: %import_ref.13: %.10 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.13: %.9 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/arithmetic, inst+55, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Core//prelude/operators/arithmetic, inst+55, unloaded // CHECK:STDOUT: %import_ref.16: type = import_ref Core//prelude/operators/arithmetic, inst+63, loaded [template = constants.%Inc.type] // CHECK:STDOUT: %import_ref.17 = import_ref Core//prelude/operators/arithmetic, inst+65, unloaded -// CHECK:STDOUT: %import_ref.18: %.13 = import_ref Core//prelude/operators/arithmetic, inst+83, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.18: %.12 = import_ref Core//prelude/operators/arithmetic, inst+83, loaded [template = constants.%.13] // CHECK:STDOUT: %import_ref.19 = import_ref Core//prelude/operators/arithmetic, inst+77, unloaded // CHECK:STDOUT: %import_ref.20 = import_ref Core//prelude/operators/arithmetic, inst+77, unloaded // CHECK:STDOUT: } @@ -243,16 +243,16 @@ fn TestRef(b: C) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.3(constants.%Self.3: %AddAssign.type) { // CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.3.%Self (%Self.3) [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.3.%Self (%Self.3) [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+124: @Op.3.%.2 (%.9)](%other.param_patt: @Op.3.%Self (%Self.3)); +// CHECK:STDOUT: fn[addr .inst+124: @Op.3.%.2 (%.8)](%other.param_patt: @Op.3.%Self (%Self.3)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.4: %Inc.type) { // CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.4)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.4) [symbolic = %.2 (constants.%.12)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.4) [symbolic = %.2 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+150: @Op.4.%.2 (%.12)](); +// CHECK:STDOUT: fn[addr .inst+150: @Op.4.%.2 (%.11)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.1) { @@ -265,11 +265,11 @@ fn TestRef(b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.3(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.4) { // CHECK:STDOUT: %Self => constants.%Self.4 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 7d7e2f4b3f4a..55ebe459ee68 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -58,25 +58,25 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Add.type: type = interface_type @Add [template] // CHECK:STDOUT: %Self.1: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %AddAssign.type: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.2: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.5: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [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] @@ -86,19 +86,19 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Self.4: %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.14 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.14 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C) [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.14 [template] -// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.15 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.15 [symbolic] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.15: type = assoc_entity_type %AddAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -111,16 +111,16 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+32, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+26, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+36, unloaded -// CHECK:STDOUT: %import_ref.7: %.16 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.17] +// CHECK:STDOUT: %import_ref.7: %.15 = import_ref Core//prelude/operators/arithmetic, inst+61, loaded [template = constants.%.16] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+55, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+26, unloaded // CHECK:STDOUT: %import_ref.10: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.12: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.12: @ImplicitAs.%.1 (%.10) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -199,8 +199,8 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // 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.14 [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.%.10)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.14 [symbolic = %.2 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -229,7 +229,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -238,21 +238,21 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.4 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.4 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc20_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.4] // CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.4 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.4 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -281,20 +281,20 @@ fn TestAssign(b: D) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C); +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.4](%other.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %AddAssign.type) { // CHECK:STDOUT: %Self: %AddAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+92: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+92: @Op.4.%.2 (%.5)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Test(%a.param_patt: %C, %b.param_patt: %D) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc34_12.2: = bound_method %a.ref, %.loc34_12.1 // CHECK:STDOUT: %.loc23_21.2: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc34_14: %C = converted %b.ref, [template = ] @@ -321,11 +321,11 @@ fn TestAssign(b: D) { // CHECK:STDOUT: assign %a.var, %.loc38_16 // CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.6, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc48_5.2: = bound_method %a.ref, %.loc48_5.1 -// CHECK:STDOUT: %.loc48_3: %.5 = addr_of %a.ref +// CHECK:STDOUT: %.loc48_3: %.4 = addr_of %a.ref // CHECK:STDOUT: %.loc48_8: %C = converted %b.ref, [template = ] -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc48_5.2(%.loc48_3, ) +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc48_5.2(%.loc48_3, ) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -339,12 +339,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -377,7 +377,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Self => constants.%Self.4 // 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.%.12 +// CHECK:STDOUT: %.2 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 2ab86d2e6833..5d9be123cfb6 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -36,11 +36,11 @@ fn Test() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] // 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 = unbound_element_type %X, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %X, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.n: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [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] @@ -50,25 +50,25 @@ fn Test() { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%X) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%X) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.9: = interface_witness (%Convert.2) [template] -// CHECK:STDOUT: %.10: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.9: type = ptr_type %.2 [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(i32) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [template] // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [template] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [template] @@ -77,12 +77,12 @@ fn Test() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Source.type: type = fn_type @Source [template] // CHECK:STDOUT: %Source: %Source.type = struct_value () [template] -// CHECK:STDOUT: %.14: = specific_function %Source, @Source(%T) [symbolic] +// CHECK:STDOUT: %.13: = specific_function %Source, @Source(%T) [symbolic] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.15: = specific_function %Source, @Source(%X) [template] -// CHECK:STDOUT: %.16: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] -// CHECK:STDOUT: %.17: = specific_function %Source, @Source(i32) [template] +// CHECK:STDOUT: %.14: = specific_function %Source, @Source(%X) [template] +// CHECK:STDOUT: %.15: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.16: = specific_function %Source, @Source(i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -95,7 +95,7 @@ fn Test() { // 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 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.16)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.type (%Convert.type.1) = import_ref Core//prelude/operators/as, inst+70, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] // 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 @@ -172,8 +172,8 @@ fn Test() { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @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.%.5)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -199,7 +199,7 @@ fn Test() { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -222,7 +222,7 @@ fn Test() { // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.13] +// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -233,8 +233,8 @@ fn Test() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc13: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X @@ -254,7 +254,7 @@ fn Test() { // CHECK:STDOUT: fn @Convert.2[%self.param_patt: i32]() -> %return: %X { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: i32 = name_ref self, %self -// CHECK:STDOUT: %.loc16_51.1: %.3 = struct_literal (%self.ref) +// CHECK:STDOUT: %.loc16_51.1: %.2 = struct_literal (%self.ref) // CHECK:STDOUT: %.loc16_51.2: ref i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc16_51.3: init i32 = initialize_from %self.ref to %.loc16_51.2 // CHECK:STDOUT: %.loc16_51.4: init %X = class_init (%.loc16_51.3), %return @@ -265,7 +265,7 @@ fn Test() { // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %X]() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %X = name_ref self, %self -// CHECK:STDOUT: %n.ref: %.2 = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] +// CHECK:STDOUT: %n.ref: %.1 = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] // CHECK:STDOUT: %.loc20_45.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc20_45.2: i32 = bind_value %.loc20_45.1 // CHECK:STDOUT: return %.loc20_45.2 @@ -280,13 +280,13 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_11.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %.loc27_35.2 (constants.%.14)] +// CHECK:STDOUT: %.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %.loc27_35.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @Source.%T.loc27_11.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Source.ref: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %T.ref.loc27_42: type = name_ref T, %T.loc27_11.1 [symbolic = %T.loc27_11.2 (constants.%T)] -// CHECK:STDOUT: %.loc27_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %.loc27_35.2 (constants.%.14)] +// CHECK:STDOUT: %.loc27_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %.loc27_35.2 (constants.%.13)] // CHECK:STDOUT: %Source.call: init @Source.%T.loc27_11.2 (%T) = call %.loc27_35.1() // CHECK:STDOUT: %.loc27_44.1: @Source.%T.loc27_11.2 (%T) = value_of_initializer %Source.call // CHECK:STDOUT: %.loc27_44.2: @Source.%T.loc27_11.2 (%T) = converted %Source.call, %.loc27_44.1 @@ -299,27 +299,27 @@ fn Test() { // CHECK:STDOUT: %Sink_i32.ref: %Sink_i32.type = name_ref Sink_i32, file.%Sink_i32.decl [template = constants.%Sink_i32] // CHECK:STDOUT: %Source.ref.loc30: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc30_12: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%.15] +// CHECK:STDOUT: %.loc30_12: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%.14] // CHECK:STDOUT: %.loc30_18.1: ref %X = temporary_storage // CHECK:STDOUT: %Source.call.loc30: init %X = call %.loc30_12() to %.loc30_18.1 // CHECK:STDOUT: %.loc30_18.2: ref %X = temporary %.loc30_18.1, %Source.call.loc30 -// CHECK:STDOUT: %.loc30_18.3: %Convert.type.5 = interface_witness_access constants.%.13, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc30_18.3: %Convert.type.5 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.4] // CHECK:STDOUT: %.loc30_18.4: = bound_method %.loc30_18.2, %.loc30_18.3 // CHECK:STDOUT: %.loc30_18.5: %X = bind_value %.loc30_18.2 // CHECK:STDOUT: %Convert.call.loc30: init i32 = call %.loc30_18.4(%.loc30_18.5) // CHECK:STDOUT: %.loc30_18.6: i32 = value_of_initializer %Convert.call.loc30 // CHECK:STDOUT: %.loc30_18.7: i32 = converted %Source.call.loc30, %.loc30_18.6 -// CHECK:STDOUT: %Sink_i32.call: init %.1 = call %Sink_i32.ref(%.loc30_18.7) +// CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc30_18.7) // CHECK:STDOUT: %Sink_X.ref: %Sink_X.type = name_ref Sink_X, file.%Sink_X.decl [template = constants.%Sink_X] // CHECK:STDOUT: %Source.ref.loc31: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc31_16.2: type = converted %int.make_type_32, %.loc31_16.1 [template = i32] -// CHECK:STDOUT: %.loc31_10: = specific_function %Source.ref.loc31, @Source(i32) [template = constants.%.17] +// CHECK:STDOUT: %.loc31_10: = specific_function %Source.ref.loc31, @Source(i32) [template = constants.%.16] // CHECK:STDOUT: %Source.call.loc31: init i32 = call %.loc31_10() // CHECK:STDOUT: %.loc31_16.3: ref i32 = temporary_storage // CHECK:STDOUT: %.loc31_16.4: ref i32 = temporary %.loc31_16.3, %Source.call.loc31 -// CHECK:STDOUT: %.loc31_16.5: %Convert.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc31_16.5: %Convert.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Convert.2] // CHECK:STDOUT: %.loc31_16.6: = bound_method %.loc31_16.4, %.loc31_16.5 // CHECK:STDOUT: %.loc31_16.7: ref %X = temporary_storage // CHECK:STDOUT: %.loc31_16.8: i32 = bind_value %.loc31_16.4 @@ -327,7 +327,7 @@ fn Test() { // CHECK:STDOUT: %.loc31_16.9: init %X = converted %Source.call.loc31, %Convert.call.loc31 // CHECK:STDOUT: %.loc31_16.10: ref %X = temporary %.loc31_16.7, %.loc31_16.9 // CHECK:STDOUT: %.loc31_16.11: %X = bind_value %.loc31_16.10 -// CHECK:STDOUT: %Sink_X.call: init %.1 = call %Sink_X.ref(%.loc31_16.11) +// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_16.11) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -361,8 +361,8 @@ fn Test() { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%X, i32) { @@ -380,8 +380,8 @@ fn Test() { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(i32, constants.%X) { @@ -395,7 +395,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.14 +// CHECK:STDOUT: %.loc27_35.2 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(@Source.%T.loc27_11.2) { @@ -408,7 +408,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.15 +// CHECK:STDOUT: %.loc27_35.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(i32) { @@ -416,6 +416,6 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.17 +// CHECK:STDOUT: %.loc27_35.2 => constants.%.16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 628df2597ec3..ab2319a5bce1 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -33,18 +33,18 @@ fn TestOp() { // CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.4: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %Self [symbolic] -// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %Self [symbolic] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Inc.type, %Op.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Inc.type, %Op.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,7 +55,7 @@ fn TestOp() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+63, loaded [template = constants.%Inc.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+65, unloaded -// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+83, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.3: %.7 = import_ref Core//prelude/operators/arithmetic, inst+83, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+77, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+77, unloaded // CHECK:STDOUT: } @@ -94,7 +94,7 @@ fn TestOp() { // CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -112,9 +112,9 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Inc.type) { // CHECK:STDOUT: %Self: %Inc.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.2.%Self (%Self) [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+38: @Op.2.%.2 (%.5)](); +// CHECK:STDOUT: fn[addr .inst+38: @Op.2.%.2 (%.4)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { @@ -127,16 +127,16 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.6, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 // CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3.2(%.loc23_5) +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc23_3.2(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %.2 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%C) { diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 160a89ddce1f..4d0c94714b55 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -85,7 +85,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.1: type = class_type @ElementType [template] // CHECK:STDOUT: %SubscriptType.1: type = class_type @SubscriptType [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType.2: type = bind_symbolic_name ElementType, 1 [symbolic] // CHECK:STDOUT: %SubscriptType.2: type = bind_symbolic_name SubscriptType, 0 [symbolic] @@ -96,21 +96,21 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type.1: type = fn_type @At.1, @IndexWith(%SubscriptType.2, %ElementType.2) [symbolic] // CHECK:STDOUT: %At.1: %At.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %IndexWith.type.3: type = interface_type @IndexWith, @IndexWith(%SubscriptType.1, %ElementType.1) [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] // CHECK:STDOUT: %At.3: %At.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %ElementType.1 = struct_value () [template] // CHECK:STDOUT: %struct.2: %SubscriptType.1 = struct_value () [template] // CHECK:STDOUT: %struct.3: %C = struct_value () [template] -// CHECK:STDOUT: %.10: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.9: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -121,7 +121,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/index, inst+22, unloaded -// CHECK:STDOUT: %import_ref.3: @IndexWith.%.1 (%.4) = import_ref Core//prelude/operators/index, inst+50, loaded [symbolic = @IndexWith.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @IndexWith.%.1 (%.3) = import_ref Core//prelude/operators/index, inst+50, loaded [symbolic = @IndexWith.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.4: @IndexWith.%At.type (%At.type.1) = import_ref Core//prelude/operators/index, inst+42, loaded [symbolic = @IndexWith.%At (constants.%At.1)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/index, inst+42, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/index, inst+42, unloaded @@ -165,8 +165,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At.1, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type.1)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type.1) = struct_value () [symbolic = %At (constants.%At.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -195,7 +195,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -258,7 +258,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %c: %C = bind_name c, %.loc15_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %s.ref: %SubscriptType.1 = name_ref s, %s -// CHECK:STDOUT: %.loc16_25.1: %At.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc16_25.1: %At.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%At.2] // CHECK:STDOUT: %.loc16_25.2: = bound_method %c.ref, %.loc16_25.1 // CHECK:STDOUT: %.loc16_25.3: ref %ElementType.1 = temporary_storage // CHECK:STDOUT: %At.call: init %ElementType.1 = call %.loc16_25.2(%c.ref, %s.ref) to %.loc16_25.3 @@ -307,8 +307,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %At.type => constants.%At.type.3 // CHECK:STDOUT: %At => constants.%At.3 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @At.1(constants.%SubscriptType.1, constants.%ElementType.1, constants.%C) { @@ -322,10 +322,10 @@ let x: i32 = c[0]; // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType: type = bind_symbolic_name ElementType, 1 [symbolic] @@ -337,22 +337,22 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type.1: type = fn_type @At.1, @IndexWith(%SubscriptType, %ElementType) [symbolic] // CHECK:STDOUT: %At.1: %At.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %IndexWith.type.3: type = interface_type @IndexWith, @IndexWith(i32, i32) [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(i32, i32) [template] // CHECK:STDOUT: %At.3: %At.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.10: i32 = int_value 0 [template] -// CHECK:STDOUT: %.11: i32 = int_value 1 [template] -// CHECK:STDOUT: %.12: i32 = int_value 5 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.11, %.12) [template] -// CHECK:STDOUT: %.13: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.5: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.6: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %.8: i32 = int_value 1 [template] +// CHECK:STDOUT: %.9: i32 = int_value 5 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.8, %.9) [template] +// CHECK:STDOUT: %.10: %.1 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -365,7 +365,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/index, inst+22, unloaded -// CHECK:STDOUT: %import_ref.4: @IndexWith.%.1 (%.4) = import_ref Core//prelude/operators/index, inst+50, loaded [symbolic = @IndexWith.%.2 (constants.%.13)] +// CHECK:STDOUT: %import_ref.4: @IndexWith.%.1 (%.1) = import_ref Core//prelude/operators/index, inst+50, loaded [symbolic = @IndexWith.%.2 (constants.%.10)] // CHECK:STDOUT: %import_ref.5: @IndexWith.%At.type (%At.type.1) = import_ref Core//prelude/operators/index, inst+42, loaded [symbolic = @IndexWith.%At (constants.%At.1)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/index, inst+42, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/index, inst+42, unloaded @@ -381,12 +381,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int.make_type_32.loc4_7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc4_12: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_15.1: %.2 = tuple_literal (%int.make_type_32.loc4_7, %int.make_type_32.loc4_12) +// CHECK:STDOUT: %.loc4_15.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc4_7, %int.make_type_32.loc4_12) // CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_32.loc4_7 [template = i32] // CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_32.loc4_7, %.loc4_15.2 [template = i32] // CHECK:STDOUT: %.loc4_15.4: type = value_of_initializer %int.make_type_32.loc4_12 [template = i32] // CHECK:STDOUT: %.loc4_15.5: type = converted %int.make_type_32.loc4_12, %.loc4_15.4 [template = i32] -// CHECK:STDOUT: %.loc4_15.6: type = converted %.loc4_15.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_15.6: type = converted %.loc4_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.2 [template = constants.%IndexWith] // CHECK:STDOUT: %int.make_type_32.loc4_35: init type = call constants.%Int32() [template = i32] @@ -399,12 +399,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc10_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc10_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc10_17.1: %.2 = tuple_literal (%int.make_type_32.loc10_9, %int.make_type_32.loc10_14) +// CHECK:STDOUT: %.loc10_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc10_9, %int.make_type_32.loc10_14) // CHECK:STDOUT: %.loc10_17.2: type = value_of_initializer %int.make_type_32.loc10_9 [template = i32] // CHECK:STDOUT: %.loc10_17.3: type = converted %int.make_type_32.loc10_9, %.loc10_17.2 [template = i32] // CHECK:STDOUT: %.loc10_17.4: type = value_of_initializer %int.make_type_32.loc10_14 [template = i32] // CHECK:STDOUT: %.loc10_17.5: type = converted %int.make_type_32.loc10_14, %.loc10_17.4 [template = i32] -// CHECK:STDOUT: %.loc10_17.6: type = converted %.loc10_17.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_17.6: type = converted %.loc10_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_32.loc11, %.loc11_8.1 [template = i32] @@ -421,8 +421,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At.1, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type.1)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type.1) = struct_value () [symbolic = %At (constants.%At.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.1) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -434,28 +434,28 @@ let x: i32 = c[0]; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc4_15.6 as %IndexWith.type { // CHECK:STDOUT: %At.decl: %At.type.2 = fn_decl @At.2 [template = constants.%At.2] { -// CHECK:STDOUT: %self.patt: %.3 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.3 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %tuple.type.2 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %tuple.type.2 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %subscript.patt: i32 = binding_pattern subscript // CHECK:STDOUT: %subscript.param_patt: i32 = value_param_pattern %subscript.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: %Self.ref: type = name_ref Self, @impl.%.loc4_15.6 [template = constants.%.3] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc4_15.6 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_32.1: type = value_of_initializer %int.make_type_32.loc5_32 [template = i32] // CHECK:STDOUT: %.loc5_32.2: type = converted %int.make_type_32.loc5_32, %.loc5_32.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc5_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_32.loc5_40 [template = i32] // CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_32.loc5_40, %.loc5_40.1 [template = i32] -// CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.3 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %self: %tuple.type.2 = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: i32 = value_param runtime_param1 // CHECK:STDOUT: %subscript: i32 = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_45: = interface_witness (%At.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc4_45: = interface_witness (%At.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -473,25 +473,25 @@ let x: i32 = c[0]; // CHECK:STDOUT: fn[%self.param_patt: @At.1.%Self (%Self.2)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> @At.1.%ElementType (%ElementType); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @At.2[%self.param_patt: %.3](%subscript.param_patt: i32) -> i32 { +// CHECK:STDOUT: fn @At.2[%self.param_patt: %tuple.type.2](%subscript.param_patt: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: %.3 = name_ref self, %self -// CHECK:STDOUT: %.loc6_17: i32 = int_value 0 [template = constants.%.10] +// CHECK:STDOUT: %self.ref: %tuple.type.2 = name_ref self, %self +// CHECK:STDOUT: %.loc6_17: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc6_16: i32 = tuple_access %self.ref, element0 // CHECK:STDOUT: return %.loc6_16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_22: i32 = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc10_25: i32 = int_value 5 [template = constants.%.12] -// CHECK:STDOUT: %.loc10_26: %.3 = tuple_literal (%.loc10_22, %.loc10_25) -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc10_22, %.loc10_25) [template = constants.%tuple] -// CHECK:STDOUT: %.loc10_27: %.3 = converted %.loc10_26, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %s: %.3 = bind_name s, %.loc10_27 -// CHECK:STDOUT: %s.ref: %.3 = name_ref s, %s -// CHECK:STDOUT: %.loc11_16: i32 = int_value 0 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_17.1: %At.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc10_22: i32 = int_value 1 [template = constants.%.8] +// CHECK:STDOUT: %.loc10_25: i32 = int_value 5 [template = constants.%.9] +// CHECK:STDOUT: %.loc10_26: %tuple.type.2 = tuple_literal (%.loc10_22, %.loc10_25) +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc10_22, %.loc10_25) [template = constants.%tuple] +// CHECK:STDOUT: %.loc10_27: %tuple.type.2 = converted %.loc10_26, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %s: %tuple.type.2 = bind_name s, %.loc10_27 +// CHECK:STDOUT: %s.ref: %tuple.type.2 = name_ref s, %s +// CHECK:STDOUT: %.loc11_16: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc11_17.1: %At.type.3 = interface_witness_access constants.%.5, element0 [template = constants.%At.2] // CHECK:STDOUT: %.loc11_17.2: = bound_method %s.ref, %.loc11_17.1 // CHECK:STDOUT: %At.call: init i32 = call %.loc11_17.2(%s.ref, %.loc11_16) // CHECK:STDOUT: %.loc11_18.1: i32 = value_of_initializer %At.call @@ -539,15 +539,15 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %At.type => constants.%At.type.3 // CHECK:STDOUT: %At => constants.%At.3 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @At.1(i32, i32, constants.%.3) { +// CHECK:STDOUT: specific @At.1(i32, i32, constants.%tuple.type.2) { // CHECK:STDOUT: %SubscriptType => i32 // CHECK:STDOUT: %ElementType => i32 // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.3 -// CHECK:STDOUT: %Self => constants.%.3 +// CHECK:STDOUT: %Self => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_invalid_subscript_type.carbon @@ -559,7 +559,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.1: type = class_type @ElementType [template] // CHECK:STDOUT: %SubscriptType.1: type = class_type @SubscriptType [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType.2: type = bind_symbolic_name ElementType, 1 [symbolic] // CHECK:STDOUT: %SubscriptType.2: type = bind_symbolic_name SubscriptType, 0 [symbolic] @@ -570,20 +570,20 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type.1: type = fn_type @At.1, @IndexWith(%SubscriptType.2, %ElementType.2) [symbolic] // CHECK:STDOUT: %At.1: %At.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %IndexWith.type.3: type = interface_type @IndexWith, @IndexWith(%SubscriptType.1, %ElementType.1) [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] // CHECK:STDOUT: %At.3: %At.type.3 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.7: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %ElementType.1 = struct_value () [template] // CHECK:STDOUT: %struct.2: %C = struct_value () [template] -// CHECK:STDOUT: %.10: i32 = int_value 0 [template] +// CHECK:STDOUT: %.9: 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] @@ -593,15 +593,15 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self.4: %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.10 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%SubscriptType.1) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%SubscriptType.1) [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.10 [template] -// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.11 [symbolic] -// CHECK:STDOUT: %.16: %.4 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.15: %.3 = assoc_entity element0, imports.%import_ref.12 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -613,12 +613,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %IndexWith.type.1 = import_ref Core//prelude/operators/index, inst+13, loaded [template = constants.%IndexWith] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/index, inst+22, unloaded -// CHECK:STDOUT: %import_ref.3: @IndexWith.%.1 (%.4) = import_ref Core//prelude/operators/index, inst+50, loaded [symbolic = @IndexWith.%.2 (constants.%.16)] +// CHECK:STDOUT: %import_ref.3: @IndexWith.%.1 (%.3) = import_ref Core//prelude/operators/index, inst+50, loaded [symbolic = @IndexWith.%.2 (constants.%.15)] // CHECK:STDOUT: %import_ref.4: @IndexWith.%At.type (%At.type.1) = import_ref Core//prelude/operators/index, inst+42, loaded [symbolic = @IndexWith.%At (constants.%At.1)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/index, inst+42, unloaded // CHECK:STDOUT: %import_ref.6: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.10) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -661,8 +661,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At.1, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type.1)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type.1) = struct_value () [symbolic = %At (constants.%At.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -681,8 +681,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // 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.10 [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.%.10)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -711,7 +711,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -774,9 +774,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc14_14.2: %C = bind_value %.loc14_14.1 // CHECK:STDOUT: %c: %C = bind_name c, %.loc14_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc22_24: i32 = int_value 0 [template = constants.%.10] +// CHECK:STDOUT: %.loc22_24: i32 = int_value 0 [template = constants.%.9] // CHECK:STDOUT: %.loc22_25.1: %SubscriptType.1 = converted %.loc22_24, [template = ] -// CHECK:STDOUT: %.loc22_25.2: %At.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc22_25.2: %At.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%At.2] // CHECK:STDOUT: %.loc22_25.3: = bound_method %c.ref, %.loc22_25.2 // CHECK:STDOUT: %.loc22_25.4: ref %ElementType.1 = temporary_storage // CHECK:STDOUT: %At.call: init %ElementType.1 = call %.loc22_25.3(%c.ref, ) to %.loc22_25.4 @@ -825,8 +825,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %At.type => constants.%At.type.3 // CHECK:STDOUT: %At => constants.%At.3 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @At.1(constants.%SubscriptType.1, constants.%ElementType.1, constants.%C) { @@ -866,8 +866,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self => constants.%Self.4 // 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.%.12 +// CHECK:STDOUT: %.2 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_index_with_not_implemented.carbon @@ -876,12 +876,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %.4: i32 = int_value 0 [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType: type = bind_symbolic_name ElementType, 1 [symbolic] @@ -893,8 +893,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic] // CHECK:STDOUT: %At: %At.type = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -938,8 +938,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type) = struct_value () [symbolic = %At (constants.%At)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.6)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.6) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -977,7 +977,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc6_14.2: %C = bind_value %.loc6_14.1 // CHECK:STDOUT: %c: %C = bind_name c, %.loc6_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc10: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %.loc10: i32 = int_value 0 [template = constants.%.4] // CHECK:STDOUT: %x: i32 = bind_name x, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index c168a53af9a1..77496256230d 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %LeftShift.type: type = interface_type @LeftShift [template] // CHECK:STDOUT: %Self.1: %LeftShift.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %LeftShiftAssign.type: type = interface_type @LeftShiftAssign [template] // CHECK:STDOUT: %Self.2: %LeftShiftAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %LeftShift.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %LeftShift.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %LeftShiftAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %LeftShiftAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+210, loaded [template = constants.%LeftShift.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+212, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+240, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/bitwise, inst+240, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+235, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+242, loaded [template = constants.%LeftShiftAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+244, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+269, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/bitwise, inst+269, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+263, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+235, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+263, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %LeftShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %LeftShiftAssign.type) { // CHECK:STDOUT: %Self: %LeftShiftAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 0e00ace1c63e..2248659b012d 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Mod.type: type = interface_type @Mod [template] // CHECK:STDOUT: %Self.1: %Mod.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %ModAssign.type: type = interface_type @ModAssign [template] // CHECK:STDOUT: %Self.2: %ModAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Mod.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Mod.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %ModAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ModAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+315, loaded [template = constants.%Mod.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+317, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+345, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+345, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+340, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+347, loaded [template = constants.%ModAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+349, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+374, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/arithmetic, inst+374, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+368, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+340, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+368, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %ModAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %ModAssign.type) { // CHECK:STDOUT: %Self: %ModAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index 55d7b3fc0f25..cc52c806fe9d 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Mul.type: type = interface_type @Mul [template] // CHECK:STDOUT: %Self.1: %Mul.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %MulAssign.type: type = interface_type @MulAssign [template] // CHECK:STDOUT: %Self.2: %MulAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Mul.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Mul.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %MulAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %MulAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+193, loaded [template = constants.%Mul.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+195, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+223, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+223, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+218, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+225, loaded [template = constants.%MulAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+227, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+252, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/arithmetic, inst+252, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+246, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+218, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+246, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %MulAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %MulAssign.type) { // CHECK:STDOUT: %Self: %MulAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index 4adf9db2860b..147fc04632d8 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -33,17 +33,17 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] // CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Negate.type, %Op.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Negate.type, %Op.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,7 +54,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+85, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+87, unloaded -// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+103, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: } @@ -108,7 +108,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -139,7 +139,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23_17.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23_17.2 diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index 3900a248f672..44d5c7996cb7 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -57,10 +57,10 @@ fn F() { ()[()]; } // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: i32 = int_value 0 [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 0 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,8 +84,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_10: i32 = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc10_12: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc10_10: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_12: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -93,10 +93,10 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -108,8 +108,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_10: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_12: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_10: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_12: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -119,26 +119,26 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType: type = bind_symbolic_name SubscriptType, 0 [symbolic] // CHECK:STDOUT: %SubscriptType.patt: type = symbolic_binding_pattern SubscriptType, 0 [symbolic] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %IndexWith.type.2: type = interface_type @IndexWith, @IndexWith(%SubscriptType) [symbolic] // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %At.type.1: type = fn_type @At.1, @IndexWith(%SubscriptType) [symbolic] // CHECK:STDOUT: %At.1: %At.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @IndexWith.%At.decl [symbolic] -// CHECK:STDOUT: %IndexWith.type.3: type = interface_type @IndexWith, @IndexWith(%.1) [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @IndexWith.%At.decl [symbolic] +// CHECK:STDOUT: %IndexWith.type.3: type = interface_type @IndexWith, @IndexWith(%empty_tuple.type) [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] -// CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%.1) [template] +// CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%empty_tuple.type) [template] // CHECK:STDOUT: %At.3: %At.type.3 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @IndexWith.%At.decl [template] -// CHECK:STDOUT: %.6: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @IndexWith.%At.decl [template] +// CHECK:STDOUT: %.5: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.7: = bound_method %tuple, %At.2 [template] +// CHECK:STDOUT: %.6: = bound_method %empty_tuple, %At.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -157,13 +157,13 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType.loc5_26.1: type = bind_symbolic_name SubscriptType, 0, %SubscriptType.param [symbolic = %SubscriptType.loc5_26.2 (constants.%SubscriptType)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc9_7.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %Core.ref: = name_ref Core, file.%Core [template = file.%Core] // CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, file.%IndexWith.decl [template = constants.%IndexWith] -// CHECK:STDOUT: %.loc9_28: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_26: type = converted %.loc9_28, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %IndexWith.type: type = interface_type @IndexWith, @IndexWith(constants.%.1) [template = constants.%IndexWith.type.3] +// CHECK:STDOUT: %.loc9_28: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_26: type = converted %.loc9_28, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %IndexWith.type: type = interface_type @IndexWith, @IndexWith(constants.%empty_tuple.type) [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: } @@ -177,8 +177,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %At.type: type = fn_type @At.1, @IndexWith(%SubscriptType.loc5_26.2) [symbolic = %At.type (constants.%At.type.1)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type.1) = struct_value () [symbolic = %At (constants.%At.1)] -// CHECK:STDOUT: %.loc6_52.2: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.loc6_52.2 (constants.%.2)] -// CHECK:STDOUT: %.loc6_52.3: @IndexWith.%.loc6_52.2 (%.2) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.3)] +// CHECK:STDOUT: %.loc6_52.2: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.loc6_52.2 (constants.%.1)] +// CHECK:STDOUT: %.loc6_52.3: @IndexWith.%.loc6_52.2 (%.1) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @IndexWith.%IndexWith.type (%IndexWith.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -187,24 +187,24 @@ fn F() { ()[()]; } // CHECK:STDOUT: %self.param_patt: @At.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %subscript.patt: @At.1.%SubscriptType (%SubscriptType) = binding_pattern subscript // CHECK:STDOUT: %subscript.param_patt: @At.1.%SubscriptType (%SubscriptType) = value_param_pattern %subscript.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_15.1: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc6_15.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %.loc6_15.3: type = converted %Self.ref, %.loc6_15.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc5_26.1 [symbolic = %SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %.loc6_51.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_51.2: type = converted %.loc6_51.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_51.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_51.2: type = converted %.loc6_51.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: @At.1.%Self (%Self) = value_param runtime_param0 // CHECK:STDOUT: %self: @At.1.%Self (%Self) = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: @At.1.%SubscriptType (%SubscriptType) = value_param runtime_param1 // CHECK:STDOUT: %subscript: @At.1.%SubscriptType (%SubscriptType) = bind_name subscript, %subscript.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_52.1: @IndexWith.%.loc6_52.2 (%.2) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.3)] +// CHECK:STDOUT: %.loc6_52.1: @IndexWith.%.loc6_52.2 (%.1) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -215,26 +215,26 @@ fn F() { ()[()]; } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc9_7.2 as %IndexWith.type { // CHECK:STDOUT: %At.decl: %At.type.2 = fn_decl @At.2 [template = constants.%At.2] { -// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %subscript.patt: %.1 = binding_pattern subscript -// CHECK:STDOUT: %subscript.param_patt: %.1 = value_param_pattern %subscript.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %subscript.patt: %empty_tuple.type = binding_pattern subscript +// CHECK:STDOUT: %subscript.param_patt: %empty_tuple.type = value_param_pattern %subscript.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc9_7.2 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_33.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_33.2: type = converted %.loc10_33.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_40.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_40.2: type = converted %.loc10_40.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param -// CHECK:STDOUT: %subscript.param: %.1 = value_param runtime_param1 -// CHECK:STDOUT: %subscript: %.1 = bind_name subscript, %subscript.param -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc9_7.2 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_33.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_33.2: type = converted %.loc10_33.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_40.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_40.2: type = converted %.loc10_40.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param +// CHECK:STDOUT: %subscript.param: %empty_tuple.type = value_param runtime_param1 +// CHECK:STDOUT: %subscript: %empty_tuple.type = bind_name subscript, %subscript.param +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_31: = interface_witness (%At.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc9_31: = interface_witness (%At.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -246,28 +246,28 @@ fn F() { ()[()]; } // CHECK:STDOUT: %IndexWith.type: type = interface_type @IndexWith, @IndexWith(%SubscriptType) [symbolic = %IndexWith.type (constants.%IndexWith.type.2)] // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @At.1.%Self (%Self)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> %.1; +// CHECK:STDOUT: fn[%self.param_patt: @At.1.%Self (%Self)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> %empty_tuple.type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @At.2[%self.param_patt: %.1](%subscript.param_patt: %.1) -> %.1 { +// CHECK:STDOUT: fn @At.2[%self.param_patt: %empty_tuple.type](%subscript.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_13: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_14: %.1 = converted %.loc11_13, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_13: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_14: %empty_tuple.type = converted %.loc11_13, %empty_tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc11_14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_14: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple.loc15_11: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_11.2: %.1 = converted %.loc15_11.1, %tuple.loc15_11 [template = constants.%tuple] -// CHECK:STDOUT: %tuple.loc15_14: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_15.1: %.1 = converted %.loc15_14, %tuple.loc15_14 [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_15.2: %At.type.3 = interface_witness_access constants.%.6, element0 [template = constants.%At.2] -// CHECK:STDOUT: %.loc15_15.3: = bound_method %.loc15_11.2, %.loc15_15.2 [template = constants.%.7] -// CHECK:STDOUT: %At.call: init %.1 = call %.loc15_15.3(%.loc15_11.2, %.loc15_15.1) +// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_14: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple.loc15_11: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_11.2: %empty_tuple.type = converted %.loc15_11.1, %empty_tuple.loc15_11 [template = constants.%empty_tuple] +// CHECK:STDOUT: %empty_tuple.loc15_14: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_15.1: %empty_tuple.type = converted %.loc15_14, %empty_tuple.loc15_14 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_15.2: %At.type.3 = interface_witness_access constants.%.5, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc15_15.3: = bound_method %.loc15_11.2, %.loc15_15.2 [template = constants.%.6] +// CHECK:STDOUT: %At.call: init %empty_tuple.type = call %.loc15_15.3(%.loc15_11.2, %.loc15_15.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -292,22 +292,22 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType.patt.loc5_26.2 => constants.%SubscriptType // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith(constants.%.1) { -// CHECK:STDOUT: %SubscriptType.loc5_26.2 => constants.%.1 -// CHECK:STDOUT: %SubscriptType.patt.loc5_26.2 => constants.%.1 +// CHECK:STDOUT: specific @IndexWith(constants.%empty_tuple.type) { +// CHECK:STDOUT: %SubscriptType.loc5_26.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %SubscriptType.patt.loc5_26.2 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %At.type => constants.%At.type.3 // CHECK:STDOUT: %At => constants.%At.3 -// CHECK:STDOUT: %.loc6_52.2 => constants.%.4 -// CHECK:STDOUT: %.loc6_52.3 => constants.%.5 +// CHECK:STDOUT: %.loc6_52.2 => constants.%.3 +// CHECK:STDOUT: %.loc6_52.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @At.1(constants.%.1, constants.%.1) { -// CHECK:STDOUT: %SubscriptType => constants.%.1 +// CHECK:STDOUT: specific @At.1(constants.%empty_tuple.type, constants.%empty_tuple.type) { +// CHECK:STDOUT: %SubscriptType => constants.%empty_tuple.type // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.3 -// CHECK:STDOUT: %Self => constants.%.1 +// CHECK:STDOUT: %Self => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 23cf7a22dc10..506396185620 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -83,7 +83,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Ordered.type: type = interface_type @Ordered [template] // CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type.1: type = fn_type @Less.1 [template] // CHECK:STDOUT: %Less.1: %Less.type.1 = struct_value () [template] @@ -101,24 +101,24 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Greater.2: %Greater.type.2 = struct_value () [template] // CHECK:STDOUT: %GreaterOrEquivalent.type.2: type = fn_type @GreaterOrEquivalent.2 [template] // CHECK:STDOUT: %GreaterOrEquivalent.2: %GreaterOrEquivalent.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] +// CHECK:STDOUT: %.3: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %Ordered.type, %Less.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Ordered.type, %Less.type.2 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.12 [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Ordered.type, %LessOrEquivalent.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type %Ordered.type, %LessOrEquivalent.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.13 [template] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %Ordered.type, %Greater.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element2, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type %Ordered.type, %Greater.type.2 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element2, imports.%import_ref.14 [template] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %Ordered.type, %GreaterOrEquivalent.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element3, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type %Ordered.type, %GreaterOrEquivalent.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element3, imports.%import_ref.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -130,10 +130,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+70, loaded [template = constants.%Ordered.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/comparison, inst+72, unloaded -// CHECK:STDOUT: %import_ref.3: %.6 = import_ref Core//prelude/operators/comparison, inst+100, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/comparison, inst+128, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.5: %.10 = import_ref Core//prelude/operators/comparison, inst+156, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.6: %.12 = import_ref Core//prelude/operators/comparison, inst+184, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref Core//prelude/operators/comparison, inst+100, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.7 = import_ref Core//prelude/operators/comparison, inst+128, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.5: %.9 = import_ref Core//prelude/operators/comparison, inst+156, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.6: %.11 = import_ref Core//prelude/operators/comparison, inst+184, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.7: %Less.type.2 = import_ref Core//prelude/operators/comparison, inst+95, loaded [template = constants.%Less.2] // CHECK:STDOUT: %import_ref.8: %LessOrEquivalent.type.2 = import_ref Core//prelude/operators/comparison, inst+123, loaded [template = constants.%LessOrEquivalent.2] // CHECK:STDOUT: %import_ref.9: %Greater.type.2 = import_ref Core//prelude/operators/comparison, inst+151, loaded [template = constants.%Greater.2] @@ -334,7 +334,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Less = %Less.decl @@ -389,7 +389,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Less.1] +// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Less.1] // CHECK:STDOUT: %.loc14_12.2: = bound_method %a.ref, %.loc14_12.1 // CHECK:STDOUT: %Less.call: init bool = call %.loc14_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -401,7 +401,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.4, element1 [template = constants.%LessOrEquivalent.1] +// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.3, element1 [template = constants.%LessOrEquivalent.1] // CHECK:STDOUT: %.loc18_12.2: = bound_method %a.ref, %.loc18_12.1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -413,7 +413,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.4, element2 [template = constants.%Greater.1] +// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.3, element2 [template = constants.%Greater.1] // CHECK:STDOUT: %.loc22_12.2: = bound_method %a.ref, %.loc22_12.1 // CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -425,7 +425,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.4, element3 [template = constants.%GreaterOrEquivalent.1] +// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.3, element3 [template = constants.%GreaterOrEquivalent.1] // CHECK:STDOUT: %.loc26_12.2: = bound_method %a.ref, %.loc26_12.1 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call @@ -472,35 +472,35 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %Ordered.type: type = interface_type @Ordered [template] // CHECK:STDOUT: %Self: %Ordered.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] // CHECK:STDOUT: %Less: %Less.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Ordered.type, %Less.type [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Ordered.type, %Less.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.12 [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template] // CHECK:STDOUT: %LessOrEquivalent.type: type = fn_type @LessOrEquivalent [template] // CHECK:STDOUT: %LessOrEquivalent: %LessOrEquivalent.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %Ordered.type, %LessOrEquivalent.type [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, imports.%import_ref.13 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Ordered.type, %LessOrEquivalent.type [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element1, imports.%import_ref.13 [template] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] // CHECK:STDOUT: %Greater: %Greater.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Ordered.type, %Greater.type [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element2, imports.%import_ref.14 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Ordered.type, %Greater.type [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element2, imports.%import_ref.14 [template] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template] // CHECK:STDOUT: %GreaterOrEquivalent.type: type = fn_type @GreaterOrEquivalent [template] // CHECK:STDOUT: %GreaterOrEquivalent: %GreaterOrEquivalent.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %Ordered.type, %GreaterOrEquivalent.type [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element3, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %Ordered.type, %GreaterOrEquivalent.type [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element3, imports.%import_ref.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -513,10 +513,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/comparison, inst+70, loaded [template = constants.%Ordered.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/comparison, inst+72, unloaded -// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/comparison, inst+100, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.5: %.7 = import_ref Core//prelude/operators/comparison, inst+128, loaded [template = constants.%.8] -// CHECK:STDOUT: %import_ref.6: %.9 = import_ref Core//prelude/operators/comparison, inst+156, loaded [template = constants.%.10] -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/comparison, inst+184, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//prelude/operators/comparison, inst+100, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.5: %.6 = import_ref Core//prelude/operators/comparison, inst+128, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.6: %.8 = import_ref Core//prelude/operators/comparison, inst+156, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/comparison, inst+184, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/comparison, inst+95, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/comparison, inst+123, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/comparison, inst+151, unloaded diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index e150a503f254..a56e9de855f6 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %RightShift.type: type = interface_type @RightShift [template] // CHECK:STDOUT: %Self.1: %RightShift.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %RightShiftAssign.type: type = interface_type @RightShiftAssign [template] // CHECK:STDOUT: %Self.2: %RightShiftAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %RightShift.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %RightShift.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %RightShiftAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %RightShiftAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+271, loaded [template = constants.%RightShift.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/bitwise, inst+273, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/bitwise, inst+301, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/bitwise, inst+301, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/bitwise, inst+296, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+303, loaded [template = constants.%RightShiftAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/bitwise, inst+305, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/bitwise, inst+330, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/bitwise, inst+330, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/bitwise, inst+324, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/bitwise, inst+296, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/bitwise, inst+324, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %RightShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %RightShiftAssign.type) { // CHECK:STDOUT: %Self: %RightShiftAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 599469676d54..d514f67b7285 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -40,30 +40,30 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Sub.type: type = interface_type @Sub [template] // CHECK:STDOUT: %Self.1: %Sub.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %SubAssign.type: type = interface_type @SubAssign [template] // CHECK:STDOUT: %Self.2: %SubAssign.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type %C [template] +// CHECK:STDOUT: %.5: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] // CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.6: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %Sub.type, %Op.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.9 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %Sub.type, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.9 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] // CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %SubAssign.type, %Op.type.4 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %SubAssign.type, %Op.type.4 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +75,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+110, loaded [template = constants.%Sub.type] // CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/arithmetic, inst+112, unloaded -// CHECK:STDOUT: %import_ref.3: %.9 = import_ref Core//prelude/operators/arithmetic, inst+140, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref Core//prelude/operators/arithmetic, inst+140, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Core//prelude/operators/arithmetic, inst+135, loaded [template = constants.%Op.2] // CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+142, loaded [template = constants.%SubAssign.type] // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+144, unloaded -// CHECK:STDOUT: %import_ref.7: %.11 = import_ref Core//prelude/operators/arithmetic, inst+169, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.7: %.10 = import_ref Core//prelude/operators/arithmetic, inst+169, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref Core//prelude/operators/arithmetic, inst+163, loaded [template = constants.%Op.4] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/arithmetic, inst+135, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/arithmetic, inst+163, unloaded @@ -123,16 +123,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.6 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.6 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.6 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -171,7 +171,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -180,21 +180,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %SubAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -222,38 +222,38 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self.1)](%other.param_patt: @Op.2.%Self (%Self.1)) -> @Op.2.%Self (%Self.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.4(constants.%Self.2: %SubAssign.type) { // CHECK:STDOUT: %Self: %SubAssign.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.2: type = ptr_type @Op.4.%Self (%Self.2) [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.7)](%other.param_patt: @Op.4.%Self (%Self.2)); +// CHECK:STDOUT: fn[addr .inst+95: @Op.4.%.2 (%.6)](%other.param_patt: @Op.4.%Self (%Self.2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C, %b.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.6, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.6 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.8, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.6 = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -267,11 +267,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.4(constants.%C) { // CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/package_expr/fail_not_found.carbon b/toolchain/check/testdata/package_expr/fail_not_found.carbon index 4e37b725c829..e5b7ab552e50 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -19,7 +19,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index b6173b4cbe42..6a2aff61cfab 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -45,9 +45,9 @@ fn Main() { // 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 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,7 +82,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%x.var, %.loc4 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %x.ref: ref i32 = name_ref x, file.%x @@ -95,12 +95,12 @@ fn Main() { // 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 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -136,7 +136,7 @@ fn Main() { // CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32.loc7, %.loc7_10.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc7_16: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc7_16: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: assign %x.var, %.loc7_16 // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] @@ -152,7 +152,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%x.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -162,13 +162,13 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -194,7 +194,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} {} -// CHECK:STDOUT: %.loc8: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc8: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -212,7 +212,7 @@ fn Main() { // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, @C.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref() +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon index 6ecbfa014a02..46a9b8ce6677 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -39,7 +39,7 @@ import library "var"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -65,7 +65,7 @@ import library "var"; // 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: diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index 3281fc5aa63c..16519cbe50a0 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -82,7 +82,7 @@ var d: i32 = d_ref; // 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: diff --git a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon index d7f60e3b2f91..cb7514c415c5 100644 --- a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon +++ b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon @@ -20,7 +20,7 @@ var a: () = A(); // CHECK:STDOUT: --- fail_implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -38,10 +38,10 @@ var a: () = A(); // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc7_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_9.2: type = converted %.loc7_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc7_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_9.2: type = converted %.loc7_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index eff42c82f9c3..2cd7f76114ee 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -26,9 +26,9 @@ var b: i32 = 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: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,7 +57,7 @@ var b: i32 = a; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%a.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -66,7 +66,7 @@ var b: i32 = 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: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/loaded_global.carbon b/toolchain/check/testdata/packages/loaded_global.carbon index e16a7b5bb838..6cb60aa978ea 100644 --- a/toolchain/check/testdata/packages/loaded_global.carbon +++ b/toolchain/check/testdata/packages/loaded_global.carbon @@ -42,7 +42,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -67,7 +67,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } @@ -90,14 +90,14 @@ var package_b: () = package.B(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var -// CHECK:STDOUT: %.loc6_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_17.2: type = converted %.loc6_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %package_a.var: ref %.1 = var package_a -// CHECK:STDOUT: %package_a: ref %.1 = bind_name package_a, %package_a.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var +// CHECK:STDOUT: %.loc6_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_17.2: type = converted %.loc6_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %package_a.var: ref %empty_tuple.type = var package_a +// CHECK:STDOUT: %package_a: ref %empty_tuple.type = bind_name package_a, %package_a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -105,11 +105,11 @@ var package_b: () = package.B(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref.loc4: %A.type = name_ref A, imports.%import_ref [template = constants.%A] -// CHECK:STDOUT: %A.call.loc4: init %.1 = call %A.ref.loc4() +// CHECK:STDOUT: %A.call.loc4: init %empty_tuple.type = call %A.ref.loc4() // CHECK:STDOUT: assign file.%a.var, %A.call.loc4 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %A.ref.loc6: %A.type = name_ref A, imports.%import_ref [template = constants.%A] -// CHECK:STDOUT: %A.call.loc6: init %.1 = call %A.ref.loc6() +// CHECK:STDOUT: %A.call.loc6: init %empty_tuple.type = call %A.ref.loc6() // CHECK:STDOUT: assign file.%package_a.var, %A.call.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -118,7 +118,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -143,7 +143,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: --- same_package_importer.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -165,14 +165,14 @@ var package_b: () = package.B(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var -// CHECK:STDOUT: %.loc8_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %package_b.var: ref %.1 = var package_b -// CHECK:STDOUT: %package_b: ref %.1 = bind_name package_b, %package_b.var +// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var +// CHECK:STDOUT: %.loc8_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %package_b.var: ref %empty_tuple.type = var package_b +// CHECK:STDOUT: %package_b: ref %empty_tuple.type = bind_name package_b, %package_b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B(); @@ -180,11 +180,11 @@ var package_b: () = package.B(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %B.ref.loc6: %B.type = name_ref B, imports.%import_ref [template = constants.%B] -// CHECK:STDOUT: %B.call.loc6: init %.1 = call %B.ref.loc6() +// CHECK:STDOUT: %B.call.loc6: init %empty_tuple.type = call %B.ref.loc6() // CHECK:STDOUT: assign file.%b.var, %B.call.loc6 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %B.ref.loc8: %B.type = name_ref B, imports.%import_ref [template = constants.%B] -// CHECK:STDOUT: %B.call.loc8: init %.1 = call %B.ref.loc8() +// CHECK:STDOUT: %B.call.loc8: init %empty_tuple.type = call %B.ref.loc8() // CHECK:STDOUT: assign file.%package_b.var, %B.call.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon index eb6dc751ede3..4ce0b202a554 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -195,10 +195,10 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -209,10 +209,10 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -223,7 +223,7 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -282,9 +282,9 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -311,9 +311,9 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -340,9 +340,9 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -369,12 +369,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -408,11 +408,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.2 = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init %.1 = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init %.1 = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 @@ -423,12 +423,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -463,11 +463,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_26.1: %.2 = struct_literal (%.loc7_25.1) -// CHECK:STDOUT: %.loc7_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_25.2: init %.1 = tuple_init () to %.loc7_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_26.3: init %.1 = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_26.1: %.1 = struct_literal (%.loc7_25.1) +// CHECK:STDOUT: %.loc7_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_25.2: init %empty_tuple.type = tuple_init () to %.loc7_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_26.3: init %empty_tuple.type = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_26.4: init %C = class_init (%.loc7_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_27: init %C = converted %.loc7_26.1, %.loc7_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_27 @@ -478,12 +478,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -518,11 +518,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.2 = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init %.1 = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init %.1 = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 @@ -533,12 +533,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -571,11 +571,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.2 = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init %.1 = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init %.1 = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 @@ -586,12 +586,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -625,11 +625,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_26.1: %.2 = struct_literal (%.loc7_25.1) -// CHECK:STDOUT: %.loc7_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_25.2: init %.1 = tuple_init () to %.loc7_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_26.3: init %.1 = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_26.1: %.1 = struct_literal (%.loc7_25.1) +// CHECK:STDOUT: %.loc7_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_25.2: init %empty_tuple.type = tuple_init () to %.loc7_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_26.3: init %empty_tuple.type = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_26.4: init %C = class_init (%.loc7_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_27: init %C = converted %.loc7_26.1, %.loc7_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_27 @@ -640,12 +640,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -678,11 +678,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: %.2 = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init %.1 = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init %.1 = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_26.1: %.1 = struct_literal (%.loc6_25.1) +// CHECK:STDOUT: %.loc6_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_25.2: init %empty_tuple.type = tuple_init () to %.loc6_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_26.3: init %empty_tuple.type = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_26.4: init %C = class_init (%.loc6_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_27: init %C = converted %.loc6_26.1, %.loc6_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_27 @@ -693,12 +693,12 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -737,11 +737,11 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_25.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_26.1: %.2 = struct_literal (%.loc11_25.1) -// CHECK:STDOUT: %.loc11_26.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc11_25.2: init %.1 = tuple_init () to %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_26.3: init %.1 = converted %.loc11_25.1, %.loc11_25.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_26.1: %.1 = struct_literal (%.loc11_25.1) +// CHECK:STDOUT: %.loc11_26.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc11_25.2: init %empty_tuple.type = tuple_init () to %.loc11_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_26.3: init %empty_tuple.type = converted %.loc11_25.1, %.loc11_25.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_26.4: init %C = class_init (%.loc11_26.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc11_27: init %C = converted %.loc11_26.1, %.loc11_26.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc11_27 @@ -785,7 +785,7 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -817,9 +817,9 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon index bff51b86d37c..3aecad2453b8 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -210,7 +210,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,7 +230,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -246,7 +246,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- other_fn_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -256,17 +256,17 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.1 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.param: %.1 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param +// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%x.param_patt: %.1) { +// CHECK:STDOUT: fn @F(%x.param_patt: %empty_tuple.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -275,7 +275,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F2.type: type = fn_type @F2 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F2: %F2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,7 +295,7 @@ fn UseF() { Other.F(); } // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -317,7 +317,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -336,7 +336,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -368,10 +368,10 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref.loc8: = name_ref Other, imports.%Other [template = imports.%Other] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: %Other.ref.loc9: = name_ref Other, imports.%Other [template = imports.%Other] // CHECK:STDOUT: %F2.ref: %F2.type = name_ref F2, imports.%import_ref.2 [template = constants.%F2] -// CHECK:STDOUT: %F2.call: init %.1 = call %F2.ref() +// CHECK:STDOUT: %F2.call: init %empty_tuple.type = call %F2.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -383,7 +383,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -412,7 +412,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -438,7 +438,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -467,7 +467,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -477,7 +477,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -508,7 +508,7 @@ fn UseF() { Other.F(); } // 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: } // CHECK:STDOUT: @@ -540,7 +540,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -571,7 +571,7 @@ fn UseF() { Other.F(); } // 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: } // CHECK:STDOUT: @@ -599,7 +599,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %UseF.type: type = fn_type @UseF [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %UseF: %UseF.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/no_prelude/export_import.carbon b/toolchain/check/testdata/packages/no_prelude/export_import.carbon index 0f10901030de..7dd32eeadaae 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_import.carbon @@ -170,10 +170,10 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -184,10 +184,10 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -269,12 +269,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -302,11 +302,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -317,12 +317,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -351,11 +351,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_20.1: %.2 = struct_literal (%.loc11_19.1) -// CHECK:STDOUT: %.loc11_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc11_19.2: init %.1 = tuple_init () to %.loc11_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_20.3: init %.1 = converted %.loc11_19.1, %.loc11_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_20.1: %.1 = struct_literal (%.loc11_19.1) +// CHECK:STDOUT: %.loc11_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc11_19.2: init %empty_tuple.type = tuple_init () to %.loc11_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_20.3: init %empty_tuple.type = converted %.loc11_19.1, %.loc11_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_20.4: init %C = class_init (%.loc11_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc11_21: init %C = converted %.loc11_20.1, %.loc11_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc11_21 @@ -366,12 +366,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -400,11 +400,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_20.1: %.2 = struct_literal (%.loc4_19.1) -// CHECK:STDOUT: %.loc4_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc4_19.2: init %.1 = tuple_init () to %.loc4_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_20.3: init %.1 = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_20.1: %.1 = struct_literal (%.loc4_19.1) +// CHECK:STDOUT: %.loc4_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc4_19.2: init %empty_tuple.type = tuple_init () to %.loc4_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_20.3: init %empty_tuple.type = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc4_20.4: init %C = class_init (%.loc4_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc4_21: init %C = converted %.loc4_20.1, %.loc4_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc4_21 @@ -415,12 +415,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -448,11 +448,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -463,12 +463,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -496,11 +496,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -511,12 +511,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -544,11 +544,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -559,12 +559,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -592,11 +592,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 @@ -607,12 +607,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -640,11 +640,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 @@ -655,12 +655,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -688,11 +688,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 @@ -714,12 +714,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -747,11 +747,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 @@ -762,12 +762,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -797,11 +797,11 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_28.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_29.1: %.2 = struct_literal (%.loc6_28.1) -// CHECK:STDOUT: %.loc6_29.2: ref %.1 = class_element_access file.%indirect_c.var, element0 -// CHECK:STDOUT: %.loc6_28.2: init %.1 = tuple_init () to %.loc6_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.3: init %.1 = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_28.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_29.1: %.1 = struct_literal (%.loc6_28.1) +// CHECK:STDOUT: %.loc6_29.2: ref %empty_tuple.type = class_element_access file.%indirect_c.var, element0 +// CHECK:STDOUT: %.loc6_28.2: init %empty_tuple.type = tuple_init () to %.loc6_29.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_29.3: init %empty_tuple.type = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_29.4: init %C = class_init (%.loc6_29.3), file.%indirect_c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_30: init %C = converted %.loc6_29.1, %.loc6_29.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%indirect_c.var, %.loc6_30 diff --git a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon index 77eaab8c104c..42b2ef04a5f0 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon @@ -117,14 +117,14 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %D, %.1 [template] -// CHECK:STDOUT: %.6: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %D, %empty_tuple.type [template] +// CHECK:STDOUT: %.5: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -137,10 +137,10 @@ var d: D = {.y = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -148,10 +148,10 @@ var d: D = {.y = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc9_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_11.2: type = converted %.loc9_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc9_8: %.5 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc9_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_11.2: type = converted %.loc9_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_8: %.4 = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -177,9 +177,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -208,9 +208,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -252,12 +252,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -285,11 +285,11 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -300,12 +300,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -333,11 +333,11 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -348,12 +348,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -381,11 +381,11 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 @@ -395,8 +395,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: --- fail_nonexport_use_both.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.y: %empty_tuple.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -416,8 +416,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_19: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_20: %.2 = struct_literal (%.loc10_19) +// CHECK:STDOUT: %.loc10_19: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_20: %.1 = struct_literal (%.loc10_19) // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -426,12 +426,12 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -459,11 +459,11 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 @@ -474,17 +474,17 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct.2: %D = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %D = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -526,19 +526,19 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_20.1: %.2 = struct_literal (%.loc8_19.1) -// CHECK:STDOUT: %.loc8_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc8_19.2: init %.1 = tuple_init () to %.loc8_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_20.3: init %.1 = converted %.loc8_19.1, %.loc8_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_20.1: %.1 = struct_literal (%.loc8_19.1) +// CHECK:STDOUT: %.loc8_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc8_19.2: init %empty_tuple.type = tuple_init () to %.loc8_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_20.3: init %empty_tuple.type = converted %.loc8_19.1, %.loc8_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_20.4: init %C = class_init (%.loc8_20.3), file.%c.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc8_21: init %C = converted %.loc8_20.1, %.loc8_20.4 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%c.var, %.loc8_21 -// CHECK:STDOUT: %.loc9_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_20.1: %.5 = struct_literal (%.loc9_19.1) -// CHECK:STDOUT: %.loc9_20.2: ref %.1 = class_element_access file.%d.var, element0 -// CHECK:STDOUT: %.loc9_19.2: init %.1 = tuple_init () to %.loc9_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc9_20.3: init %.1 = converted %.loc9_19.1, %.loc9_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc9_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_20.1: %.4 = struct_literal (%.loc9_19.1) +// CHECK:STDOUT: %.loc9_20.2: ref %empty_tuple.type = class_element_access file.%d.var, element0 +// CHECK:STDOUT: %.loc9_19.2: init %empty_tuple.type = tuple_init () to %.loc9_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_20.3: init %empty_tuple.type = converted %.loc9_19.1, %.loc9_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_20.4: init %D = class_init (%.loc9_20.3), file.%d.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc9_21: init %D = converted %.loc9_20.1, %.loc9_20.4 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%d.var, %.loc9_21 diff --git a/toolchain/check/testdata/packages/no_prelude/export_name.carbon b/toolchain/check/testdata/packages/no_prelude/export_name.carbon index f4c3e765c8c4..b4a5d7ba372f 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_name.carbon @@ -204,14 +204,14 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, %empty_tuple.type [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.5: type = unbound_element_type %NSC, %.1 [template] -// CHECK:STDOUT: %.6: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %NSC, %empty_tuple.type [template] +// CHECK:STDOUT: %.5: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -227,10 +227,10 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_8: %.1 = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -238,10 +238,10 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NSC { -// CHECK:STDOUT: %.loc10_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_11.2: type = converted %.loc10_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_8: %.5 = field_decl y, element0 [template] -// CHECK:STDOUT: %.loc11: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc10_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_11.2: type = converted %.loc10_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_8: %.4 = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NSC @@ -252,12 +252,12 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -318,12 +318,12 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -371,17 +371,17 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -428,19 +428,19 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 -// CHECK:STDOUT: %.loc7_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_27.1: %.5 = struct_literal (%.loc7_26.1) -// CHECK:STDOUT: %.loc7_27.2: ref %.1 = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc7_26.2: init %.1 = tuple_init () to %.loc7_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_27.3: init %.1 = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_27.1: %.4 = struct_literal (%.loc7_26.1) +// CHECK:STDOUT: %.loc7_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 +// CHECK:STDOUT: %.loc7_26.2: init %empty_tuple.type = tuple_init () to %.loc7_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_27.3: init %empty_tuple.type = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_27.4: init %NSC = class_init (%.loc7_27.3), file.%nsc.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc7_28: init %NSC = converted %.loc7_27.1, %.loc7_27.4 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%nsc.var, %.loc7_28 @@ -451,17 +451,17 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -509,19 +509,19 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_20.1: %.2 = struct_literal (%.loc4_19.1) -// CHECK:STDOUT: %.loc4_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc4_19.2: init %.1 = tuple_init () to %.loc4_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_20.3: init %.1 = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_20.1: %.1 = struct_literal (%.loc4_19.1) +// CHECK:STDOUT: %.loc4_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc4_19.2: init %empty_tuple.type = tuple_init () to %.loc4_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_20.3: init %empty_tuple.type = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc4_20.4: init %C = class_init (%.loc4_20.3), file.%c.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc4_21: init %C = converted %.loc4_20.1, %.loc4_20.4 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%c.var, %.loc4_21 -// CHECK:STDOUT: %.loc5_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_27.1: %.5 = struct_literal (%.loc5_26.1) -// CHECK:STDOUT: %.loc5_27.2: ref %.1 = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc5_26.2: init %.1 = tuple_init () to %.loc5_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc5_27.3: init %.1 = converted %.loc5_26.1, %.loc5_26.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc5_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_27.1: %.4 = struct_literal (%.loc5_26.1) +// CHECK:STDOUT: %.loc5_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 +// CHECK:STDOUT: %.loc5_26.2: init %empty_tuple.type = tuple_init () to %.loc5_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc5_27.3: init %empty_tuple.type = converted %.loc5_26.1, %.loc5_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_27.4: init %NSC = class_init (%.loc5_27.3), file.%nsc.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc5_28: init %NSC = converted %.loc5_27.1, %.loc5_27.4 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%nsc.var, %.loc5_28 @@ -532,17 +532,17 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -589,19 +589,19 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 -// CHECK:STDOUT: %.loc7_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_27.1: %.5 = struct_literal (%.loc7_26.1) -// CHECK:STDOUT: %.loc7_27.2: ref %.1 = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc7_26.2: init %.1 = tuple_init () to %.loc7_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_27.3: init %.1 = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_27.1: %.4 = struct_literal (%.loc7_26.1) +// CHECK:STDOUT: %.loc7_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 +// CHECK:STDOUT: %.loc7_26.2: init %empty_tuple.type = tuple_init () to %.loc7_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_27.3: init %empty_tuple.type = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_27.4: init %NSC = class_init (%.loc7_27.3), file.%nsc.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc7_28: init %NSC = converted %.loc7_27.1, %.loc7_27.4 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%nsc.var, %.loc7_28 @@ -653,9 +653,9 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -687,17 +687,17 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -744,19 +744,19 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 -// CHECK:STDOUT: %.loc8_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_27.1: %.5 = struct_literal (%.loc8_26.1) -// CHECK:STDOUT: %.loc8_27.2: ref %.1 = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc8_26.2: init %.1 = tuple_init () to %.loc8_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_27.3: init %.1 = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_27.1: %.4 = struct_literal (%.loc8_26.1) +// CHECK:STDOUT: %.loc8_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 +// CHECK:STDOUT: %.loc8_26.2: init %empty_tuple.type = tuple_init () to %.loc8_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_27.3: init %empty_tuple.type = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.4: init %NSC = class_init (%.loc8_27.3), file.%nsc.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc8_28: init %NSC = converted %.loc8_27.1, %.loc8_27.4 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%nsc.var, %.loc8_28 @@ -767,17 +767,17 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %empty_tuple.type} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -824,19 +824,19 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: %.2 = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init %.1 = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init %.1 = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc7_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc7_20.1: %.1 = struct_literal (%.loc7_19.1) +// CHECK:STDOUT: %.loc7_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc7_19.2: init %empty_tuple.type = tuple_init () to %.loc7_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_20.3: init %empty_tuple.type = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_20.4: init %C = class_init (%.loc7_20.3), file.%c.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_21: init %C = converted %.loc7_20.1, %.loc7_20.4 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%c.var, %.loc7_21 -// CHECK:STDOUT: %.loc8_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_27.1: %.5 = struct_literal (%.loc8_26.1) -// CHECK:STDOUT: %.loc8_27.2: ref %.1 = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc8_26.2: init %.1 = tuple_init () to %.loc8_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_27.3: init %.1 = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_27.1: %.4 = struct_literal (%.loc8_26.1) +// CHECK:STDOUT: %.loc8_27.2: ref %empty_tuple.type = class_element_access file.%nsc.var, element0 +// CHECK:STDOUT: %.loc8_26.2: init %empty_tuple.type = tuple_init () to %.loc8_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_27.3: init %empty_tuple.type = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.4: init %NSC = class_init (%.loc8_27.3), file.%nsc.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc8_28: init %NSC = converted %.loc8_27.1, %.loc8_27.4 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%nsc.var, %.loc8_28 @@ -861,9 +861,9 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -896,12 +896,12 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -929,11 +929,11 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: %.2 = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref %.1 = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init %.1 = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init %.1 = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc6_20.1: %.1 = struct_literal (%.loc6_19.1) +// CHECK:STDOUT: %.loc6_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0 +// CHECK:STDOUT: %.loc6_19.2: init %empty_tuple.type = tuple_init () to %.loc6_20.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc6_20.3: init %empty_tuple.type = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc6_20.4: init %C = class_init (%.loc6_20.3), file.%c.var [template = constants.%struct] // CHECK:STDOUT: %.loc6_21: init %C = converted %.loc6_20.1, %.loc6_20.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_21 @@ -944,9 +944,9 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: %empty_tuple.type} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon index c1043df16644..16cd0e50a4fa 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon @@ -38,10 +38,10 @@ export C.n; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %C, %.1 [template] -// CHECK:STDOUT: %.4: type = struct_type {.n: %.1} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.n: %.1} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,8 +54,8 @@ export C.n; // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc5_11.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: %.3 = field_decl n, element0 [template] -// CHECK:STDOUT: %.loc6: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon index d433a55c461e..74a8e34a518e 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon @@ -34,7 +34,7 @@ export C2(T:! type); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C1.1: %C1.type = struct_value () [template] // CHECK:STDOUT: %C1.2: type = class_type @C1, @C1(%T) [symbolic] // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic] @@ -92,7 +92,7 @@ export C2(T:! type); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C1.1: %C1.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %C1.2: type = class_type @C1, @C1(%T) [symbolic] diff --git a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon index bdb53b73c797..b8b822dfe2e5 100644 --- a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon +++ b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon @@ -318,8 +318,8 @@ import Other library "o1"; // CHECK:STDOUT: %C1: type = class_type @C1 [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %C1 = struct_value () [template] // CHECK:STDOUT: %C2: type = class_type @C2 [template] // CHECK:STDOUT: %struct.2: %C2 = struct_value () [template] @@ -391,8 +391,8 @@ import Other library "o1"; // CHECK:STDOUT: %C1: type = class_type @C1 [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -450,8 +450,8 @@ import Other library "o1"; // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -512,8 +512,8 @@ import Other library "o1"; // CHECK:STDOUT: %O1: type = class_type @O1 [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct.1: %O1 = struct_value () [template] // CHECK:STDOUT: %O2: type = class_type @O2 [template] // CHECK:STDOUT: %struct.2: %O2 = struct_value () [template] @@ -595,8 +595,8 @@ import Other library "o1"; // CHECK:STDOUT: %O1: type = class_type @O1 [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %struct: %O1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon index 9f9c079e1ccf..e346ecdce20b 100644 --- a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon +++ b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon @@ -124,7 +124,7 @@ var n: {} = i32; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } @@ -156,7 +156,7 @@ var n: {} = i32; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } @@ -193,10 +193,10 @@ var n: {} = i32; // CHECK:STDOUT: --- prelude_use_in_prelude.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -205,31 +205,31 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Int32.decl: %Int32.type = fn_decl @Int32 [template = constants.%Int32] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc8_16.2: type = converted %.loc8_16.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc8_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_16.2: type = converted %.loc8_16.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.var: ref %.1 = var n -// CHECK:STDOUT: %n: ref %.1 = bind_name n, %n.var +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %n.var: ref %empty_tuple.type = var n +// CHECK:STDOUT: %n: ref %empty_tuple.type = bind_name n, %n.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int32() -> %.1 { +// CHECK:STDOUT: fn @Int32() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_28: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_29: %.1 = converted %.loc8_28, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_28: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_29: %empty_tuple.type = converted %.loc8_28, %empty_tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc8_29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Int32.call: init %.1 = call constants.%Int32() +// CHECK:STDOUT: %Int32.call: init %empty_tuple.type = call constants.%Int32() // CHECK:STDOUT: assign file.%n.var, %Int32.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -239,7 +239,7 @@ var n: {} = i32; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } @@ -288,9 +288,9 @@ var n: {} = i32; // CHECK:STDOUT: %Core: type = class_type @Core [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,7 +316,7 @@ var n: {} = i32; // CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Core diff --git a/toolchain/check/testdata/packages/unused_lazy_import.carbon b/toolchain/check/testdata/packages/unused_lazy_import.carbon index ddfac6cccd4f..ede6b55914dc 100644 --- a/toolchain/check/testdata/packages/unused_lazy_import.carbon +++ b/toolchain/check/testdata/packages/unused_lazy_import.carbon @@ -22,7 +22,7 @@ impl package Implicit; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index d36e410f2173..2cee4ca52bc2 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -17,12 +17,12 @@ fn F() -> 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -61,12 +61,12 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n // CHECK:STDOUT: %n: ref i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc12_16: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign %n.var, %.loc12_16 // CHECK:STDOUT: %n.ref: ref i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_13: %.3 = addr_of %n.ref +// CHECK:STDOUT: %.loc13_13: %.2 = addr_of %n.ref // CHECK:STDOUT: %.loc13_12: ref i32 = deref %.loc13_13 -// CHECK:STDOUT: %.loc13_11: %.3 = addr_of %.loc13_12 +// CHECK:STDOUT: %.loc13_11: %.2 = addr_of %.loc13_12 // CHECK:STDOUT: %.loc13_10.1: ref i32 = deref %.loc13_11 // CHECK:STDOUT: %.loc13_10.2: i32 = bind_value %.loc13_10.1 // CHECK:STDOUT: return %.loc13_10.2 diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 72a2da450b8f..563a31691337 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -24,21 +24,21 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: 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: %struct: %.2 = struct_value (%.4, %.5) [template] -// CHECK:STDOUT: %.6: type = ptr_type i32 [template] -// CHECK:STDOUT: %.7: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] -// CHECK:STDOUT: %tuple: %.8 = tuple_value (%.4, %.5) [template] -// CHECK:STDOUT: %.10: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.3, %.4) [template] +// CHECK:STDOUT: %.5: type = ptr_type i32 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.6: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.3, %.4) [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,18 +67,18 @@ fn F() { // CHECK:STDOUT: %int.make_type_32.loc12_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_24.1: type = value_of_initializer %int.make_type_32.loc12_24 [template = i32] // CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_32.loc12_24, %.loc12_24.1 [template = i32] -// CHECK:STDOUT: %.loc12_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %s.var: ref %.2 = var s -// CHECK:STDOUT: %s: ref %.2 = bind_name s, %s.var -// CHECK:STDOUT: %.loc12_37: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_45: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_46.1: %.2 = struct_literal (%.loc12_37, %.loc12_45) +// CHECK:STDOUT: %.loc12_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %s.var: ref %.1 = var s +// CHECK:STDOUT: %s: ref %.1 = bind_name s, %s.var +// CHECK:STDOUT: %.loc12_37: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_45: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_46.1: %.1 = struct_literal (%.loc12_37, %.loc12_45) // CHECK:STDOUT: %.loc12_46.2: ref i32 = struct_access %s.var, element0 -// CHECK:STDOUT: %.loc12_46.3: init i32 = initialize_from %.loc12_37 to %.loc12_46.2 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_46.3: init i32 = initialize_from %.loc12_37 to %.loc12_46.2 [template = constants.%.3] // CHECK:STDOUT: %.loc12_46.4: ref i32 = struct_access %s.var, element1 -// CHECK:STDOUT: %.loc12_46.5: init i32 = initialize_from %.loc12_45 to %.loc12_46.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_46.6: init %.2 = struct_init (%.loc12_46.3, %.loc12_46.5) to %s.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_47: init %.2 = converted %.loc12_46.1, %.loc12_46.6 [template = constants.%struct] +// CHECK:STDOUT: %.loc12_46.5: init i32 = initialize_from %.loc12_45 to %.loc12_46.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_46.6: init %.1 = struct_init (%.loc12_46.3, %.loc12_46.5) to %s.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_47: init %.1 = converted %.loc12_46.1, %.loc12_46.6 [template = constants.%struct] // CHECK:STDOUT: assign %s.var, %.loc12_47 // CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_32.loc14_15 [template = i32] @@ -86,74 +86,74 @@ fn F() { // CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_32.loc14_24 [template = i32] // CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_32.loc14_24, %.loc14_24.1 [template = i32] -// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc14_28: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %p.var: ref %.3 = var p -// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var -// CHECK:STDOUT: %s.ref.loc14: ref %.2 = name_ref s, %s -// CHECK:STDOUT: %.loc14_32: %.3 = addr_of %s.ref.loc14 +// CHECK:STDOUT: %.loc14_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %.loc14_28: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %p.var: ref %.2 = var p +// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var +// CHECK:STDOUT: %s.ref.loc14: ref %.1 = name_ref s, %s +// CHECK:STDOUT: %.loc14_32: %.2 = addr_of %s.ref.loc14 // CHECK:STDOUT: assign %p.var, %.loc14_32 // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15, %.loc15_13.1 [template = i32] -// CHECK:STDOUT: %.loc15_13.3: type = ptr_type i32 [template = constants.%.6] -// CHECK:STDOUT: %q.var: ref %.6 = var q -// CHECK:STDOUT: %q: ref %.6 = bind_name q, %q.var -// CHECK:STDOUT: %s.ref.loc15: ref %.2 = name_ref s, %s +// CHECK:STDOUT: %.loc15_13.3: type = ptr_type i32 [template = constants.%.5] +// CHECK:STDOUT: %q.var: ref %.5 = var q +// CHECK:STDOUT: %q: ref %.5 = bind_name q, %q.var +// CHECK:STDOUT: %s.ref.loc15: ref %.1 = name_ref s, %s // CHECK:STDOUT: %.loc15_19: ref i32 = struct_access %s.ref.loc15, element0 -// CHECK:STDOUT: %.loc15_17: %.6 = addr_of %.loc15_19 +// CHECK:STDOUT: %.loc15_17: %.5 = addr_of %.loc15_19 // CHECK:STDOUT: assign %q.var, %.loc15_17 // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_32.loc16, %.loc16_13.1 [template = i32] -// CHECK:STDOUT: %.loc16_13.3: type = ptr_type i32 [template = constants.%.6] -// CHECK:STDOUT: %r.var: ref %.6 = var r -// CHECK:STDOUT: %r: ref %.6 = bind_name r, %r.var -// CHECK:STDOUT: %s.ref.loc16: ref %.2 = name_ref s, %s +// CHECK:STDOUT: %.loc16_13.3: type = ptr_type i32 [template = constants.%.5] +// CHECK:STDOUT: %r.var: ref %.5 = var r +// CHECK:STDOUT: %r: ref %.5 = bind_name r, %r.var +// CHECK:STDOUT: %s.ref.loc16: ref %.1 = name_ref s, %s // CHECK:STDOUT: %.loc16_19: ref i32 = struct_access %s.ref.loc16, element1 -// CHECK:STDOUT: %.loc16_17: %.6 = addr_of %.loc16_19 +// CHECK:STDOUT: %.loc16_17: %.5 = addr_of %.loc16_19 // CHECK:STDOUT: assign %r.var, %.loc16_17 // CHECK:STDOUT: %int.make_type_32.loc18_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_19.1: %.7 = tuple_literal (%int.make_type_32.loc18_11, %int.make_type_32.loc18_16) +// CHECK:STDOUT: %.loc18_19.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc18_11, %int.make_type_32.loc18_16) // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_32.loc18_11 [template = i32] // CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_32.loc18_11, %.loc18_19.2 [template = i32] // CHECK:STDOUT: %.loc18_19.4: type = value_of_initializer %int.make_type_32.loc18_16 [template = i32] // CHECK:STDOUT: %.loc18_19.5: type = converted %int.make_type_32.loc18_16, %.loc18_19.4 [template = i32] -// CHECK:STDOUT: %.loc18_19.6: type = converted %.loc18_19.1, constants.%.8 [template = constants.%.8] -// CHECK:STDOUT: %t.var: ref %.8 = var t -// CHECK:STDOUT: %t: ref %.8 = bind_name t, %t.var -// CHECK:STDOUT: %.loc18_24: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc18_27: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_28.1: %.8 = tuple_literal (%.loc18_24, %.loc18_27) +// CHECK:STDOUT: %.loc18_19.6: type = converted %.loc18_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %t.var: ref %tuple.type.2 = var t +// CHECK:STDOUT: %t: ref %tuple.type.2 = bind_name t, %t.var +// CHECK:STDOUT: %.loc18_24: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc18_27: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc18_28.1: %tuple.type.2 = tuple_literal (%.loc18_24, %.loc18_27) // CHECK:STDOUT: %.loc18_28.2: ref i32 = tuple_access %t.var, element0 -// CHECK:STDOUT: %.loc18_28.3: init i32 = initialize_from %.loc18_24 to %.loc18_28.2 [template = constants.%.4] +// CHECK:STDOUT: %.loc18_28.3: init i32 = initialize_from %.loc18_24 to %.loc18_28.2 [template = constants.%.3] // CHECK:STDOUT: %.loc18_28.4: ref i32 = tuple_access %t.var, element1 -// CHECK:STDOUT: %.loc18_28.5: init i32 = initialize_from %.loc18_27 to %.loc18_28.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_28.6: init %.8 = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc18_29: init %.8 = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc18_28.5: init i32 = initialize_from %.loc18_27 to %.loc18_28.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc18_28.6: init %tuple.type.2 = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign %t.var, %.loc18_29 // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_32.loc19, %.loc19_14.1 [template = i32] -// CHECK:STDOUT: %.loc19_14.3: type = ptr_type i32 [template = constants.%.6] -// CHECK:STDOUT: %t0.var: ref %.6 = var t0 -// CHECK:STDOUT: %t0: ref %.6 = bind_name t0, %t0.var -// CHECK:STDOUT: %t.ref.loc19: ref %.8 = name_ref t, %t -// CHECK:STDOUT: %.loc19_21: i32 = int_value 0 [template = constants.%.10] +// CHECK:STDOUT: %.loc19_14.3: type = ptr_type i32 [template = constants.%.5] +// CHECK:STDOUT: %t0.var: ref %.5 = var t0 +// CHECK:STDOUT: %t0: ref %.5 = bind_name t0, %t0.var +// CHECK:STDOUT: %t.ref.loc19: ref %tuple.type.2 = name_ref t, %t +// CHECK:STDOUT: %.loc19_21: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc19_20: ref i32 = tuple_access %t.ref.loc19, element0 -// CHECK:STDOUT: %.loc19_18: %.6 = addr_of %.loc19_20 +// CHECK:STDOUT: %.loc19_18: %.5 = addr_of %.loc19_20 // CHECK:STDOUT: assign %t0.var, %.loc19_18 // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_14.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_14.2: type = converted %int.make_type_32.loc20, %.loc20_14.1 [template = i32] -// CHECK:STDOUT: %.loc20_14.3: type = ptr_type i32 [template = constants.%.6] -// CHECK:STDOUT: %t1.var: ref %.6 = var t1 -// CHECK:STDOUT: %t1: ref %.6 = bind_name t1, %t1.var -// CHECK:STDOUT: %t.ref.loc20: ref %.8 = name_ref t, %t -// CHECK:STDOUT: %.loc20_21: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc20_14.3: type = ptr_type i32 [template = constants.%.5] +// CHECK:STDOUT: %t1.var: ref %.5 = var t1 +// CHECK:STDOUT: %t1: ref %.5 = bind_name t1, %t1.var +// CHECK:STDOUT: %t.ref.loc20: ref %tuple.type.2 = name_ref t, %t +// CHECK:STDOUT: %.loc20_21: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc20_20: ref i32 = tuple_access %t.ref.loc20, element1 -// CHECK:STDOUT: %.loc20_18: %.6 = addr_of %.loc20_20 +// CHECK:STDOUT: %.loc20_18: %.5 = addr_of %.loc20_20 // CHECK:STDOUT: assign %t1.var, %.loc20_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/arrow.carbon b/toolchain/check/testdata/pointer/arrow.carbon index d173a9b9ed9c..c3dd7fdb1221 100644 --- a/toolchain/check/testdata/pointer/arrow.carbon +++ b/toolchain/check/testdata/pointer/arrow.carbon @@ -28,15 +28,15 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Member.type: type = fn_type @Member [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Member: %Member.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type %C [template] -// CHECK:STDOUT: %.3: type = unbound_element_type %C, %.2 [template] -// CHECK:STDOUT: %.4: type = struct_type {.field: %.2} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.1: type = ptr_type %C [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.field: %.1} [template] +// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,13 +55,13 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %ptr.patt: %.2 = binding_pattern ptr -// CHECK:STDOUT: %ptr.param_patt: %.2 = value_param_pattern %ptr.patt, runtime_param0 +// CHECK:STDOUT: %ptr.patt: %.1 = binding_pattern ptr +// CHECK:STDOUT: %ptr.param_patt: %.1 = value_param_pattern %ptr.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc16: type = ptr_type %C [template = constants.%.2] -// CHECK:STDOUT: %ptr.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %ptr: %.2 = bind_name ptr, %ptr.param +// CHECK:STDOUT: %.loc16: type = ptr_type %C [template = constants.%.1] +// CHECK:STDOUT: %ptr.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %ptr: %.1 = bind_name ptr, %ptr.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -75,9 +75,9 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_15: type = ptr_type %C [template = constants.%.2] -// CHECK:STDOUT: %.loc13_12: %.3 = field_decl field, element0 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc13_15: type = ptr_type %C [template = constants.%.1] +// CHECK:STDOUT: %.loc13_12: %.2 = field_decl field, element0 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -87,36 +87,36 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Member[%self.param_patt: %C](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %.2) { +// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ptr.ref.loc17: %.2 = name_ref ptr, %ptr +// CHECK:STDOUT: %ptr.ref.loc17: %.1 = name_ref ptr, %ptr // CHECK:STDOUT: %.loc17_4.1: ref %C = deref %ptr.ref.loc17 // CHECK:STDOUT: %Member.ref.loc17: %Member.type = name_ref Member, @C.%Member.decl [template = constants.%Member] // CHECK:STDOUT: %.loc17_9: = bound_method %.loc17_4.1, %Member.ref.loc17 // CHECK:STDOUT: %.loc17_4.2: %C = bind_value %.loc17_4.1 -// CHECK:STDOUT: %Member.call.loc17: init %.1 = call %.loc17_9(%.loc17_4.2) -// CHECK:STDOUT: %ptr.ref.loc18: %.2 = name_ref ptr, %ptr +// CHECK:STDOUT: %Member.call.loc17: init %empty_tuple.type = call %.loc17_9(%.loc17_4.2) +// CHECK:STDOUT: %ptr.ref.loc18: %.1 = name_ref ptr, %ptr // CHECK:STDOUT: %.loc18_6.1: ref %C = deref %ptr.ref.loc18 // CHECK:STDOUT: %Member.ref.loc18: %Member.type = name_ref Member, @C.%Member.decl [template = constants.%Member] // CHECK:STDOUT: %.loc18_6.2: = bound_method %.loc18_6.1, %Member.ref.loc18 // CHECK:STDOUT: %.loc18_6.3: %C = bind_value %.loc18_6.1 -// CHECK:STDOUT: %Member.call.loc18: init %.1 = call %.loc18_6.2(%.loc18_6.3) -// CHECK:STDOUT: %ptr.ref.loc20: %.2 = name_ref ptr, %ptr +// CHECK:STDOUT: %Member.call.loc18: init %empty_tuple.type = call %.loc18_6.2(%.loc18_6.3) +// CHECK:STDOUT: %ptr.ref.loc20: %.1 = name_ref ptr, %ptr // CHECK:STDOUT: %.loc20_4: ref %C = deref %ptr.ref.loc20 -// CHECK:STDOUT: %field.ref.loc20: %.3 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc20_9: ref %.2 = class_element_access %.loc20_4, element0 -// CHECK:STDOUT: %ptr.ref.loc21: %.2 = name_ref ptr, %ptr +// CHECK:STDOUT: %field.ref.loc20: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] +// CHECK:STDOUT: %.loc20_9: ref %.1 = class_element_access %.loc20_4, element0 +// CHECK:STDOUT: %ptr.ref.loc21: %.1 = name_ref ptr, %ptr // CHECK:STDOUT: %.loc21_6.1: ref %C = deref %ptr.ref.loc21 -// CHECK:STDOUT: %field.ref.loc21: %.3 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc21_6.2: ref %.2 = class_element_access %.loc21_6.1, element0 -// CHECK:STDOUT: %ptr.ref.loc23: %.2 = name_ref ptr, %ptr +// CHECK:STDOUT: %field.ref.loc21: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] +// CHECK:STDOUT: %.loc21_6.2: ref %.1 = class_element_access %.loc21_6.1, element0 +// CHECK:STDOUT: %ptr.ref.loc23: %.1 = name_ref ptr, %ptr // CHECK:STDOUT: %.loc23_6.1: ref %C = deref %ptr.ref.loc23 -// CHECK:STDOUT: %field.ref.loc23_6: %.3 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc23_6.2: ref %.2 = class_element_access %.loc23_6.1, element0 -// CHECK:STDOUT: %.loc23_6.3: %.2 = bind_value %.loc23_6.2 +// CHECK:STDOUT: %field.ref.loc23_6: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] +// CHECK:STDOUT: %.loc23_6.2: ref %.1 = class_element_access %.loc23_6.1, element0 +// CHECK:STDOUT: %.loc23_6.3: %.1 = bind_value %.loc23_6.2 // CHECK:STDOUT: %.loc23_13.1: ref %C = deref %.loc23_6.3 -// CHECK:STDOUT: %field.ref.loc23_13: %.3 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc23_13.2: ref %.2 = class_element_access %.loc23_13.1, element0 +// CHECK:STDOUT: %field.ref.loc23_13: %.2 = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] +// CHECK:STDOUT: %.loc23_13.2: ref %.1 = class_element_access %.loc23_13.1, element0 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 906902930d5b..555bdc4939d8 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -19,12 +19,12 @@ fn F() -> 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,19 +63,19 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n // CHECK:STDOUT: %n: ref i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc12_16: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign %n.var, %.loc12_16 // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] -// CHECK:STDOUT: %.loc13_13.3: type = ptr_type i32 [template = constants.%.3] -// CHECK:STDOUT: %p.var: ref %.3 = var p -// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var +// CHECK:STDOUT: %.loc13_13.3: type = ptr_type i32 [template = constants.%.2] +// CHECK:STDOUT: %p.var: ref %.2 = var p +// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var // CHECK:STDOUT: %n.ref: ref i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_17: %.3 = addr_of %n.ref +// CHECK:STDOUT: %.loc13_17: %.2 = addr_of %n.ref // CHECK:STDOUT: assign %p.var, %.loc13_17 -// CHECK:STDOUT: %p.ref: ref %.3 = name_ref p, %p -// CHECK:STDOUT: %.loc15_11: %.3 = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p +// CHECK:STDOUT: %.loc15_11: %.2 = bind_value %p.ref // CHECK:STDOUT: %.loc15_10.1: ref i32 = deref %.loc15_11 // CHECK:STDOUT: %.loc15_10.2: i32 = bind_value %.loc15_10.1 // CHECK:STDOUT: return %.loc15_10.2 diff --git a/toolchain/check/testdata/pointer/fail_address_of_error.carbon b/toolchain/check/testdata/pointer/fail_address_of_error.carbon index cba82b0aa550..83cd14a50e01 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_error.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_error.carbon @@ -28,7 +28,7 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index fde0ff31bd36..c12df91fa1e5 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -103,42 +103,42 @@ fn AddressOfParam(param: 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: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %AddressOfLiteral.type: type = fn_type @AddressOfLiteral [template] // CHECK:STDOUT: %AddressOfLiteral: %AddressOfLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %.4: type = ptr_type i32 [template] -// CHECK:STDOUT: %.5: bool = bool_literal true [template] -// CHECK:STDOUT: %.6: type = ptr_type bool [template] -// CHECK:STDOUT: %.7: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.8: type = ptr_type f64 [template] -// CHECK:STDOUT: %.9: type = ptr_type String [template] -// CHECK:STDOUT: %.10: String = string_literal "Hello" [template] -// CHECK:STDOUT: %.11: i32 = int_value 1 [template] -// CHECK:STDOUT: %.12: i32 = int_value 2 [template] -// CHECK:STDOUT: %.13: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.14: type = ptr_type %.13 [template] -// CHECK:STDOUT: %.15: i32 = int_value 5 [template] -// CHECK:STDOUT: %.16: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.4: bool = bool_literal true [template] +// CHECK:STDOUT: %.5: type = ptr_type bool [template] +// CHECK:STDOUT: %.6: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.7: type = ptr_type f64 [template] +// CHECK:STDOUT: %.8: type = ptr_type String [template] +// CHECK:STDOUT: %.9: String = string_literal "Hello" [template] +// CHECK:STDOUT: %.10: i32 = int_value 1 [template] +// CHECK:STDOUT: %.11: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.12: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %.13: i32 = int_value 5 [template] +// CHECK:STDOUT: %.14: type = ptr_type %.1 [template] // CHECK:STDOUT: %AddressOfOperator.type: type = fn_type @AddressOfOperator [template] // CHECK:STDOUT: %AddressOfOperator: %AddressOfOperator.type = struct_value () [template] -// CHECK:STDOUT: %.17: bool = bool_literal false [template] +// CHECK:STDOUT: %.15: bool = bool_literal false [template] // CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [template] // CHECK:STDOUT: %AddressOfCall: %AddressOfCall.type = struct_value () [template] // CHECK:STDOUT: %AddressOfType.type: type = fn_type @AddressOfType [template] // CHECK:STDOUT: %AddressOfType: %AddressOfType.type = struct_value () [template] -// CHECK:STDOUT: %.18: type = ptr_type type [template] -// CHECK:STDOUT: %.19: type = const_type i32 [template] -// CHECK:STDOUT: %.20: type = ptr_type %.19 [template] +// CHECK:STDOUT: %.16: type = ptr_type type [template] +// CHECK:STDOUT: %.17: type = const_type i32 [template] +// CHECK:STDOUT: %.18: type = ptr_type %.17 [template] // CHECK:STDOUT: %AddressOfTupleElementValue.type: type = fn_type @AddressOfTupleElementValue [template] // CHECK:STDOUT: %AddressOfTupleElementValue: %AddressOfTupleElementValue.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.13 = tuple_value (%.11, %.12) [template] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.10, %.11) [template] // CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [template] // CHECK:STDOUT: %AddressOfParam: %AddressOfParam.type = struct_value () [template] // CHECK:STDOUT: } @@ -176,15 +176,15 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %return: ref i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_16.2: type = converted %int.make_type_32, %.loc13_16.1 [template = i32] -// CHECK:STDOUT: %.loc13_19: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc13_19: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AddressOfLiteral.decl: %AddressOfLiteral.type = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} {} // CHECK:STDOUT: %AddressOfOperator.decl: %AddressOfOperator.type = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} {} @@ -207,50 +207,50 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @H() -> %.2; +// CHECK:STDOUT: fn @H() -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfLiteral() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_4: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_3: %.4 = addr_of [template = ] -// CHECK:STDOUT: %.loc25_4: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc25_3: %.6 = addr_of [template = ] -// CHECK:STDOUT: %.loc30_4: f64 = float_literal 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc30_3: %.8 = addr_of [template = ] -// CHECK:STDOUT: %.loc35_4: String = string_literal "Hello" [template = constants.%.10] -// CHECK:STDOUT: %.loc35_3: %.9 = addr_of [template = ] -// CHECK:STDOUT: %.loc40_5: i32 = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc40_8: i32 = int_value 2 [template = constants.%.12] -// CHECK:STDOUT: %.loc40_9: %.13 = tuple_literal (%.loc40_5, %.loc40_8) -// CHECK:STDOUT: %.loc40_3: %.14 = addr_of [template = ] -// CHECK:STDOUT: %.loc45_10: i32 = int_value 5 [template = constants.%.15] -// CHECK:STDOUT: %.loc45_11: %.2 = struct_literal (%.loc45_10) -// CHECK:STDOUT: %.loc45_3: %.16 = addr_of [template = ] +// CHECK:STDOUT: %.loc20_4: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc20_3: %.3 = addr_of [template = ] +// CHECK:STDOUT: %.loc25_4: bool = bool_literal true [template = constants.%.4] +// CHECK:STDOUT: %.loc25_3: %.5 = addr_of [template = ] +// CHECK:STDOUT: %.loc30_4: f64 = float_literal 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc30_3: %.7 = addr_of [template = ] +// CHECK:STDOUT: %.loc35_4: String = string_literal "Hello" [template = constants.%.9] +// CHECK:STDOUT: %.loc35_3: %.8 = addr_of [template = ] +// CHECK:STDOUT: %.loc40_5: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc40_8: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc40_9: %tuple.type = tuple_literal (%.loc40_5, %.loc40_8) +// CHECK:STDOUT: %.loc40_3: %.12 = addr_of [template = ] +// CHECK:STDOUT: %.loc45_10: i32 = int_value 5 [template = constants.%.13] +// CHECK:STDOUT: %.loc45_11: %.1 = struct_literal (%.loc45_10) +// CHECK:STDOUT: %.loc45_3: %.14 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfOperator() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc53_5: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc53_10.1: bool = bool_literal false [template = constants.%.17] +// CHECK:STDOUT: %.loc53_5: bool = bool_literal true [template = constants.%.4] +// CHECK:STDOUT: %.loc53_10.1: bool = bool_literal false [template = constants.%.15] // CHECK:STDOUT: if %.loc53_5 br !and.rhs else br !and.result(%.loc53_10.1) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %.loc53_14: bool = bool_literal false [template = constants.%.17] +// CHECK:STDOUT: %.loc53_14: bool = bool_literal false [template = constants.%.15] // CHECK:STDOUT: br !and.result(%.loc53_14) // CHECK:STDOUT: // CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc53_10.2: bool = block_arg !and.result [template = constants.%.17] -// CHECK:STDOUT: %.loc53_3: %.6 = addr_of [template = ] +// CHECK:STDOUT: %.loc53_10.2: bool = block_arg !and.result [template = constants.%.15] +// CHECK:STDOUT: %.loc53_3: %.5 = addr_of [template = ] // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init %.2 = call %H.ref() -// CHECK:STDOUT: %.loc58_5.1: ref %.2 = temporary_storage -// CHECK:STDOUT: %.loc58_5.2: ref %.2 = temporary %.loc58_5.1, %H.call +// CHECK:STDOUT: %H.call: init %.1 = call %H.ref() +// CHECK:STDOUT: %.loc58_5.1: ref %.1 = temporary_storage +// CHECK:STDOUT: %.loc58_5.2: ref %.1 = temporary %.loc58_5.1, %H.call // CHECK:STDOUT: %.loc58_7: ref i32 = struct_access %.loc58_5.2, element0 -// CHECK:STDOUT: %.loc58_3: %.4 = addr_of [template = ] -// CHECK:STDOUT: %.loc63_9: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc63_5: bool = not %.loc63_9 [template = constants.%.17] -// CHECK:STDOUT: %.loc63_3: %.6 = addr_of [template = ] +// CHECK:STDOUT: %.loc58_3: %.3 = addr_of [template = ] +// CHECK:STDOUT: %.loc63_9: bool = bool_literal true [template = constants.%.4] +// CHECK:STDOUT: %.loc63_5: bool = not %.loc63_9 [template = constants.%.15] +// CHECK:STDOUT: %.loc63_3: %.5 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -258,33 +258,33 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init i32 = call %G.ref() -// CHECK:STDOUT: %.loc71: %.4 = addr_of [template = ] +// CHECK:STDOUT: %.loc71: %.3 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfType() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc79: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc79: %.18 = addr_of [template = ] +// CHECK:STDOUT: %.loc79: %.16 = addr_of [template = ] // CHECK:STDOUT: %int.make_type_32.loc84: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc84_5.1: type = value_of_initializer %int.make_type_32.loc84 [template = i32] // CHECK:STDOUT: %.loc84_5.2: type = converted %int.make_type_32.loc84, %.loc84_5.1 [template = i32] -// CHECK:STDOUT: %.loc84_5.3: type = const_type i32 [template = constants.%.19] -// CHECK:STDOUT: %.loc84_14: type = ptr_type %.19 [template = constants.%.20] -// CHECK:STDOUT: %.loc84_3: %.18 = addr_of [template = ] +// CHECK:STDOUT: %.loc84_5.3: type = const_type i32 [template = constants.%.17] +// CHECK:STDOUT: %.loc84_14: type = ptr_type %.17 [template = constants.%.18] +// CHECK:STDOUT: %.loc84_3: %.16 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfTupleElementValue() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc92_6: i32 = int_value 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc92_9: i32 = int_value 2 [template = constants.%.12] -// CHECK:STDOUT: %.loc92_10.1: %.13 = tuple_literal (%.loc92_6, %.loc92_9) -// CHECK:STDOUT: %.loc92_12: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %tuple: %.13 = tuple_value (%.loc92_6, %.loc92_9) [template = constants.%tuple] -// CHECK:STDOUT: %.loc92_10.2: %.13 = converted %.loc92_10.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %.loc92_11: i32 = tuple_access %.loc92_10.2, element0 [template = constants.%.11] -// CHECK:STDOUT: %.loc92_3: %.4 = addr_of [template = ] +// CHECK:STDOUT: %.loc92_6: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc92_9: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc92_10.1: %tuple.type = tuple_literal (%.loc92_6, %.loc92_9) +// CHECK:STDOUT: %.loc92_12: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc92_6, %.loc92_9) [template = constants.%tuple] +// CHECK:STDOUT: %.loc92_10.2: %tuple.type = converted %.loc92_10.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc92_11: i32 = tuple_access %.loc92_10.2, element0 [template = constants.%.10] +// CHECK:STDOUT: %.loc92_3: %.3 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -293,11 +293,11 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %int.make_type_32.loc99: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc99_22.1: type = value_of_initializer %int.make_type_32.loc99 [template = i32] // CHECK:STDOUT: %.loc99_22.2: type = converted %int.make_type_32.loc99, %.loc99_22.1 [template = i32] -// CHECK:STDOUT: %.loc99_22.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %param_addr.var: ref %.4 = var param_addr -// CHECK:STDOUT: %param_addr: ref %.4 = bind_name param_addr, %param_addr.var +// CHECK:STDOUT: %.loc99_22.3: type = ptr_type i32 [template = constants.%.3] +// CHECK:STDOUT: %param_addr.var: ref %.3 = var param_addr +// CHECK:STDOUT: %param_addr: ref %.3 = bind_name param_addr, %param_addr.var // CHECK:STDOUT: %param.ref: i32 = name_ref param, %param -// CHECK:STDOUT: %.loc99_26: %.4 = addr_of [template = ] +// CHECK:STDOUT: %.loc99_26: %.3 = addr_of [template = ] // CHECK:STDOUT: assign %param_addr.var, %.loc99_26 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_error.carbon b/toolchain/check/testdata/pointer/fail_deref_error.carbon index 32c350bc282c..76f40516cfe9 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -22,7 +22,7 @@ let n2: i32 = undeclared->foo; // 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: diff --git a/toolchain/check/testdata/pointer/fail_deref_function.carbon b/toolchain/check/testdata/pointer/fail_deref_function.carbon index 5217fe1ac03a..918940716272 100644 --- a/toolchain/check/testdata/pointer/fail_deref_function.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_function.carbon @@ -24,7 +24,7 @@ fn A() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon index 25a92df4bf60..a59346b87e79 100644 --- a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon @@ -26,7 +26,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 6b39fb08610d..0913fd1236cd 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -44,13 +44,13 @@ fn Deref(n: 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: %Deref.type: type = fn_type @Deref [template] // CHECK:STDOUT: %Deref: %Deref.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %struct: %.2 = struct_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,21 +88,21 @@ fn Deref(n: i32) { // CHECK:STDOUT: %.loc16: ref = deref %n.ref.loc16 // CHECK:STDOUT: %n.ref.loc21: i32 = name_ref n, %n // CHECK:STDOUT: %.loc21: ref = deref %n.ref.loc21 -// CHECK:STDOUT: %.loc26_5.1: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple.loc26: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc26_5.2: %.1 = converted %.loc26_5.1, %tuple.loc26 [template = constants.%tuple] +// CHECK:STDOUT: %.loc26_5.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple.loc26: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_5.2: %empty_tuple.type = converted %.loc26_5.1, %empty_tuple.loc26 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc26_3: ref = deref %.loc26_5.2 -// CHECK:STDOUT: %.loc31_4.1: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple.loc31: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc31_4.2: %.1 = converted %.loc31_4.1, %tuple.loc31 [template = constants.%tuple] +// CHECK:STDOUT: %.loc31_4.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple.loc31: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc31_4.2: %empty_tuple.type = converted %.loc31_4.1, %empty_tuple.loc31 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc31_5: ref = deref %.loc31_4.2 -// CHECK:STDOUT: %.loc36_5.1: %.2 = struct_literal () -// CHECK:STDOUT: %struct.loc36: %.2 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc36_5.2: %.2 = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct] +// CHECK:STDOUT: %.loc36_5.1: %.1 = struct_literal () +// CHECK:STDOUT: %struct.loc36: %.1 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc36_5.2: %.1 = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct] // CHECK:STDOUT: %.loc36_3: ref = deref %.loc36_5.2 -// CHECK:STDOUT: %.loc40_4.1: %.2 = struct_literal () -// CHECK:STDOUT: %struct.loc40: %.2 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc40_4.2: %.2 = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct] +// CHECK:STDOUT: %.loc40_4.1: %.1 = struct_literal () +// CHECK:STDOUT: %struct.loc40: %.1 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc40_4.2: %.1 = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct] // CHECK:STDOUT: %.loc40_5: ref = deref %.loc40_4.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_type.carbon b/toolchain/check/testdata/pointer/fail_deref_type.carbon index 908b9cdd95e8..04adf599b710 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -25,7 +25,7 @@ var p2: i32->foo; // 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: diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index 54c1d85f2fc7..ac4c2ac80369 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -27,7 +27,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %.5: type = const_type %.4 [template] // CHECK:STDOUT: %ConstMismatch.type: type = fn_type @ConstMismatch [template] -// CHECK:STDOUT: %.6: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ConstMismatch: %ConstMismatch.type = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] @@ -38,14 +38,14 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // 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: %.7: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.5) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.11: %.7 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -56,7 +56,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // 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 (%.7) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.11)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] // 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 @@ -98,8 +98,8 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // 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.%.7)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.7) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.8)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -154,7 +154,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.9 -// CHECK:STDOUT: %.2 => constants.%.10 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index cba9148268c3..c7e2e8cf30b8 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -25,10 +25,10 @@ var a: i32* = a_ref; // 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 0 [template] -// CHECK:STDOUT: %.3: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,19 +55,19 @@ var a: i32* = a_ref; // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5, %.loc5_15.1 [template = i32] -// CHECK:STDOUT: %.loc5_15.3: type = ptr_type i32 [template = constants.%.3] -// CHECK:STDOUT: %a_ref.var: ref %.3 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.3 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %.loc5_15.3: type = ptr_type i32 [template = constants.%.2] +// CHECK:STDOUT: %a_ref.var: ref %.2 = var a_ref +// CHECK:STDOUT: %a_ref: ref %.2 = bind_name a_ref, %a_ref.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: %.loc4: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc4: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign file.%a_orig.var, %.loc4 // CHECK:STDOUT: %a_orig.ref: ref i32 = name_ref a_orig, file.%a_orig -// CHECK:STDOUT: %.loc5: %.3 = addr_of %a_orig.ref +// CHECK:STDOUT: %.loc5: %.2 = addr_of %a_orig.ref // CHECK:STDOUT: assign file.%a_ref.var, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -76,14 +76,14 @@ var a: i32* = a_ref; // 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 = ptr_type i32 [template] +// CHECK:STDOUT: %.1: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+15, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref Implicit//default, inst+25, loaded +// CHECK:STDOUT: %import_ref.2: ref %.1 = import_ref Implicit//default, inst+25, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.3 // CHECK:STDOUT: import Core//prelude @@ -105,17 +105,17 @@ var a: i32* = a_ref; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %.loc4_11.3: type = ptr_type i32 [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref %.2 = var a -// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var +// CHECK:STDOUT: %.loc4_11.3: type = ptr_type i32 [template = constants.%.1] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = 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: %a_ref.ref: ref %.2 = name_ref a_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc4: %.2 = bind_value %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %.1 = name_ref a_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc4: %.1 = bind_value %a_ref.ref // CHECK:STDOUT: assign file.%a.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index d8f93fcc7df1..432e5a2d9fc3 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -17,13 +17,13 @@ fn F(p: const (const (const i32*)*)) -> const 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: type = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: type = const_type %.3 [template] -// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.6: type = const_type %.5 [template] +// CHECK:STDOUT: %.1: type = const_type i32 [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: type = const_type %.2 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: type = const_type %.4 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -44,39 +44,39 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %p.patt: %.6 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.6 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.5 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.5 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc12_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_32.loc12_29 [template = i32] // CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_32.loc12_29, %.loc12_23.1 [template = i32] -// CHECK:STDOUT: %.loc12_23.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_32: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_16: type = const_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_34: type = ptr_type %.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_9: type = const_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_23.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_32: type = ptr_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_16: type = const_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_34: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_9: type = const_type %.4 [template = constants.%.5] // CHECK:STDOUT: %int.make_type_32.loc12_47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_41.1: type = value_of_initializer %int.make_type_32.loc12_47 [template = i32] // CHECK:STDOUT: %.loc12_41.2: type = converted %int.make_type_32.loc12_47, %.loc12_41.1 [template = i32] -// CHECK:STDOUT: %.loc12_41.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: %p.param: %.6 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.6 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc12_41.3: type = const_type i32 [template = constants.%.1] +// CHECK:STDOUT: %p.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.5 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p.param_patt: %.6) -> %.2 { +// CHECK:STDOUT: fn @F(%p.param_patt: %.5) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.6 = name_ref p, %p -// CHECK:STDOUT: %.loc13_11.1: ref %.4 = deref %p.ref -// CHECK:STDOUT: %.loc13_11.2: %.4 = bind_value %.loc13_11.1 -// CHECK:STDOUT: %.loc13_10.1: ref %.2 = deref %.loc13_11.2 -// CHECK:STDOUT: %.loc13_10.2: %.2 = bind_value %.loc13_10.1 +// CHECK:STDOUT: %p.ref: %.5 = name_ref p, %p +// CHECK:STDOUT: %.loc13_11.1: ref %.3 = deref %p.ref +// CHECK:STDOUT: %.loc13_11.2: %.3 = bind_value %.loc13_11.1 +// CHECK:STDOUT: %.loc13_10.1: ref %.1 = deref %.loc13_11.2 +// CHECK:STDOUT: %.loc13_10.2: %.1 = bind_value %.loc13_10.1 // CHECK:STDOUT: return %.loc13_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index 326aa0aeffbb..628e35f6e997 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -20,13 +20,13 @@ fn ConstPtr(p: const i32*) -> (const 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: type = ptr_type i32 [template] +// CHECK:STDOUT: %.1: type = ptr_type i32 [template] // CHECK:STDOUT: %Ptr.type: type = fn_type @Ptr [template] // CHECK:STDOUT: %Ptr: %Ptr.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = const_type i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.2: type = const_type i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %ConstPtr.type: type = fn_type @ConstPtr [template] // CHECK:STDOUT: %ConstPtr: %ConstPtr.type = struct_value () [template] // CHECK:STDOUT: } @@ -48,58 +48,58 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Ptr.decl: %Ptr.type = fn_decl @Ptr [template = constants.%Ptr] { -// CHECK:STDOUT: %p.patt: %.2 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.2 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.1 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.1 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_11, %.loc11_14.1 [template = i32] -// CHECK:STDOUT: %.loc11_14.3: type = ptr_type i32 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_14.3: type = ptr_type i32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32.loc11_20 [template = i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_32.loc11_20, %.loc11_23.1 [template = i32] -// CHECK:STDOUT: %.loc11_23.3: type = ptr_type i32 [template = constants.%.2] -// CHECK:STDOUT: %p.param: %.2 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.2 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc11_23.3: type = ptr_type i32 [template = constants.%.1] +// CHECK:STDOUT: %p.param: %.1 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.1 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConstPtr.decl: %ConstPtr.type = fn_decl @ConstPtr [template = constants.%ConstPtr] { -// CHECK:STDOUT: %p.patt: %.4 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.4 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.3 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.3 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32] // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_32.loc15_22, %.loc15_16.1 [template = i32] -// CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_25: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_25: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_32.loc15_38 [template = i32] // CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_32.loc15_38, %.loc15_32.1 [template = i32] -// CHECK:STDOUT: %.loc15_32.3: type = const_type i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_42: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.4 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc15_32.3: type = const_type i32 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_42: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %p.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.3 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Ptr(%p.param_patt: %.2) -> %.2 { +// CHECK:STDOUT: fn @Ptr(%p.param_patt: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %.3) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/code_after_return.carbon b/toolchain/check/testdata/return/code_after_return.carbon index 19794627b9f7..b90389a6db7b 100644 --- a/toolchain/check/testdata/return/code_after_return.carbon +++ b/toolchain/check/testdata/return/code_after_return.carbon @@ -17,11 +17,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.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 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 121458cfc885..81729554c335 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -24,17 +24,17 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] -// CHECK:STDOUT: %.5: bool = bool_literal false [template] -// CHECK:STDOUT: %.6: bool = bool_literal true [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: bool = bool_literal false [template] +// CHECK:STDOUT: %.5: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,7 +79,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index deee18c9dee5..c64d28db5d9f 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -20,13 +20,13 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ReturnType.type: type = fn_type @ReturnType [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %ReturnType: %ReturnType.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 6 [template] +// CHECK:STDOUT: %.1: i32 = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,7 +77,7 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_35: i32 = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %.loc17_35: i32 = int_value 6 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_error_in_type.carbon b/toolchain/check/testdata/return/fail_error_in_type.carbon index 388cef4b5b2f..04b854842283 100644 --- a/toolchain/check/testdata/return/fail_error_in_type.carbon +++ b/toolchain/check/testdata/return/fail_error_in_type.carbon @@ -17,7 +17,7 @@ fn Six() -> x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index 169dab853cf3..ceace3a7a14d 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -42,11 +42,11 @@ fn FirstPerfectNumber() -> z { return 6; } // 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: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 6 [template] +// CHECK:STDOUT: %.1: i32 = int_value 6 [template] // CHECK:STDOUT: %HalfDozen.type: type = fn_type @HalfDozen [template] // CHECK:STDOUT: %HalfDozen: %HalfDozen.type = struct_value () [template] // CHECK:STDOUT: } @@ -57,13 +57,13 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16: i32 = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %.loc16: i32 = int_value 6 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @HalfDozen() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc28: i32 = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %.loc28: i32 = int_value 6 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index 5db4b52da841..b4864dc5d1b9 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -18,7 +18,7 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] diff --git a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon index 6502563c7757..2bd80879d317 100644 --- a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon +++ b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon @@ -17,7 +17,7 @@ fn F() -> () { // CHECK:STDOUT: --- fail_missing_return_empty_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -36,17 +36,17 @@ fn F() -> () { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc11_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %.1 { +// CHECK:STDOUT: fn @F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon index ca7b4e2041ee..bfadbd1851e6 100644 --- a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon @@ -19,7 +19,7 @@ fn Procedure() -> 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: %Procedure.type: type = fn_type @Procedure [template] // CHECK:STDOUT: %Procedure: %Procedure.type = struct_value () [template] diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index 6f3bc7cff77b..6f90b2da4496 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -36,21 +36,21 @@ fn G() -> C { // 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.4: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.8: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.3, %.8) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.2, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -95,12 +95,12 @@ fn G() -> C { // CHECK:STDOUT: %int.make_type_32.loc23_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_18.1: type = value_of_initializer %int.make_type_32.loc23_18 [template = i32] // CHECK:STDOUT: %.loc23_18.2: type = converted %int.make_type_32.loc23_18, %.loc23_18.1 [template = i32] -// CHECK:STDOUT: %.loc23_16: %.4 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc23_16: %.3 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc23_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_30.1: type = value_of_initializer %int.make_type_32.loc23_30 [template = i32] // CHECK:STDOUT: %.loc23_30.2: type = converted %int.make_type_32.loc23_30, %.loc23_30.1 [template = i32] -// CHECK:STDOUT: %.loc23_28: %.4 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc23_35: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc23_28: %.3 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc23_35: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -117,9 +117,9 @@ fn G() -> C { // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12, %.loc12_19.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc12_25: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_25: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign %v.var, %.loc12_25 -// CHECK:STDOUT: %.loc20: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc20: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -127,13 +127,13 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %return -// CHECK:STDOUT: %.loc25_29: i32 = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc25_37: i32 = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc25_38.1: %.5 = struct_literal (%.loc25_29, %.loc25_37) +// CHECK:STDOUT: %.loc25_29: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc25_37: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc25_38.1: %.4 = struct_literal (%.loc25_29, %.loc25_37) // CHECK:STDOUT: %.loc25_38.2: ref i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc25_38.3: init i32 = initialize_from %.loc25_29 to %.loc25_38.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc25_38.3: init i32 = initialize_from %.loc25_29 to %.loc25_38.2 [template = constants.%.2] // CHECK:STDOUT: %.loc25_38.4: ref i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc25_38.5: init i32 = initialize_from %.loc25_37 to %.loc25_38.4 [template = constants.%.8] +// CHECK:STDOUT: %.loc25_38.5: init i32 = initialize_from %.loc25_37 to %.loc25_38.4 [template = constants.%.7] // CHECK:STDOUT: %.loc25_38.6: init %C = class_init (%.loc25_38.3, %.loc25_38.5), %return [template = constants.%struct] // CHECK:STDOUT: %.loc25_39: init %C = converted %.loc25_38.1, %.loc25_38.6 [template = constants.%struct] // CHECK:STDOUT: assign %return, %.loc25_39 diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index a15a39444842..97a3ad381497 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -23,7 +23,7 @@ fn Procedure() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Procedure: %Procedure.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -45,10 +45,10 @@ fn Procedure() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Procedure() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_20.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc18_20.2: type = converted %.loc18_20.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %v: %.1 = bind_name v, -// CHECK:STDOUT: %.loc18_25: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc18_20.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc18_20.2: type = converted %.loc18_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %v: %empty_tuple.type = bind_name v, +// CHECK:STDOUT: %.loc18_25: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: assign , // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index 0dbdaac0df2c..7eb63506f085 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -43,13 +43,13 @@ fn DifferentScopes() -> 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: %SameScope.type: type = fn_type @SameScope [template] // CHECK:STDOUT: %SameScope: %SameScope.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] // CHECK:STDOUT: %DifferentScopes: %DifferentScopes.type = struct_value () [template] // CHECK:STDOUT: } @@ -96,7 +96,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @SameScope() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc12: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc12 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: @@ -105,25 +105,25 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_32.loc13, %.loc13_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc13_27: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_27: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: assign %v.var, %.loc13_27 // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_32.loc21, %.loc21_21.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w // CHECK:STDOUT: %w: ref i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc21_27: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc21_27: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: assign %w.var, %.loc21_27 // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc23: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc23: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: return %.loc23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DifferentScopes() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc27: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc27: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc27 br !if.then.loc27 else br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc27: @@ -132,9 +132,9 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %.loc28_21.2: type = converted %int.make_type_32.loc28, %.loc28_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc28_27: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc28_27: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: assign %v.var, %.loc28_27 -// CHECK:STDOUT: %.loc29: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc29: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc29 br !if.then.loc29 else br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc29: @@ -143,7 +143,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %.loc36_23.2: type = converted %int.make_type_32.loc36, %.loc36_23.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w // CHECK:STDOUT: %w: ref i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc36_29: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc36_29: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: assign %w.var, %.loc36_29 // CHECK:STDOUT: br !if.else.loc29 // CHECK:STDOUT: @@ -151,7 +151,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: -// CHECK:STDOUT: %.loc39: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc39: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: return %.loc39 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index d3ca28532aab..43e68e34b4b8 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -23,14 +23,14 @@ fn Mismatch() -> 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: %Mismatch.type: type = fn_type @Mismatch [template] // CHECK:STDOUT: %Mismatch: %Mismatch.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: 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: %.3: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.2: f64 = float_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,12 +66,12 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Mismatch() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc18_19.1) [template = f64] // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc18_19.3: type = converted %float.make_type, %.loc18_19.2 [template = f64] // CHECK:STDOUT: %v: f64 = bind_name v, -// CHECK:STDOUT: %.loc18_25: f64 = float_literal 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc18_25: f64 = float_literal 0 [template = constants.%.2] // CHECK:STDOUT: assign , // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 0e2c7289a209..0ba91b974592 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -22,11 +22,11 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.1: f64 = float_literal 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] @@ -36,14 +36,14 @@ fn Main() -> i32 { // 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(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: %.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 { @@ -56,7 +56,7 @@ fn Main() -> i32 { // 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 @@ -89,8 +89,8 @@ fn Main() -> i32 { // 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: @@ -104,7 +104,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_10: f64 = float_literal 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_10: f64 = float_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc18_13: i32 = converted %.loc18_10, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -147,7 +147,7 @@ fn Main() -> i32 { // 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: diff --git a/toolchain/check/testdata/return/fail_value_disallowed.carbon b/toolchain/check/testdata/return/fail_value_disallowed.carbon index 7d82f8fec4b3..29f0998a6fb6 100644 --- a/toolchain/check/testdata/return/fail_value_disallowed.carbon +++ b/toolchain/check/testdata/return/fail_value_disallowed.carbon @@ -22,9 +22,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,7 +45,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc18: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index 91fb5cd16ee5..9b0a3df55b74 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -22,7 +22,7 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index 4aae23029e06..2a7def05e686 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -18,11 +18,11 @@ fn Six() -> x { return 6; } // 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: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 6 [template] +// CHECK:STDOUT: %.1: i32 = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -58,7 +58,7 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_24: i32 = int_value 6 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_24: i32 = int_value 6 [template = constants.%.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/missing_return_no_return_type.carbon b/toolchain/check/testdata/return/missing_return_no_return_type.carbon index 9483fe8ac746..63d68773fc52 100644 --- a/toolchain/check/testdata/return/missing_return_no_return_type.carbon +++ b/toolchain/check/testdata/return/missing_return_no_return_type.carbon @@ -15,7 +15,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon index 0cd6f599dcb4..35da0864f06d 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -61,7 +61,7 @@ fn F0(n: i32) -> P.D { // 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: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] @@ -71,8 +71,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert: %Convert.type = struct_value () [symbolic] -// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type [symbolic] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type [symbolic] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,8 +105,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%T.loc7_22.2) [symbolic = %Convert.type (constants.%Convert.type)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type) = struct_value () [symbolic = %Convert (constants.%Convert)] -// CHECK:STDOUT: %.loc8_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type) [symbolic = %.loc8_32.2 (constants.%.2)] -// CHECK:STDOUT: %.loc8_32.3: @ImplicitAs.%.loc8_32.2 (%.2) = assoc_entity element0, %Convert.decl [symbolic = %.loc8_32.3 (constants.%.3)] +// CHECK:STDOUT: %.loc8_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type) [symbolic = %.loc8_32.2 (constants.%.1)] +// CHECK:STDOUT: %.loc8_32.3: @ImplicitAs.%.loc8_32.2 (%.1) = assoc_entity element0, %Convert.decl [symbolic = %.loc8_32.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -126,7 +126,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref @Convert.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_32.1: @ImplicitAs.%.loc8_32.2 (%.2) = assoc_entity element0, %Convert.decl [symbolic = %.loc8_32.3 (constants.%.3)] +// CHECK:STDOUT: %.loc8_32.1: @ImplicitAs.%.loc8_32.2 (%.1) = assoc_entity element0, %Convert.decl [symbolic = %.loc8_32.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -170,25 +170,25 @@ fn F0(n: i32) -> P.D { // 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: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%N) [symbolic] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = unbound_element_type %D, i32 [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: i32, .m: i32} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %D, i32 [template] +// CHECK:STDOUT: %.4: type = struct_type {.n: i32, .m: i32} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %struct: %D = struct_value (%.8, %.8) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.8) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %struct: %D = struct_value (%.7, %.7) [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.7) [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -198,52 +198,52 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [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: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.2) [template] -// CHECK:STDOUT: %.14: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.15: i32 = int_value 1 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.15) [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.12: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.13: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.14: i32 = int_value 1 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.14) [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.17: i32 = int_value 2 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.17) [template] +// CHECK:STDOUT: %.15: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.16: i32 = int_value 2 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.16) [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.18: = interface_witness (%Convert.5) [template] -// CHECK:STDOUT: %.19: i32 = int_value 3 [template] -// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.19) [template] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.5) [template] +// CHECK:STDOUT: %.18: i32 = int_value 3 [template] +// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.18) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.21: i32 = int_value 4 [template] -// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.21) [template] +// CHECK:STDOUT: %.19: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %.20: i32 = int_value 4 [template] +// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.20) [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.23: i32 = int_value 5 [template] -// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.23) [template] +// CHECK:STDOUT: %.21: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %.22: i32 = int_value 5 [template] +// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.22) [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.25: i32 = int_value 6 [template] -// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.25) [template] +// CHECK:STDOUT: %.23: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %.24: i32 = int_value 6 [template] +// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.24) [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %.27: i32 = int_value 7 [template] -// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.27) [template] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %.26: i32 = int_value 7 [template] +// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.26) [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.10) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -289,8 +289,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_8: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.8) [template = constants.%C.3] +// CHECK:STDOUT: %.loc10_8: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.7) [template = constants.%C.3] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -298,8 +298,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_8: i32 = int_value 1 [template = constants.%.15] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.15) [template = constants.%C.4] +// CHECK:STDOUT: %.loc11_8: i32 = int_value 1 [template = constants.%.14] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.14) [template = constants.%C.4] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -307,8 +307,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_8: i32 = int_value 2 [template = constants.%.17] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.17) [template = constants.%C.5] +// CHECK:STDOUT: %.loc12_8: i32 = int_value 2 [template = constants.%.16] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.16) [template = constants.%C.5] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -316,8 +316,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_8: i32 = int_value 3 [template = constants.%.19] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.19) [template = constants.%C.6] +// CHECK:STDOUT: %.loc13_8: i32 = int_value 3 [template = constants.%.18] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.18) [template = constants.%C.6] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -325,8 +325,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_8: i32 = int_value 4 [template = constants.%.21] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.21) [template = constants.%C.7] +// CHECK:STDOUT: %.loc14_8: i32 = int_value 4 [template = constants.%.20] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.20) [template = constants.%C.7] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -334,8 +334,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.6 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc15_8: i32 = int_value 5 [template = constants.%.23] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.23) [template = constants.%C.8] +// CHECK:STDOUT: %.loc15_8: i32 = int_value 5 [template = constants.%.22] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.22) [template = constants.%C.8] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -343,8 +343,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.7 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc16_8: i32 = int_value 6 [template = constants.%.25] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.25) [template = constants.%C.9] +// CHECK:STDOUT: %.loc16_8: i32 = int_value 6 [template = constants.%.24] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.24) [template = constants.%C.9] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -352,8 +352,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.8 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc17_8: i32 = int_value 7 [template = constants.%.27] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.27) [template = constants.%C.10] +// CHECK:STDOUT: %.loc17_8: i32 = int_value 7 [template = constants.%.26] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.26) [template = constants.%C.10] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -370,8 +370,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T) [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.%.9)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -395,7 +395,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_33: = interface_witness (%Convert.decl) [template = constants.%.13] +// CHECK:STDOUT: %.loc10_33: = interface_witness (%Convert.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -416,7 +416,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_33: = interface_witness (%Convert.decl) [template = constants.%.16] +// CHECK:STDOUT: %.loc11_33: = interface_witness (%Convert.decl) [template = constants.%.15] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -437,7 +437,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_33: = interface_witness (%Convert.decl) [template = constants.%.18] +// CHECK:STDOUT: %.loc12_33: = interface_witness (%Convert.decl) [template = constants.%.17] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -458,7 +458,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_33: = interface_witness (%Convert.decl) [template = constants.%.20] +// CHECK:STDOUT: %.loc13_33: = interface_witness (%Convert.decl) [template = constants.%.19] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -479,7 +479,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_33: = interface_witness (%Convert.decl) [template = constants.%.22] +// CHECK:STDOUT: %.loc14_33: = interface_witness (%Convert.decl) [template = constants.%.21] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -500,7 +500,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_33: = interface_witness (%Convert.decl) [template = constants.%.24] +// CHECK:STDOUT: %.loc15_33: = interface_witness (%Convert.decl) [template = constants.%.23] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -521,7 +521,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_33: = interface_witness (%Convert.decl) [template = constants.%.26] +// CHECK:STDOUT: %.loc16_33: = interface_witness (%Convert.decl) [template = constants.%.25] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -542,7 +542,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17_33: = interface_witness (%Convert.decl) [template = constants.%.28] +// CHECK:STDOUT: %.loc17_33: = interface_witness (%Convert.decl) [template = constants.%.27] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -556,7 +556,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc6_19: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc6_19: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -567,12 +567,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int.make_type_32.loc7_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_32.loc7_18 [template = i32] // CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_32.loc7_18, %.loc7_18.1 [template = i32] -// CHECK:STDOUT: %.loc7_16: %.4 = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc7_16: %.3 = field_decl n, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc7_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_32.loc7_30 [template = i32] // CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_32.loc7_30, %.loc7_30.1 [template = i32] -// CHECK:STDOUT: %.loc7_28: %.4 = field_decl m, element1 [template] -// CHECK:STDOUT: %.loc7_35: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc7_28: %.3 = field_decl m, element1 [template] +// CHECK:STDOUT: %.loc7_35: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -584,13 +584,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_31: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_39: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_40.1: %.5 = struct_literal (%.loc8_31, %.loc8_39) +// CHECK:STDOUT: %.loc8_31: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc8_39: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc8_40.1: %.4 = struct_literal (%.loc8_31, %.loc8_39) // CHECK:STDOUT: %.loc8_40.2: ref i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc8_40.3: init i32 = initialize_from %.loc8_31 to %.loc8_40.2 [template = constants.%.8] +// CHECK:STDOUT: %.loc8_40.3: init i32 = initialize_from %.loc8_31 to %.loc8_40.2 [template = constants.%.7] // CHECK:STDOUT: %.loc8_40.4: ref i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc8_40.5: init i32 = initialize_from %.loc8_39 to %.loc8_40.4 [template = constants.%.8] +// CHECK:STDOUT: %.loc8_40.5: init i32 = initialize_from %.loc8_39 to %.loc8_40.4 [template = constants.%.7] // CHECK:STDOUT: %.loc8_40.6: init %D = class_init (%.loc8_40.3, %.loc8_40.5), %return [template = constants.%struct] // CHECK:STDOUT: %.loc8_41: init %D = converted %.loc8_40.1, %.loc8_40.6 [template = constants.%struct] // CHECK:STDOUT: return %.loc8_41 to %return @@ -673,9 +673,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.8) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.8 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.8 +// CHECK:STDOUT: specific @C(constants.%.7) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.7 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -710,8 +710,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.10 +// CHECK:STDOUT: %.2 => constants.%.11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.3) { @@ -720,9 +720,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.15) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.15 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.15 +// CHECK:STDOUT: specific @C(constants.%.14) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.14 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.14 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -733,9 +733,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.17) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.17 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.17 +// CHECK:STDOUT: specific @C(constants.%.16) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.16 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.16 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -746,9 +746,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.19) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.19 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.19 +// CHECK:STDOUT: specific @C(constants.%.18) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.18 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.18 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -759,9 +759,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.21) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.21 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.21 +// CHECK:STDOUT: specific @C(constants.%.20) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.20 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.20 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -772,9 +772,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.23) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.23 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.23 +// CHECK:STDOUT: specific @C(constants.%.22) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.22 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.22 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -785,9 +785,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.25) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.25 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.25 +// CHECK:STDOUT: specific @C(constants.%.24) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.24 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.24 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -798,9 +798,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%C.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.27) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.27 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.27 +// CHECK:STDOUT: specific @C(constants.%.26) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.26 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.26 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -815,25 +815,25 @@ fn F0(n: i32) -> P.D { // 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: %D: type = class_type @D [template] -// CHECK:STDOUT: %.2: type = struct_type {.n: i32, .m: i32} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {.n: i32, .m: i32} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F0.type: type = fn_type @F0 [template] // CHECK:STDOUT: %F0: %F0.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: bool = bool_literal false [template] -// CHECK:STDOUT: %.6: type = struct_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: bool = bool_literal false [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%N) [symbolic] // CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.8) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.7) [template] +// CHECK:STDOUT: %.8: type = ptr_type %.5 [template] // CHECK:STDOUT: %struct.1: %C.3 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] @@ -844,59 +844,59 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.12 [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.12 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.13 [symbolic] -// CHECK:STDOUT: %.15: i32 = int_value 1 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.15) [template] -// CHECK:STDOUT: %.16: i32 = int_value 2 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.16) [template] -// CHECK:STDOUT: %.17: i32 = int_value 3 [template] -// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.17) [template] -// CHECK:STDOUT: %.18: i32 = int_value 4 [template] -// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.18) [template] -// CHECK:STDOUT: %.19: i32 = int_value 5 [template] -// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.19) [template] -// CHECK:STDOUT: %.20: i32 = int_value 6 [template] -// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.20) [template] -// CHECK:STDOUT: %.21: i32 = int_value 7 [template] -// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.21) [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.12 [template] +// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.14: i32 = int_value 1 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.14) [template] +// CHECK:STDOUT: %.15: i32 = int_value 2 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.15) [template] +// CHECK:STDOUT: %.16: i32 = int_value 3 [template] +// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.16) [template] +// CHECK:STDOUT: %.17: i32 = int_value 4 [template] +// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.17) [template] +// CHECK:STDOUT: %.18: i32 = int_value 5 [template] +// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.18) [template] +// CHECK:STDOUT: %.19: i32 = int_value 6 [template] +// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.19) [template] +// CHECK:STDOUT: %.20: i32 = int_value 7 [template] +// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.20) [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %.21: = interface_witness (%Convert.3) [template] // CHECK:STDOUT: %struct.2: %C.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.22: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %struct.3: %C.5 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.5) [template] +// CHECK:STDOUT: %.23: = interface_witness (%Convert.5) [template] // CHECK:STDOUT: %struct.4: %C.6 = struct_value () [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %.24: = interface_witness (%Convert.6) [template] // CHECK:STDOUT: %struct.5: %C.7 = struct_value () [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.7) [template] // CHECK:STDOUT: %struct.6: %C.8 = struct_value () [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.8) [template] // CHECK:STDOUT: %struct.7: %C.9 = struct_value () [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.9) [template] // CHECK:STDOUT: %struct.8: %C.10 = struct_value () [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.10) [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: } @@ -922,34 +922,34 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %import_ref.7 = import_ref P//library, inst+25, unloaded // CHECK:STDOUT: %import_ref.8: %ImplicitAs.type.1 = import_ref Core//default, inst+15, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.9 = import_ref Core//default, inst+21, unloaded -// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.10) = import_ref Core//default, inst+43, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] +// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.9) = import_ref Core//default, inst+43, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] // CHECK:STDOUT: %import_ref.11 = import_ref Core//default, inst+36, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Core//default, inst+36, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Core//default, inst+36, unloaded // CHECK:STDOUT: %import_ref.14: type = import_ref P//library, inst+66, loaded [template = constants.%C.3] // CHECK:STDOUT: %import_ref.15: type = import_ref P//library, inst+111, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.16: = import_ref P//library, inst+131, loaded [template = constants.%.22] +// CHECK:STDOUT: %import_ref.16: = import_ref P//library, inst+131, loaded [template = constants.%.21] // CHECK:STDOUT: %import_ref.17: type = import_ref P//library, inst+141, loaded [template = constants.%C.4] // CHECK:STDOUT: %import_ref.18: type = import_ref P//library, inst+146, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.19: = import_ref P//library, inst+161, loaded [template = constants.%.23] +// CHECK:STDOUT: %import_ref.19: = import_ref P//library, inst+161, loaded [template = constants.%.22] // CHECK:STDOUT: %import_ref.20: type = import_ref P//library, inst+170, loaded [template = constants.%C.5] // CHECK:STDOUT: %import_ref.21: type = import_ref P//library, inst+175, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.22: = import_ref P//library, inst+190, loaded [template = constants.%.24] +// CHECK:STDOUT: %import_ref.22: = import_ref P//library, inst+190, loaded [template = constants.%.23] // CHECK:STDOUT: %import_ref.23: type = import_ref P//library, inst+199, loaded [template = constants.%C.6] // CHECK:STDOUT: %import_ref.24: type = import_ref P//library, inst+204, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.25: = import_ref P//library, inst+219, loaded [template = constants.%.25] +// CHECK:STDOUT: %import_ref.25: = import_ref P//library, inst+219, loaded [template = constants.%.24] // CHECK:STDOUT: %import_ref.26: type = import_ref P//library, inst+228, loaded [template = constants.%C.7] // CHECK:STDOUT: %import_ref.27: type = import_ref P//library, inst+233, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.28: = import_ref P//library, inst+248, loaded [template = constants.%.26] +// CHECK:STDOUT: %import_ref.28: = import_ref P//library, inst+248, loaded [template = constants.%.25] // CHECK:STDOUT: %import_ref.29: type = import_ref P//library, inst+257, loaded [template = constants.%C.8] // CHECK:STDOUT: %import_ref.30: type = import_ref P//library, inst+262, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.31: = import_ref P//library, inst+277, loaded [template = constants.%.27] +// CHECK:STDOUT: %import_ref.31: = import_ref P//library, inst+277, loaded [template = constants.%.26] // CHECK:STDOUT: %import_ref.32: type = import_ref P//library, inst+286, loaded [template = constants.%C.9] // CHECK:STDOUT: %import_ref.33: type = import_ref P//library, inst+291, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.34: = import_ref P//library, inst+306, loaded [template = constants.%.28] +// CHECK:STDOUT: %import_ref.34: = import_ref P//library, inst+306, loaded [template = constants.%.27] // CHECK:STDOUT: %import_ref.35: type = import_ref P//library, inst+315, loaded [template = constants.%C.10] // CHECK:STDOUT: %import_ref.36: type = import_ref P//library, inst+320, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.37: = import_ref P//library, inst+335, loaded [template = constants.%.29] +// CHECK:STDOUT: %import_ref.37: = import_ref P//library, inst+335, loaded [template = constants.%.28] // CHECK:STDOUT: %import_ref.38: %Make.type = import_ref P//library, inst+48, loaded [template = constants.%Make] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -988,8 +988,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T) [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.%.10)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.11)] +// 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.12 [symbolic = %.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1062,20 +1062,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @F0(%n.param_patt: i32) -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc8_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc8_7 br !if.then.loc8 else br !if.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc8: -// CHECK:STDOUT: %.loc8_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc8_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc8: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc8_33: i32 = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%.8) [template = constants.%C.3] +// CHECK:STDOUT: %.loc8_33: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%.7) [template = constants.%C.3] // CHECK:STDOUT: %.loc8_24.2: ref %C.3 = temporary_storage // CHECK:STDOUT: %.loc8_24.3: init %C.3 = class_init (), %.loc8_24.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc8_24.4: ref %C.3 = temporary %.loc8_24.2, %.loc8_24.3 // CHECK:STDOUT: %.loc8_26.1: ref %C.3 = converted %.loc8_24.1, %.loc8_24.4 -// CHECK:STDOUT: %.loc8_35.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc8_35.1: %Convert.type.2 = interface_witness_access constants.%.21, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %.loc8_35.2: = bound_method %.loc8_26.1, %.loc8_35.1 // CHECK:STDOUT: %.loc8_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc8_26.2: %C.3 = bind_value %.loc8_26.1 @@ -1084,20 +1084,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc8_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc8: -// CHECK:STDOUT: %.loc9_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc9_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc9_7 br !if.then.loc9 else br !if.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc9: -// CHECK:STDOUT: %.loc9_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc9_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc9: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_33: i32 = int_value 1 [template = constants.%.15] -// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%.15) [template = constants.%C.4] +// CHECK:STDOUT: %.loc9_33: i32 = int_value 1 [template = constants.%.14] +// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%.14) [template = constants.%C.4] // CHECK:STDOUT: %.loc9_24.2: ref %C.4 = temporary_storage // CHECK:STDOUT: %.loc9_24.3: init %C.4 = class_init (), %.loc9_24.2 [template = constants.%struct.2] // CHECK:STDOUT: %.loc9_24.4: ref %C.4 = temporary %.loc9_24.2, %.loc9_24.3 // CHECK:STDOUT: %.loc9_26.1: ref %C.4 = converted %.loc9_24.1, %.loc9_24.4 -// CHECK:STDOUT: %.loc9_35.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc9_35.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.4] // CHECK:STDOUT: %.loc9_35.2: = bound_method %.loc9_26.1, %.loc9_35.1 // CHECK:STDOUT: %.loc9_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc9_26.2: %C.4 = bind_value %.loc9_26.1 @@ -1106,20 +1106,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc9_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc9: -// CHECK:STDOUT: %.loc10_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc10_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc10_7 br !if.then.loc10 else br !if.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc10: -// CHECK:STDOUT: %.loc10_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc10_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc10: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_33: i32 = int_value 2 [template = constants.%.16] -// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.16) [template = constants.%C.5] +// CHECK:STDOUT: %.loc10_33: i32 = int_value 2 [template = constants.%.15] +// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.15) [template = constants.%C.5] // CHECK:STDOUT: %.loc10_24.2: ref %C.5 = temporary_storage // CHECK:STDOUT: %.loc10_24.3: init %C.5 = class_init (), %.loc10_24.2 [template = constants.%struct.3] // CHECK:STDOUT: %.loc10_24.4: ref %C.5 = temporary %.loc10_24.2, %.loc10_24.3 // CHECK:STDOUT: %.loc10_26.1: ref %C.5 = converted %.loc10_24.1, %.loc10_24.4 -// CHECK:STDOUT: %.loc10_35.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.5] +// CHECK:STDOUT: %.loc10_35.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.5] // CHECK:STDOUT: %.loc10_35.2: = bound_method %.loc10_26.1, %.loc10_35.1 // CHECK:STDOUT: %.loc10_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc10_26.2: %C.5 = bind_value %.loc10_26.1 @@ -1128,20 +1128,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc10_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc10: -// CHECK:STDOUT: %.loc11_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc11_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc11_7 br !if.then.loc11 else br !if.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11: -// CHECK:STDOUT: %.loc11_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc11_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc11: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_33: i32 = int_value 3 [template = constants.%.17] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%.17) [template = constants.%C.6] +// CHECK:STDOUT: %.loc11_33: i32 = int_value 3 [template = constants.%.16] +// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%.16) [template = constants.%C.6] // CHECK:STDOUT: %.loc11_24.2: ref %C.6 = temporary_storage // CHECK:STDOUT: %.loc11_24.3: init %C.6 = class_init (), %.loc11_24.2 [template = constants.%struct.4] // CHECK:STDOUT: %.loc11_24.4: ref %C.6 = temporary %.loc11_24.2, %.loc11_24.3 // CHECK:STDOUT: %.loc11_26.1: ref %C.6 = converted %.loc11_24.1, %.loc11_24.4 -// CHECK:STDOUT: %.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.6] // CHECK:STDOUT: %.loc11_35.2: = bound_method %.loc11_26.1, %.loc11_35.1 // CHECK:STDOUT: %.loc11_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc11_26.2: %C.6 = bind_value %.loc11_26.1 @@ -1150,20 +1150,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc11_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11: -// CHECK:STDOUT: %.loc12_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc12_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc12_7 br !if.then.loc12 else br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: -// CHECK:STDOUT: %.loc12_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc12_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc12: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_33: i32 = int_value 4 [template = constants.%.18] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%.18) [template = constants.%C.7] +// CHECK:STDOUT: %.loc12_33: i32 = int_value 4 [template = constants.%.17] +// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%.17) [template = constants.%C.7] // CHECK:STDOUT: %.loc12_24.2: ref %C.7 = temporary_storage // CHECK:STDOUT: %.loc12_24.3: init %C.7 = class_init (), %.loc12_24.2 [template = constants.%struct.5] // CHECK:STDOUT: %.loc12_24.4: ref %C.7 = temporary %.loc12_24.2, %.loc12_24.3 // CHECK:STDOUT: %.loc12_26.1: ref %C.7 = converted %.loc12_24.1, %.loc12_24.4 -// CHECK:STDOUT: %.loc12_35.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.7] +// CHECK:STDOUT: %.loc12_35.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.7] // CHECK:STDOUT: %.loc12_35.2: = bound_method %.loc12_26.1, %.loc12_35.1 // CHECK:STDOUT: %.loc12_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc12_26.2: %C.7 = bind_value %.loc12_26.1 @@ -1172,20 +1172,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc12_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: -// CHECK:STDOUT: %.loc13_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc13_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc13_7 br !if.then.loc13 else br !if.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc13: -// CHECK:STDOUT: %.loc13_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc13_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc13: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_33: i32 = int_value 5 [template = constants.%.19] -// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%.19) [template = constants.%C.8] +// CHECK:STDOUT: %.loc13_33: i32 = int_value 5 [template = constants.%.18] +// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%.18) [template = constants.%C.8] // CHECK:STDOUT: %.loc13_24.2: ref %C.8 = temporary_storage // CHECK:STDOUT: %.loc13_24.3: init %C.8 = class_init (), %.loc13_24.2 [template = constants.%struct.6] // CHECK:STDOUT: %.loc13_24.4: ref %C.8 = temporary %.loc13_24.2, %.loc13_24.3 // CHECK:STDOUT: %.loc13_26.1: ref %C.8 = converted %.loc13_24.1, %.loc13_24.4 -// CHECK:STDOUT: %.loc13_35.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %.loc13_35.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.8] // CHECK:STDOUT: %.loc13_35.2: = bound_method %.loc13_26.1, %.loc13_35.1 // CHECK:STDOUT: %.loc13_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc13_26.2: %C.8 = bind_value %.loc13_26.1 @@ -1194,20 +1194,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc13_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc13: -// CHECK:STDOUT: %.loc14_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc14_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc14_7 br !if.then.loc14 else br !if.else.loc14 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc14: -// CHECK:STDOUT: %.loc14_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc14_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc14: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_33: i32 = int_value 6 [template = constants.%.20] -// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%.20) [template = constants.%C.9] +// CHECK:STDOUT: %.loc14_33: i32 = int_value 6 [template = constants.%.19] +// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%.19) [template = constants.%C.9] // CHECK:STDOUT: %.loc14_24.2: ref %C.9 = temporary_storage // CHECK:STDOUT: %.loc14_24.3: init %C.9 = class_init (), %.loc14_24.2 [template = constants.%struct.7] // CHECK:STDOUT: %.loc14_24.4: ref %C.9 = temporary %.loc14_24.2, %.loc14_24.3 // CHECK:STDOUT: %.loc14_26.1: ref %C.9 = converted %.loc14_24.1, %.loc14_24.4 -// CHECK:STDOUT: %.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %.loc14_35.2: = bound_method %.loc14_26.1, %.loc14_35.1 // CHECK:STDOUT: %.loc14_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc14_26.2: %C.9 = bind_value %.loc14_26.1 @@ -1216,20 +1216,20 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: return %.loc14_35.4 to %return // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc14: -// CHECK:STDOUT: %.loc15_7: bool = bool_literal false [template = constants.%.5] +// CHECK:STDOUT: %.loc15_7: bool = bool_literal false [template = constants.%.4] // CHECK:STDOUT: if %.loc15_7 br !if.then.loc15 else br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc15: -// CHECK:STDOUT: %.loc15_24.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc15_24.1: %.5 = struct_literal () // CHECK:STDOUT: %P.ref.loc15: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc15_33: i32 = int_value 7 [template = constants.%.21] -// CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%.21) [template = constants.%C.10] +// CHECK:STDOUT: %.loc15_33: i32 = int_value 7 [template = constants.%.20] +// CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%.20) [template = constants.%C.10] // CHECK:STDOUT: %.loc15_24.2: ref %C.10 = temporary_storage // CHECK:STDOUT: %.loc15_24.3: init %C.10 = class_init (), %.loc15_24.2 [template = constants.%struct.8] // CHECK:STDOUT: %.loc15_24.4: ref %C.10 = temporary %.loc15_24.2, %.loc15_24.3 // CHECK:STDOUT: %.loc15_26.1: ref %C.10 = converted %.loc15_24.1, %.loc15_24.4 -// CHECK:STDOUT: %.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %.loc15_35.2: = bound_method %.loc15_26.1, %.loc15_35.1 // CHECK:STDOUT: %.loc15_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc15_26.2: %C.10 = bind_value %.loc15_26.1 @@ -1276,9 +1276,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %N.patt => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.8) { -// CHECK:STDOUT: %N => constants.%.8 -// CHECK:STDOUT: %N.patt => constants.%.8 +// CHECK:STDOUT: specific @C(constants.%.7) { +// CHECK:STDOUT: %N => constants.%.7 +// CHECK:STDOUT: %N.patt => constants.%.7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1313,8 +1313,15 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.12 -// CHECK:STDOUT: %.2 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.11 +// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%.14) { +// CHECK:STDOUT: %N => constants.%.14 +// CHECK:STDOUT: %N.patt => constants.%.14 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%.15) { @@ -1359,10 +1366,3 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.21) { -// CHECK:STDOUT: %N => constants.%.21 -// CHECK:STDOUT: %N.patt => constants.%.21 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/no_value.carbon b/toolchain/check/testdata/return/no_value.carbon index c0989dec6682..295da6614781 100644 --- a/toolchain/check/testdata/return/no_value.carbon +++ b/toolchain/check/testdata/return/no_value.carbon @@ -16,7 +16,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 829d565e24cb..00d0b4fb3a12 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -28,20 +28,20 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // 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 = unbound_element_type %C, i32 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.1: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.6, %.7) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %.6: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.8: i32 = int_value 0 [template] +// CHECK:STDOUT: %.7: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -86,12 +86,12 @@ fn G() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.1 = field_decl a, element0 [template] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc14: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc13_8: %.1 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc14: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -105,13 +105,13 @@ fn G() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %result: ref %C = bind_name result, %return -// CHECK:STDOUT: %.loc17_34: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_42: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc17_43.1: %.3 = struct_literal (%.loc17_34, %.loc17_42) +// CHECK:STDOUT: %.loc17_34: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_42: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_43.1: %.2 = struct_literal (%.loc17_34, %.loc17_42) // CHECK:STDOUT: %.loc17_43.2: ref i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc17_43.3: init i32 = initialize_from %.loc17_34 to %.loc17_43.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc17_43.3: init i32 = initialize_from %.loc17_34 to %.loc17_43.2 [template = constants.%.5] // CHECK:STDOUT: %.loc17_43.4: ref i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc17_43.5: init i32 = initialize_from %.loc17_42 to %.loc17_43.4 [template = constants.%.7] +// CHECK:STDOUT: %.loc17_43.5: init i32 = initialize_from %.loc17_42 to %.loc17_43.4 [template = constants.%.6] // CHECK:STDOUT: %.loc17_43.6: init %C = class_init (%.loc17_43.3, %.loc17_43.5), %return [template = constants.%struct] // CHECK:STDOUT: %.loc17_44: init %C = converted %.loc17_43.1, %.loc17_43.6 [template = constants.%struct] // CHECK:STDOUT: assign %return, %.loc17_44 @@ -125,7 +125,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc22_24.2: type = converted %int.make_type_32.loc22, %.loc22_24.1 [template = i32] // CHECK:STDOUT: %result.var: ref i32 = var result // CHECK:STDOUT: %result: ref i32 = bind_name result, %result.var -// CHECK:STDOUT: %.loc22_30: i32 = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc22_30: i32 = int_value 0 [template = constants.%.7] // CHECK:STDOUT: assign %result.var, %.loc22_30 // CHECK:STDOUT: %.loc22_16: i32 = bind_value %result // CHECK:STDOUT: return %.loc22_16 diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 36c85873a22a..4a1eb986eb26 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -31,13 +31,13 @@ fn EnclosingButAfter(b: bool) -> 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: %UnrelatedScopes.type: type = fn_type @UnrelatedScopes [template] // CHECK:STDOUT: %UnrelatedScopes: %UnrelatedScopes.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %EnclosingButAfter.type: type = fn_type @EnclosingButAfter [template] @@ -95,7 +95,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @UnrelatedScopes() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc12: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc12 br !if.then.loc12 else br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: @@ -104,12 +104,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_32.loc13, %.loc13_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc13_27: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_27: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: assign %v.var, %.loc13_27 // CHECK:STDOUT: br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: -// CHECK:STDOUT: %.loc15: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc15: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc15 br !if.then.loc15 else br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc15: @@ -118,12 +118,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc16_21.2: type = converted %int.make_type_32.loc16, %.loc16_21.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w // CHECK:STDOUT: %w: ref i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc16_27: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc16_27: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: assign %w.var, %.loc16_27 // CHECK:STDOUT: br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: -// CHECK:STDOUT: %.loc18: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc18: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: return %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -140,7 +140,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_32.loc23, %.loc23_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var -// CHECK:STDOUT: %.loc23_27: i32 = int_value 0 [template = constants.%.3] +// CHECK:STDOUT: %.loc23_27: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: assign %v.var, %.loc23_27 // CHECK:STDOUT: %.loc23_18: i32 = bind_value %v // CHECK:STDOUT: return %.loc23_18 @@ -151,7 +151,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc26_19.2: type = converted %int.make_type_32.loc26, %.loc26_19.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w // CHECK:STDOUT: %w: ref i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc26_25: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc26_25: i32 = int_value 1 [template = constants.%.3] // CHECK:STDOUT: assign %w.var, %.loc26_25 // CHECK:STDOUT: %.loc26_16: i32 = bind_value %w // CHECK:STDOUT: return %.loc26_16 diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index d417dea1885d..93f26cd32094 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -16,13 +16,13 @@ fn Main() -> {.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: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 3 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] +// CHECK:STDOUT: %.2: i32 = int_value 3 [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,26 +41,26 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = 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_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %.loc11_22: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc11_22: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Main() -> %.2 { +// CHECK:STDOUT: fn @Main() -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_16: i32 = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_17: %.2 = struct_literal (%.loc12_16) -// CHECK:STDOUT: %struct: %.2 = struct_value (%.loc12_16) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_18: %.2 = converted %.loc12_17, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_16: i32 = int_value 3 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_17: %.1 = struct_literal (%.loc12_16) +// CHECK:STDOUT: %struct: %.1 = struct_value (%.loc12_16) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_18: %.1 = converted %.loc12_17, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc12_18 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index 00ea3ce20cc5..888b3baa36b9 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -17,16 +17,16 @@ fn Main() -> (i32, 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: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 15 [template] -// CHECK:STDOUT: %.6: i32 = int_value 35 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 15 [template] +// CHECK:STDOUT: %.3: i32 = int_value 35 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,35 +45,35 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { -// 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.loc12_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_20: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_23.1: %.2 = tuple_literal (%int.make_type_32.loc12_15, %int.make_type_32.loc12_20) +// CHECK:STDOUT: %.loc12_23.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12_15, %int.make_type_32.loc12_20) // CHECK:STDOUT: %.loc12_23.2: type = value_of_initializer %int.make_type_32.loc12_15 [template = i32] // CHECK:STDOUT: %.loc12_23.3: type = converted %int.make_type_32.loc12_15, %.loc12_23.2 [template = i32] // CHECK:STDOUT: %.loc12_23.4: type = value_of_initializer %int.make_type_32.loc12_20 [template = i32] // CHECK:STDOUT: %.loc12_23.5: type = converted %int.make_type_32.loc12_20, %.loc12_23.4 [template = i32] -// CHECK:STDOUT: %.loc12_23.6: type = converted %.loc12_23.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: %.loc12_23.6: type = converted %.loc12_23.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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Main() -> %return: %.3 { +// CHECK:STDOUT: fn @Main() -> %return: %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11: i32 = int_value 15 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_15: i32 = int_value 35 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_17.1: %.3 = tuple_literal (%.loc13_11, %.loc13_15) +// CHECK:STDOUT: %.loc13_11: i32 = int_value 15 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_15: i32 = int_value 35 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_17.1: %tuple.type.2 = tuple_literal (%.loc13_11, %.loc13_15) // CHECK:STDOUT: %.loc13_17.2: ref i32 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_17.3: init i32 = initialize_from %.loc13_11 to %.loc13_17.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc13_17.3: init i32 = initialize_from %.loc13_11 to %.loc13_17.2 [template = constants.%.2] // CHECK:STDOUT: %.loc13_17.4: ref i32 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_17.5: init i32 = initialize_from %.loc13_15 to %.loc13_17.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_17.6: init %.3 = tuple_init (%.loc13_17.3, %.loc13_17.5) to %return [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_18: init %.3 = converted %.loc13_17.1, %.loc13_17.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc13_17.5: init i32 = initialize_from %.loc13_15 to %.loc13_17.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_17.6: init %tuple.type.2 = tuple_init (%.loc13_17.3, %.loc13_17.5) to %return [template = constants.%tuple] +// CHECK:STDOUT: %.loc13_18: init %tuple.type.2 = converted %.loc13_17.1, %.loc13_17.6 [template = constants.%tuple] // CHECK:STDOUT: return %.loc13_18 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 5955000c21ea..f2f8cdf59acc 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -16,11 +16,11 @@ fn Main() -> 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: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,7 +54,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: return %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon index f05c732afe71..b8221d570348 100644 --- a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon +++ b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon @@ -18,7 +18,7 @@ fn F() { a.b; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 7406e91eeef1..bf6719e58f00 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -17,10 +17,10 @@ var x: {.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: %.2: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,16 +41,16 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32] -// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.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: %.3 = struct_literal () +// CHECK:STDOUT: %.loc14: %.2 = struct_literal () // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon index cdc9aeecf03a..78bd9b721825 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -17,9 +17,9 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,8 +43,8 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_19: i32 = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_20: %.4 = struct_literal (%.loc14_19) +// CHECK:STDOUT: %.loc14_19: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_20: %.3 = struct_literal (%.loc14_19) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_duplicate_name.carbon b/toolchain/check/testdata/struct/fail_duplicate_name.carbon index 566a0ef39b47..79ee1fb865ea 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -56,17 +56,17 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 1 [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] -// CHECK:STDOUT: %.5: type = struct_type {.b: i32, .c: i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.7: i32 = int_value 3 [template] -// CHECK:STDOUT: %.8: i32 = int_value 4 [template] +// CHECK:STDOUT: %.1: i32 = int_value 1 [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [template] +// CHECK:STDOUT: %.4: type = struct_type {.b: i32, .c: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.6: i32 = int_value 3 [template] +// CHECK:STDOUT: %.7: i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -122,18 +122,18 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: %int.make_type_32.loc45: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_13.1: type = value_of_initializer %int.make_type_32.loc45 [template = i32] // CHECK:STDOUT: %.loc45_13.2: type = converted %int.make_type_32.loc45, %.loc45_13.1 [template = i32] -// CHECK:STDOUT: %.loc45_16: type = struct_type {.a: i32} [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc45_16: type = struct_type {.a: i32} [template = constants.%.2] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc53_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_32.loc53_13 [template = i32] // CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_32.loc53_13, %.loc53_13.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc53_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_22.1: type = value_of_initializer %int.make_type_32.loc53_22 [template = i32] // CHECK:STDOUT: %.loc53_22.2: type = converted %int.make_type_32.loc53_22, %.loc53_22.1 [template = i32] -// CHECK:STDOUT: %.loc53_25: type = struct_type {.b: i32, .c: i32} [template = constants.%.5] -// CHECK:STDOUT: %y.var: ref %.5 = var y -// CHECK:STDOUT: %y: ref %.5 = bind_name y, %y.var +// CHECK:STDOUT: %.loc53_25: type = struct_type {.b: i32, .c: i32} [template = constants.%.4] +// CHECK:STDOUT: %y.var: ref %.4 = var y +// CHECK:STDOUT: %y: ref %.4 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -142,17 +142,17 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc27_35: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc27_36: %.3 = struct_literal (%.loc27_35) +// CHECK:STDOUT: %.loc27_35: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc27_36: %.2 = struct_literal (%.loc27_35) // CHECK:STDOUT: %v: = bind_name v, -// CHECK:STDOUT: %.loc36_22: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc36_32: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc36_22: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc36_32: i32 = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %w: i32 = bind_name w, -// CHECK:STDOUT: %.loc45_26: i32 = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc45_34: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc45_26: i32 = int_value 1 [template = constants.%.1] +// CHECK:STDOUT: %.loc45_34: i32 = int_value 2 [template = constants.%.3] // CHECK:STDOUT: assign file.%x.var, -// CHECK:STDOUT: %.loc53_35: i32 = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc53_43: i32 = int_value 4 [template = constants.%.8] +// CHECK:STDOUT: %.loc53_35: i32 = int_value 3 [template = constants.%.6] +// CHECK:STDOUT: %.loc53_43: i32 = int_value 4 [template = constants.%.7] // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index ba7d9b0698c2..9a172214bbe1 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -23,11 +23,11 @@ var y: {.b: i32} = x; // 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 = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: type = struct_type {.b: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.b: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,25 +49,25 @@ var y: {.b: i32} = x; // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15, %.loc15_13.1 [template = i32] -// CHECK:STDOUT: %.loc15_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc15_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_13.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_32.loc20, %.loc20_13.1 [template = i32] -// CHECK:STDOUT: %.loc20_16: type = struct_type {.b: i32} [template = constants.%.4] -// CHECK:STDOUT: %y.var: ref %.4 = var y -// CHECK:STDOUT: %y: ref %.4 = bind_name y, %y.var +// CHECK:STDOUT: %.loc20_16: type = struct_type {.b: i32} [template = constants.%.3] +// CHECK:STDOUT: %y.var: ref %.3 = var y +// CHECK:STDOUT: %y: ref %.3 = bind_name y, %y.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: %.loc15_26: i32 = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_27: %.4 = struct_literal (%.loc15_26) +// CHECK:STDOUT: %.loc15_26: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_27: %.3 = struct_literal (%.loc15_26) // CHECK:STDOUT: assign file.%x.var, -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index 8f2f1b0a592a..900a3373790c 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -17,11 +17,11 @@ var x: {.a: i32} = {.b = 1.0}; // 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 = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: f64 = float_literal 1 [template] -// CHECK:STDOUT: %.4: type = struct_type {.b: f64} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.2: f64 = float_literal 1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.b: f64} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -42,17 +42,17 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32] -// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.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_26: f64 = float_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_29: %.4 = struct_literal (%.loc14_26) +// CHECK:STDOUT: %.loc14_26: f64 = float_literal 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_29: %.3 = struct_literal (%.loc14_26) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index a73f4d82753a..aca3a5a422f8 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -19,11 +19,11 @@ var y: i32 = x.b; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: f64} [template] -// CHECK:STDOUT: %.4: f64 = float_literal 4 [template] -// CHECK:STDOUT: %struct: %.3 = struct_value (%.4) [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: f64} [template] +// CHECK:STDOUT: %.3: f64 = float_literal 4 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } @@ -50,9 +50,9 @@ var y: i32 = x.b; // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64] // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64] -// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: f64} [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: f64} [template = constants.%.2] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32, %.loc15_8.1 [template = i32] @@ -66,12 +66,12 @@ var y: i32 = x.b; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: f64 = float_literal 4 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_29.1: %.3 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_29.2: init %.3 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_30: init %.3 = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26: f64 = float_literal 4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_29.1: %.2 = struct_literal (%.loc11_26) +// CHECK:STDOUT: %.loc11_29.2: init %.2 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_30: init %.2 = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_30 -// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_member_of_function.carbon b/toolchain/check/testdata/struct/fail_member_of_function.carbon index b624cdda8d3c..e605c9c1111e 100644 --- a/toolchain/check/testdata/struct/fail_member_of_function.carbon +++ b/toolchain/check/testdata/struct/fail_member_of_function.carbon @@ -19,7 +19,7 @@ fn A() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 94cc6d40d5b1..936236c0fd6c 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -18,11 +18,11 @@ var y: i32 = x.b; // 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 = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: i32 = int_value 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.2: i32 = int_value 4 [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -44,9 +44,9 @@ var y: i32 = x.b; // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11, %.loc11_13.1 [template = i32] -// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.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] @@ -58,12 +58,12 @@ var y: i32 = x.b; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26: i32 = int_value 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_27.1: %.2 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: init %.2 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 4 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26) +// CHECK:STDOUT: %.loc11_27.2: init %.1 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index ba074f4a09dd..80d9f4bc2dc3 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -17,12 +17,12 @@ var x: {.a: i32, .b: i32} = {.a = 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: %.2: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.4: i32 = int_value 1 [template] -// CHECK:STDOUT: %.5: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,17 +46,17 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32] // CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_32.loc14_22, %.loc14_22.1 [template = i32] -// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.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_35: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_36: %.5 = struct_literal (%.loc14_35) +// CHECK:STDOUT: %.loc14_35: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_36: %.4 = struct_literal (%.loc14_35) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index 9b6b0d737d6a..f9b026479521 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -20,9 +20,9 @@ var x: {.a: i32} = {.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: %.2: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [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] @@ -32,14 +32,14 @@ var x: {.a: i32} = {.a: i32}; // 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: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.2) [template] +// 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(%.1) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.1) [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 { @@ -52,7 +52,7 @@ var x: {.a: i32} = {.a: i32}; // 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 @@ -67,9 +67,9 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_13.2: type = converted %int.make_type_32, %.loc17_13.1 [template = i32] -// CHECK:STDOUT: %.loc17_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc17_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -81,8 +81,8 @@ var x: {.a: i32} = {.a: i32}; // 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: @@ -107,8 +107,8 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_25.2: type = converted %int.make_type_32, %.loc17_25.1 [template = i32] -// CHECK:STDOUT: %.loc17_28: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc17_29: %.2 = converted %.loc17_28, [template = ] +// CHECK:STDOUT: %.loc17_28: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %.loc17_29: %.1 = converted %.loc17_28, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -134,16 +134,16 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %Self => constants.%Self.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.2) { -// CHECK:STDOUT: %Dest => constants.%.2 -// CHECK:STDOUT: %Dest.patt => constants.%.2 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.1) { +// CHECK:STDOUT: %Dest => constants.%.1 +// CHECK:STDOUT: %Dest.patt => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // 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: diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index af023a2ab630..74883ca42a73 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -22,7 +22,7 @@ var x: {.a = 1}; // CHECK:STDOUT: %.1: i32 = int_value 1 [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %.3: 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] @@ -31,14 +31,14 @@ var x: {.a = 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [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: %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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// 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: %struct: %.2 = struct_value (%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -50,7 +50,7 @@ var x: {.a = 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -80,8 +80,8 @@ var x: {.a = 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -129,7 +129,7 @@ var x: {.a = 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.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index b75fb2f7d9eb..8828234c7a56 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -55,33 +55,33 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // 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 = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: i32 = int_value 0 [template] -// CHECK:STDOUT: %struct.1: %.2 = struct_value (%.3) [template] -// CHECK:STDOUT: %.4: type = tuple_type (type) [template] -// CHECK:STDOUT: %.5: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.6: type = struct_type {.b: i32, .c: %.5} [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: %.6, .d: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: %.8, .d: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] -// CHECK:STDOUT: %tuple: %.5 = tuple_value (%.3) [template] -// CHECK:STDOUT: %struct.2: %.6 = struct_value (%.3, %tuple) [template] -// CHECK:STDOUT: %struct.3: %.7 = struct_value (%struct.2, %.3) [template] -// CHECK:STDOUT: %.11: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %S: %.11 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.11 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %struct.1: %.1 = struct_value (%.2) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.3: type = struct_type {.b: i32, .c: %tuple.type.2} [template] +// CHECK:STDOUT: %.4: type = struct_type {.a: %.3, .d: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.6: type = struct_type {.a: %.5, .d: i32} [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2) [template] +// CHECK:STDOUT: %struct.2: %.3 = struct_value (%.2, %tuple) [template] +// CHECK:STDOUT: %struct.3: %.4 = struct_value (%struct.2, %.2) [template] +// CHECK:STDOUT: %.8: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %S: %.8 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %.8 = symbolic_binding_pattern S, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic] -// CHECK:STDOUT: %.12: type = struct_type {} [template] -// CHECK:STDOUT: %.13: = complete_type_witness %.12 [template] -// CHECK:STDOUT: %.14: i32 = int_value 1 [template] -// CHECK:STDOUT: %.15: i32 = int_value 2 [template] -// CHECK:STDOUT: %.16: type = ptr_type %.11 [template] -// CHECK:STDOUT: %struct.4: %.11 = struct_value (%.14, %.15) [template] +// CHECK:STDOUT: %.9: type = struct_type {} [template] +// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] +// CHECK:STDOUT: %.11: i32 = int_value 1 [template] +// CHECK:STDOUT: %.12: i32 = int_value 2 [template] +// CHECK:STDOUT: %.13: type = ptr_type %.8 [template] +// CHECK:STDOUT: %struct.4: %.8 = struct_value (%.11, %.12) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.4) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -108,27 +108,27 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4, %.loc4_17.1 [template = i32] -// CHECK:STDOUT: %.loc4_20: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %a_ref.var: ref %.2 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.2 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %.loc4_20: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %a_ref.var: ref %.1 = var a_ref +// CHECK:STDOUT: %a_ref: ref %.1 = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] // CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_36.1: %.4 = tuple_literal (%int.make_type_32.loc5_32) +// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc5_32) // CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_32.loc5_32 [template = i32] // CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_32.loc5_32, %.loc5_36.2 [template = i32] -// CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: i32, .c: %.5} [template = constants.%.6] +// CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: i32, .c: %tuple.type.2} [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32.loc5_44: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_32.loc5_44 [template = i32] // CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_32.loc5_44, %.loc5_44.1 [template = i32] -// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.6, .d: i32} [template = constants.%.7] -// CHECK:STDOUT: %b_ref.var: ref %.7 = var b_ref -// CHECK:STDOUT: %b_ref: ref %.7 = bind_name b_ref, %b_ref.var +// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.3, .d: i32} [template = constants.%.4] +// CHECK:STDOUT: %b_ref.var: ref %.4 = var b_ref +// CHECK:STDOUT: %b_ref: ref %.4 = bind_name b_ref, %b_ref.var // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %S.patt.loc8_9.1: %.11 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] -// CHECK:STDOUT: %S.param_patt: %.11 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.patt.loc8_9.1: %.8 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.param_patt: %.8 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc8_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_32.loc8_18 [template = i32] @@ -136,34 +136,34 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int.make_type_32.loc8_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_32.loc8_27 [template = i32] // CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_32.loc8_27, %.loc8_27.1 [template = i32] -// CHECK:STDOUT: %.loc8_30: type = struct_type {.a: i32, .b: i32} [template = constants.%.11] -// CHECK:STDOUT: %S.param: %.11 = value_param runtime_param -// CHECK:STDOUT: %S.loc8_9.1: %.11 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] +// CHECK:STDOUT: %.loc8_30: type = struct_type {.a: i32, .b: i32} [template = constants.%.8] +// CHECK:STDOUT: %S.param: %.8 = value_param runtime_param +// CHECK:STDOUT: %S.loc8_9.1: %.8 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %C.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_19: i32 = int_value 1 [template = constants.%.14] -// CHECK:STDOUT: %.loc9_27: i32 = int_value 2 [template = constants.%.15] -// CHECK:STDOUT: %.loc9_28: %.11 = struct_literal (%.loc9_19, %.loc9_27) -// CHECK:STDOUT: %struct: %.11 = struct_value (%.loc9_19, %.loc9_27) [template = constants.%struct.4] -// CHECK:STDOUT: %.loc9_12: %.11 = converted %.loc9_28, %struct [template = constants.%struct.4] +// CHECK:STDOUT: %.loc9_19: i32 = int_value 1 [template = constants.%.11] +// CHECK:STDOUT: %.loc9_27: i32 = int_value 2 [template = constants.%.12] +// CHECK:STDOUT: %.loc9_28: %.8 = struct_literal (%.loc9_19, %.loc9_27) +// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc9_19, %.loc9_27) [template = constants.%struct.4] +// CHECK:STDOUT: %.loc9_12: %.8 = converted %.loc9_28, %struct [template = constants.%struct.4] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.3] // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %.11) { -// CHECK:STDOUT: %S.loc8_9.2: %.11 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)] -// CHECK:STDOUT: %S.patt.loc8_9.2: %.11 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %.8) { +// CHECK:STDOUT: %S.loc8_9.2: %.8 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)] +// CHECK:STDOUT: %S.patt.loc8_9.2: %.8 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc8_34: = complete_type_witness %.12 [template = constants.%.13] +// CHECK:STDOUT: %.loc8_34: = complete_type_witness %.9 [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -176,30 +176,30 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_30: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_31.1: %.2 = struct_literal (%.loc4_30) -// CHECK:STDOUT: %.loc4_31.2: init %.2 = struct_init (%.loc4_30) to file.%a_ref.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc4_32: init %.2 = converted %.loc4_31.1, %.loc4_31.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc4_30: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_31.1: %.1 = struct_literal (%.loc4_30) +// CHECK:STDOUT: %.loc4_31.2: init %.1 = struct_init (%.loc4_30) to file.%a_ref.var [template = constants.%struct.1] +// CHECK:STDOUT: %.loc4_32: init %.1 = converted %.loc4_31.1, %.loc4_31.2 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_32 -// CHECK:STDOUT: %.loc6_17: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_26: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_28.1: %.5 = tuple_literal (%.loc6_26) -// CHECK:STDOUT: %.loc6_29.1: %.6 = struct_literal (%.loc6_17, %.loc6_28.1) -// CHECK:STDOUT: %.loc6_37: i32 = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_38.1: %.7 = struct_literal (%.loc6_29.1, %.loc6_37) -// CHECK:STDOUT: %.loc6_38.2: ref %.6 = struct_access file.%b_ref.var, element0 +// CHECK:STDOUT: %.loc6_17: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_26: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_28.1: %tuple.type.2 = tuple_literal (%.loc6_26) +// CHECK:STDOUT: %.loc6_29.1: %.3 = struct_literal (%.loc6_17, %.loc6_28.1) +// CHECK:STDOUT: %.loc6_37: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_38.1: %.4 = struct_literal (%.loc6_29.1, %.loc6_37) +// CHECK:STDOUT: %.loc6_38.2: ref %.3 = struct_access file.%b_ref.var, element0 // CHECK:STDOUT: %.loc6_29.2: ref i32 = struct_access %.loc6_38.2, element0 -// CHECK:STDOUT: %.loc6_29.3: init i32 = initialize_from %.loc6_17 to %.loc6_29.2 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_29.4: ref %.5 = struct_access %.loc6_38.2, element1 -// CHECK:STDOUT: %.loc6_28.2: init %.5 = tuple_init (%.loc6_26) to %.loc6_29.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.5: init %.5 = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.6: init %.5 = initialize_from %.loc6_29.5 to %.loc6_29.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.7: init %.6 = struct_init (%.loc6_29.3, %.loc6_29.6) to %.loc6_38.2 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc6_38.3: init %.6 = converted %.loc6_29.1, %.loc6_29.7 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc6_29.3: init i32 = initialize_from %.loc6_17 to %.loc6_29.2 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_29.4: ref %tuple.type.2 = struct_access %.loc6_38.2, element1 +// CHECK:STDOUT: %.loc6_28.2: init %tuple.type.2 = tuple_init (%.loc6_26) to %.loc6_29.4 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_29.5: init %tuple.type.2 = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_29.6: init %tuple.type.2 = initialize_from %.loc6_29.5 to %.loc6_29.4 [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_29.7: init %.3 = struct_init (%.loc6_29.3, %.loc6_29.6) to %.loc6_38.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc6_38.3: init %.3 = converted %.loc6_29.1, %.loc6_29.7 [template = constants.%struct.2] // CHECK:STDOUT: %.loc6_38.4: ref i32 = struct_access file.%b_ref.var, element1 -// CHECK:STDOUT: %.loc6_38.5: init i32 = initialize_from %.loc6_37 to %.loc6_38.4 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_38.6: init %.7 = struct_init (%.loc6_38.3, %.loc6_38.5) to file.%b_ref.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc6_39: init %.7 = converted %.loc6_38.1, %.loc6_38.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_38.5: init i32 = initialize_from %.loc6_37 to %.loc6_38.4 [template = constants.%.2] +// CHECK:STDOUT: %.loc6_38.6: init %.4 = struct_init (%.loc6_38.3, %.loc6_38.5) to file.%b_ref.var [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_39: init %.4 = converted %.loc6_38.1, %.loc6_38.6 [template = constants.%struct.3] // CHECK:STDOUT: assign file.%b_ref.var, %.loc6_39 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -218,37 +218,37 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // 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 = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: type = tuple_type (type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %.5: type = struct_type {.b: i32, .c: %.4} [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: %.5, .d: i32} [template] -// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] -// CHECK:STDOUT: %.8: type = struct_type {.a: %.7, .d: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.2: type = struct_type {.b: i32, .c: %tuple.type.2} [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %.2, .d: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.5: type = struct_type {.a: %.4, .d: i32} [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {} [template] -// CHECK:STDOUT: %.11: = complete_type_witness %.10 [template] -// CHECK:STDOUT: %.12: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %S: %.12 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %.7: type = struct_type {} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.9: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %S: %.9 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic] -// CHECK:STDOUT: %S.patt: %.12 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.13: i32 = int_value 1 [template] -// CHECK:STDOUT: %.14: i32 = int_value 2 [template] -// CHECK:STDOUT: %.15: type = ptr_type %.12 [template] -// CHECK:STDOUT: %struct: %.12 = struct_value (%.13, %.14) [template] +// CHECK:STDOUT: %S.patt: %.9 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.10: i32 = int_value 1 [template] +// CHECK:STDOUT: %.11: i32 = int_value 2 [template] +// CHECK:STDOUT: %.12: type = ptr_type %.9 [template] +// CHECK:STDOUT: %struct: %.9 = struct_value (%.10, %.11) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template] -// CHECK:STDOUT: %.16: type = ptr_type %.10 [template] +// CHECK:STDOUT: %.13: type = ptr_type %.7 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: ref %.2 = import_ref Implicit//default, inst+17, loaded -// CHECK:STDOUT: %import_ref.2: ref %.6 = import_ref Implicit//default, inst+47, loaded +// CHECK:STDOUT: %import_ref.1: ref %.1 = import_ref Implicit//default, inst+17, loaded +// CHECK:STDOUT: %import_ref.2: ref %.3 = import_ref Implicit//default, inst+47, loaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+86, loaded [template = constants.%C.1] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+111, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { @@ -277,38 +277,38 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32.loc4, %.loc4_13.1 [template = i32] -// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref %.2 = var a -// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var +// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var // CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_32.loc5_18 [template = i32] // CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_32.loc5_18, %.loc5_18.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc5_28: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_32.1: %.3 = tuple_literal (%int.make_type_32.loc5_28) +// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc5_28) // CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_32.loc5_28 [template = i32] // CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_32.loc5_28, %.loc5_32.2 [template = i32] -// CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: i32, .c: %.4} [template = constants.%.5] +// CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: i32, .c: %tuple.type.2} [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32.loc5_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_32.loc5_40 [template = i32] // CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_32.loc5_40, %.loc5_40.1 [template = i32] -// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.5, .d: i32} [template = constants.%.6] -// CHECK:STDOUT: %b.var: ref %.6 = var b -// CHECK:STDOUT: %b: ref %.6 = bind_name b, %b.var +// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.2, .d: i32} [template = constants.%.3] +// CHECK:STDOUT: %b.var: ref %.3 = var b +// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_16: i32 = int_value 1 [template = constants.%.13] -// CHECK:STDOUT: %.loc6_24: i32 = int_value 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc6_25: %.12 = struct_literal (%.loc6_16, %.loc6_24) -// CHECK:STDOUT: %struct: %.12 = struct_value (%.loc6_16, %.loc6_24) [template = constants.%struct] -// CHECK:STDOUT: %.loc6_9: %.12 = converted %.loc6_25, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc6_16: i32 = int_value 1 [template = constants.%.10] +// CHECK:STDOUT: %.loc6_24: i32 = int_value 2 [template = constants.%.11] +// CHECK:STDOUT: %.loc6_25: %.9 = struct_literal (%.loc6_16, %.loc6_24) +// CHECK:STDOUT: %struct: %.9 = struct_value (%.loc6_16, %.loc6_24) [template = constants.%struct] +// CHECK:STDOUT: %.loc6_9: %.9 = converted %.loc6_25, %struct [template = constants.%struct] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.12) { -// CHECK:STDOUT: %S: %.12 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.12 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %.9) { +// CHECK:STDOUT: %S: %.9 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %.9 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -324,34 +324,34 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, imports.%import_ref.1 +// CHECK:STDOUT: %a_ref.ref: ref %.1 = name_ref a_ref, imports.%import_ref.1 // CHECK:STDOUT: %.loc4_20.1: ref i32 = struct_access %a_ref.ref, element0 // CHECK:STDOUT: %.loc4_20.2: i32 = bind_value %.loc4_20.1 -// CHECK:STDOUT: %.loc4_20.3: init %.2 = struct_init (%.loc4_20.2) to file.%a.var -// CHECK:STDOUT: %.loc4_25: init %.2 = converted %a_ref.ref, %.loc4_20.3 +// CHECK:STDOUT: %.loc4_20.3: init %.1 = struct_init (%.loc4_20.2) to file.%a.var +// CHECK:STDOUT: %.loc4_25: init %.1 = converted %a_ref.ref, %.loc4_20.3 // CHECK:STDOUT: assign file.%a.var, %.loc4_25 -// CHECK:STDOUT: %b_ref.ref: ref %.6 = name_ref b_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc5_47.1: ref %.5 = struct_access %b_ref.ref, element0 +// CHECK:STDOUT: %b_ref.ref: ref %.3 = name_ref b_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc5_47.1: ref %.2 = struct_access %b_ref.ref, element0 // CHECK:STDOUT: %.loc5_47.2: ref i32 = struct_access %.loc5_47.1, element0 // CHECK:STDOUT: %.loc5_47.3: i32 = bind_value %.loc5_47.2 -// CHECK:STDOUT: %.loc5_47.4: ref %.5 = struct_access file.%b.var, element0 +// CHECK:STDOUT: %.loc5_47.4: ref %.2 = struct_access file.%b.var, element0 // CHECK:STDOUT: %.loc5_47.5: ref i32 = struct_access %.loc5_47.4, element0 // CHECK:STDOUT: %.loc5_47.6: init i32 = initialize_from %.loc5_47.3 to %.loc5_47.5 -// CHECK:STDOUT: %.loc5_47.7: ref %.4 = struct_access %.loc5_47.1, element1 +// CHECK:STDOUT: %.loc5_47.7: ref %tuple.type.2 = struct_access %.loc5_47.1, element1 // CHECK:STDOUT: %.loc5_47.8: ref i32 = tuple_access %.loc5_47.7, element0 // CHECK:STDOUT: %.loc5_47.9: i32 = bind_value %.loc5_47.8 -// CHECK:STDOUT: %.loc5_47.10: ref %.4 = struct_access %.loc5_47.4, element1 -// CHECK:STDOUT: %.loc5_47.11: init %.4 = tuple_init (%.loc5_47.9) to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.12: init %.4 = converted %.loc5_47.7, %.loc5_47.11 -// CHECK:STDOUT: %.loc5_47.13: init %.4 = initialize_from %.loc5_47.12 to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.14: init %.5 = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4 -// CHECK:STDOUT: %.loc5_47.15: init %.5 = converted %.loc5_47.1, %.loc5_47.14 +// CHECK:STDOUT: %.loc5_47.10: ref %tuple.type.2 = struct_access %.loc5_47.4, element1 +// CHECK:STDOUT: %.loc5_47.11: init %tuple.type.2 = tuple_init (%.loc5_47.9) to %.loc5_47.10 +// CHECK:STDOUT: %.loc5_47.12: init %tuple.type.2 = converted %.loc5_47.7, %.loc5_47.11 +// CHECK:STDOUT: %.loc5_47.13: init %tuple.type.2 = initialize_from %.loc5_47.12 to %.loc5_47.10 +// CHECK:STDOUT: %.loc5_47.14: init %.2 = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4 +// CHECK:STDOUT: %.loc5_47.15: init %.2 = converted %.loc5_47.1, %.loc5_47.14 // CHECK:STDOUT: %.loc5_47.16: ref i32 = struct_access %b_ref.ref, element1 // CHECK:STDOUT: %.loc5_47.17: i32 = bind_value %.loc5_47.16 // CHECK:STDOUT: %.loc5_47.18: ref i32 = struct_access file.%b.var, element1 // CHECK:STDOUT: %.loc5_47.19: init i32 = initialize_from %.loc5_47.17 to %.loc5_47.18 -// CHECK:STDOUT: %.loc5_47.20: init %.6 = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var -// CHECK:STDOUT: %.loc5_52: init %.6 = converted %b_ref.ref, %.loc5_47.20 +// CHECK:STDOUT: %.loc5_47.20: init %.3 = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var +// CHECK:STDOUT: %.loc5_52: init %.3 = converted %b_ref.ref, %.loc5_47.20 // CHECK:STDOUT: assign file.%b.var, %.loc5_52 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc6: ref %C.3 = splice_block file.%c.var {} @@ -376,23 +376,23 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %S: %.4 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic] -// CHECK:STDOUT: %S.patt: %.4 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: type = struct_type {.c: i32, .d: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type %.4 [template] +// CHECK:STDOUT: %S.patt: %.3 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: type = struct_type {.c: i32, .d: i32} [template] +// CHECK:STDOUT: %.7: type = ptr_type %.3 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %struct: %.4 = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %.3 = struct_value (%.4, %.5) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -420,16 +420,16 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_28: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_29: %.7 = struct_literal (%.loc11_20, %.loc11_28) +// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_28: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_29: %.6 = struct_literal (%.loc11_20, %.loc11_28) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.4) { -// CHECK:STDOUT: %S: %.4 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.4 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %.3) { +// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %.3 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -466,25 +466,25 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %S: %.4 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic] -// CHECK:STDOUT: %S.patt: %.4 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 4 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %struct.1: %.4 = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %S.patt: %.3 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.4: i32 = int_value 3 [template] +// CHECK:STDOUT: %.5: i32 = int_value 4 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] +// CHECK:STDOUT: %struct.1: %.3 = struct_value (%.4, %.5) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.1) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.9: i32 = int_value 2 [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.2: %.4 = struct_value (%.10, %.9) [template] +// CHECK:STDOUT: %.8: i32 = int_value 2 [template] +// CHECK:STDOUT: %.9: i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.2: %.3 = struct_value (%.9, %.8) [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%struct.2) [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] @@ -495,14 +495,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // 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.10 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C.3) [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.10 [template] -// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -518,7 +518,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+91, unloaded // CHECK:STDOUT: %import_ref.6: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.10) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -537,11 +537,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_20: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_28: i32 = int_value 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_29: %.4 = struct_literal (%.loc9_20, %.loc9_28) -// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc9_20, %.loc9_28) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_13: %.4 = converted %.loc9_29, %struct [template = constants.%struct.1] +// CHECK:STDOUT: %.loc9_20: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc9_28: i32 = int_value 4 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_29: %.3 = struct_literal (%.loc9_20, %.loc9_28) +// CHECK:STDOUT: %struct: %.3 = struct_value (%.loc9_20, %.loc9_28) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc9_13: %.3 = converted %.loc9_29, %struct [template = constants.%struct.1] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var @@ -556,8 +556,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // 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.10 [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.%.10)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -567,9 +567,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.4) { -// CHECK:STDOUT: %S: %.4 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.4 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %.3) { +// CHECK:STDOUT: %S: %.3 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %.3 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -649,7 +649,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // 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.%.12 +// CHECK:STDOUT: %.2 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 9280619281e0..9458a14304e1 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -18,19 +18,19 @@ fn F() -> 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: type = struct_type {.x: i32, .y: i32, .z: i32} [template] +// CHECK:STDOUT: %.1: type = struct_type {.x: i32, .y: i32, .z: i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: i32, .b: %.2, .c: i32} [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: i32, .b: %.4, .c: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 3 [template] +// CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: %.1, .c: i32} [template] +// CHECK:STDOUT: %.6: type = struct_type {.a: i32, .b: %.3, .c: i32} [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,8 +50,8 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %return.patt: %.2 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_32.loc11_16 [template = i32] @@ -62,9 +62,9 @@ fn F() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc11_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_32.loc11_34 [template = i32] // CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_32.loc11_34, %.loc11_34.1 [template = i32] -// CHECK:STDOUT: %.loc11_37: type = struct_type {.x: i32, .y: i32, .z: i32} [template = constants.%.2] -// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param +// CHECK:STDOUT: %.loc11_37: type = struct_type {.x: i32, .y: i32, .z: i32} [template = constants.%.1] +// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: i32 = return_slot_pattern @@ -80,28 +80,28 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G() -> %.2; +// CHECK:STDOUT: fn @G() -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_16: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_16: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc14_25.1: ref %.2 = temporary_storage -// CHECK:STDOUT: %G.call: init %.2 = call %G.ref() to %.loc14_25.1 -// CHECK:STDOUT: %.loc14_34: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_35.1: %.6 = struct_literal (%.loc14_16, %G.call, %.loc14_34) -// CHECK:STDOUT: %.loc14_25.2: ref %.2 = temporary %.loc14_25.1, %G.call +// CHECK:STDOUT: %.loc14_25.1: ref %.1 = temporary_storage +// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() to %.loc14_25.1 +// CHECK:STDOUT: %.loc14_34: i32 = int_value 3 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_35.1: %.5 = struct_literal (%.loc14_16, %G.call, %.loc14_34) +// CHECK:STDOUT: %.loc14_25.2: ref %.1 = temporary %.loc14_25.1, %G.call // CHECK:STDOUT: %.loc14_25.3: ref i32 = struct_access %.loc14_25.2, element0 // CHECK:STDOUT: %.loc14_25.4: i32 = bind_value %.loc14_25.3 // CHECK:STDOUT: %.loc14_25.5: ref i32 = struct_access %.loc14_25.2, element1 // CHECK:STDOUT: %.loc14_25.6: i32 = bind_value %.loc14_25.5 // CHECK:STDOUT: %.loc14_25.7: ref i32 = struct_access %.loc14_25.2, element2 // CHECK:STDOUT: %.loc14_25.8: i32 = bind_value %.loc14_25.7 -// CHECK:STDOUT: %struct.loc14_25: %.2 = struct_value (%.loc14_25.4, %.loc14_25.6, %.loc14_25.8) -// CHECK:STDOUT: %.loc14_35.2: %.2 = converted %G.call, %struct.loc14_25 -// CHECK:STDOUT: %struct.loc14_35: %.6 = struct_value (%.loc14_16, %.loc14_35.2, %.loc14_34) -// CHECK:STDOUT: %.loc14_35.3: %.6 = converted %.loc14_35.1, %struct.loc14_35 -// CHECK:STDOUT: %.loc14_36: %.2 = struct_access %.loc14_35.3, element1 +// CHECK:STDOUT: %struct.loc14_25: %.1 = struct_value (%.loc14_25.4, %.loc14_25.6, %.loc14_25.8) +// CHECK:STDOUT: %.loc14_35.2: %.1 = converted %G.call, %struct.loc14_25 +// CHECK:STDOUT: %struct.loc14_35: %.5 = struct_value (%.loc14_16, %.loc14_35.2, %.loc14_34) +// CHECK:STDOUT: %.loc14_35.3: %.5 = converted %.loc14_35.1, %struct.loc14_35 +// CHECK:STDOUT: %.loc14_36: %.1 = struct_access %.loc14_35.3, element1 // CHECK:STDOUT: %.loc14_38: i32 = struct_access %.loc14_36, element1 // CHECK:STDOUT: return %.loc14_38 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index 75c0af7a3aaa..41773ada651b 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -17,15 +17,15 @@ var z: i32 = y; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: f64, .b: i32} [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: f64 = float_literal 0 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %.3 = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: f64, .b: i32} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,9 +54,9 @@ var z: i32 = y; // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11, %.loc11_22.1 [template = i32] -// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: f64, .b: i32} [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: f64, .b: i32} [template = constants.%.2] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.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] @@ -75,17 +75,17 @@ var z: i32 = y; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_35: f64 = float_literal 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_45: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_46.1: %.3 = struct_literal (%.loc11_35, %.loc11_45) +// CHECK:STDOUT: %.loc11_35: f64 = float_literal 0 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_45: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_46.1: %.2 = struct_literal (%.loc11_35, %.loc11_45) // CHECK:STDOUT: %.loc11_46.2: ref f64 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %.loc11_35 to %.loc11_46.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %.loc11_35 to %.loc11_46.2 [template = constants.%.4] // CHECK:STDOUT: %.loc11_46.4: ref i32 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_46.5: init i32 = initialize_from %.loc11_45 to %.loc11_46.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_46.6: init %.3 = struct_init (%.loc11_46.3, %.loc11_46.5) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_47: init %.3 = converted %.loc11_46.1, %.loc11_46.6 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_46.5: init i32 = initialize_from %.loc11_45 to %.loc11_46.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_46.6: init %.2 = struct_init (%.loc11_46.3, %.loc11_46.5) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_47: init %.2 = converted %.loc11_46.1, %.loc11_46.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_47 -// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x // CHECK:STDOUT: %.loc12_15.1: ref i32 = struct_access %x.ref, element1 // CHECK:STDOUT: %.loc12_15.2: i32 = bind_value %.loc12_15.1 // CHECK:STDOUT: assign file.%y.var, %.loc12_15.2 diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index a5c3a92dad08..e2d318cf9393 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -18,18 +18,18 @@ 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: type = struct_type {.a: %.3, .b: %.3} [template] -// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: %.5, .b: %.5} [template] -// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template] +// CHECK:STDOUT: %.2: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %.2, .b: %.2} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,66 +49,66 @@ 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_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: %int.make_type_32.loc14_26: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_29.1: %.2 = tuple_literal (%int.make_type_32.loc14_16, %int.make_type_32.loc14_21, %int.make_type_32.loc14_26) +// CHECK:STDOUT: %.loc14_29.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_16, %int.make_type_32.loc14_21, %int.make_type_32.loc14_26) // CHECK:STDOUT: %.loc14_29.2: type = value_of_initializer %int.make_type_32.loc14_16 [template = i32] // CHECK:STDOUT: %.loc14_29.3: type = converted %int.make_type_32.loc14_16, %.loc14_29.2 [template = i32] // CHECK:STDOUT: %.loc14_29.4: type = value_of_initializer %int.make_type_32.loc14_21 [template = i32] // CHECK:STDOUT: %.loc14_29.5: type = converted %int.make_type_32.loc14_21, %.loc14_29.4 [template = i32] // CHECK:STDOUT: %.loc14_29.6: type = value_of_initializer %int.make_type_32.loc14_26 [template = i32] // CHECK:STDOUT: %.loc14_29.7: type = converted %int.make_type_32.loc14_26, %.loc14_29.6 [template = i32] -// CHECK:STDOUT: %.loc14_29.8: type = converted %.loc14_29.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_29.8: type = converted %.loc14_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc14_37: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_47: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_50.1: %.2 = tuple_literal (%int.make_type_32.loc14_37, %int.make_type_32.loc14_42, %int.make_type_32.loc14_47) +// CHECK:STDOUT: %.loc14_50.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_37, %int.make_type_32.loc14_42, %int.make_type_32.loc14_47) // CHECK:STDOUT: %.loc14_50.2: type = value_of_initializer %int.make_type_32.loc14_37 [template = i32] // CHECK:STDOUT: %.loc14_50.3: type = converted %int.make_type_32.loc14_37, %.loc14_50.2 [template = i32] // CHECK:STDOUT: %.loc14_50.4: type = value_of_initializer %int.make_type_32.loc14_42 [template = i32] // CHECK:STDOUT: %.loc14_50.5: type = converted %int.make_type_32.loc14_42, %.loc14_50.4 [template = i32] // CHECK:STDOUT: %.loc14_50.6: type = value_of_initializer %int.make_type_32.loc14_47 [template = i32] // CHECK:STDOUT: %.loc14_50.7: type = converted %int.make_type_32.loc14_47, %.loc14_50.6 [template = i32] -// CHECK:STDOUT: %.loc14_50.8: type = converted %.loc14_50.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_51: type = struct_type {.a: %.3, .b: %.3} [template = constants.%.4] -// CHECK:STDOUT: %v.var: ref %.4 = var v -// CHECK:STDOUT: %v: ref %.4 = bind_name v, %v.var +// CHECK:STDOUT: %.loc14_50.8: type = converted %.loc14_50.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc14_51: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template = constants.%.1] +// CHECK:STDOUT: %v.var: ref %.1 = var v +// CHECK:STDOUT: %v: ref %.1 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_61: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_74.1: ref %.3 = struct_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_62: init %.3 = call %F.ref.loc14_61() to %.loc14_74.1 +// CHECK:STDOUT: %.loc14_74.1: ref %tuple.type.2 = struct_access %v.var, element0 +// CHECK:STDOUT: %F.call.loc14_62: init %tuple.type.2 = call %F.ref.loc14_61() to %.loc14_74.1 // CHECK:STDOUT: %F.ref.loc14_71: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_74.2: ref %.3 = struct_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_72: init %.3 = call %F.ref.loc14_71() to %.loc14_74.2 -// CHECK:STDOUT: %.loc14_74.3: %.4 = struct_literal (%F.call.loc14_62, %F.call.loc14_72) -// CHECK:STDOUT: %.loc14_74.4: init %.4 = struct_init (%F.call.loc14_62, %F.call.loc14_72) to %v.var -// CHECK:STDOUT: %.loc14_75: init %.4 = converted %.loc14_74.3, %.loc14_74.4 +// CHECK:STDOUT: %.loc14_74.2: ref %tuple.type.2 = struct_access %v.var, element1 +// CHECK:STDOUT: %F.call.loc14_72: init %tuple.type.2 = call %F.ref.loc14_71() to %.loc14_74.2 +// CHECK:STDOUT: %.loc14_74.3: %.1 = struct_literal (%F.call.loc14_62, %F.call.loc14_72) +// CHECK:STDOUT: %.loc14_74.4: init %.1 = struct_init (%F.call.loc14_62, %F.call.loc14_72) to %v.var +// CHECK:STDOUT: %.loc14_75: init %.1 = converted %.loc14_74.3, %.loc14_74.4 // CHECK:STDOUT: assign %v.var, %.loc14_75 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/no_prelude/empty.carbon b/toolchain/check/testdata/struct/no_prelude/empty.carbon index b5558d274ab4..141b5a45f2c2 100644 --- a/toolchain/check/testdata/struct/no_prelude/empty.carbon +++ b/toolchain/check/testdata/struct/no_prelude/empty.carbon @@ -15,7 +15,7 @@ var y: {} = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon index 80e62f1c04c0..abded566c444 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon @@ -18,9 +18,9 @@ var x: {.a: {}} = {.b = {}}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = struct_type {.a: %.1} [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: %.3} [template] -// CHECK:STDOUT: %.5: type = struct_type {.b: %.1} [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %empty_tuple.type} [template] +// CHECK:STDOUT: %.4: type = struct_type {.b: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,7 +37,7 @@ var x: {.a: {}} = {.b = {}}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_26: %.1 = struct_literal () -// CHECK:STDOUT: %.loc14_27: %.5 = struct_literal (%.loc14_26) +// CHECK:STDOUT: %.loc14_27: %.4 = struct_literal (%.loc14_26) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 12c4ac354cbc..8154758b9489 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -15,11 +15,11 @@ var y: {.a: i32} = x; // 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 = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.3: i32 = int_value 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template] +// CHECK:STDOUT: %.2: i32 = int_value 4 [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -41,31 +41,31 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11, %.loc11_13.1 [template = i32] -// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12, %.loc12_13.1 [template = i32] -// CHECK:STDOUT: %.loc12_16: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var +// CHECK:STDOUT: %.loc12_16: type = struct_type {.a: i32} [template = constants.%.1] +// CHECK:STDOUT: %y.var: ref %.1 = var y +// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.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_26: i32 = int_value 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_27.1: %.2 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: init %.2 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 4 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26) +// CHECK:STDOUT: %.loc11_27.2: init %.1 = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x // CHECK:STDOUT: %.loc12_20.1: ref i32 = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc12_20.2: i32 = bind_value %.loc12_20.1 -// CHECK:STDOUT: %.loc12_20.3: init %.2 = struct_init (%.loc12_20.2) to file.%y.var -// CHECK:STDOUT: %.loc12_21: init %.2 = converted %x.ref, %.loc12_20.3 +// CHECK:STDOUT: %.loc12_20.3: init %.1 = struct_init (%.loc12_20.2) to file.%y.var +// CHECK:STDOUT: %.loc12_21: init %.1 = converted %x.ref, %.loc12_20.3 // CHECK:STDOUT: assign file.%y.var, %.loc12_21 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index ed677faf54bf..af566f8cf4ec 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -21,21 +21,21 @@ fn F() -> {.a: i32, .b: f64} { // 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: %MakeI32.type: type = fn_type @MakeI32 [template] // CHECK:STDOUT: %MakeI32: %MakeI32.type = struct_value () [template] -// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.1: 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: %MakeF64.type: type = fn_type @MakeF64 [template] // CHECK:STDOUT: %MakeF64: %MakeF64.type = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: f64} [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: f64} [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: %.5: type = struct_type {.b: f64, .a: i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = struct_type {.b: f64, .a: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,7 +71,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_17.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_17.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_17.1) [template = f64] // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_17.3: type = converted %float.make_type, %.loc12_17.2 [template = f64] @@ -79,19 +79,19 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } // 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: %.2 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_16.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_16.2: type = converted %int.make_type_32.loc14, %.loc14_16.1 [template = i32] -// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%.loc14_25.1) [template = f64] // CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %float.make_type.loc14 [template = f64] // CHECK:STDOUT: %.loc14_25.3: type = converted %float.make_type.loc14, %.loc14_25.2 [template = f64] -// CHECK:STDOUT: %.loc14_28: type = struct_type {.a: i32, .b: f64} [template = constants.%.3] -// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param +// CHECK:STDOUT: %.loc14_28: type = struct_type {.a: i32, .b: f64} [template = constants.%.2] +// CHECK:STDOUT: %return.param: ref %.2 = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %.2 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -103,51 +103,51 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeF64() -> f64; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %return: %.3 { +// CHECK:STDOUT: fn @F() -> %return: %.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_15.2: type = converted %int.make_type_32.loc15, %.loc15_15.1 [template = i32] -// CHECK:STDOUT: %.loc15_24.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_24.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%.loc15_24.1) [template = f64] // CHECK:STDOUT: %.loc15_24.2: type = value_of_initializer %float.make_type.loc15 [template = f64] // CHECK:STDOUT: %.loc15_24.3: type = converted %float.make_type.loc15, %.loc15_24.2 [template = f64] -// CHECK:STDOUT: %.loc15_27: type = struct_type {.a: i32, .b: f64} [template = constants.%.3] +// CHECK:STDOUT: %.loc15_27: type = struct_type {.a: i32, .b: f64} [template = constants.%.2] // CHECK:STDOUT: %MakeF64.ref: %MakeF64.type = name_ref MakeF64, file.%MakeF64.decl [template = constants.%MakeF64] // CHECK:STDOUT: %MakeF64.call: init f64 = call %MakeF64.ref() // CHECK:STDOUT: %MakeI32.ref: %MakeI32.type = name_ref MakeI32, file.%MakeI32.decl [template = constants.%MakeI32] // CHECK:STDOUT: %MakeI32.call: init i32 = call %MakeI32.ref() -// CHECK:STDOUT: %.loc15_62.1: %.5 = struct_literal (%MakeF64.call, %MakeI32.call) +// CHECK:STDOUT: %.loc15_62.1: %.4 = struct_literal (%MakeF64.call, %MakeI32.call) // CHECK:STDOUT: %.loc15_62.2: i32 = value_of_initializer %MakeI32.call // CHECK:STDOUT: %.loc15_62.3: i32 = converted %MakeI32.call, %.loc15_62.2 // CHECK:STDOUT: %.loc15_62.4: f64 = value_of_initializer %MakeF64.call // CHECK:STDOUT: %.loc15_62.5: f64 = converted %MakeF64.call, %.loc15_62.4 -// CHECK:STDOUT: %struct.loc15: %.3 = struct_value (%.loc15_62.3, %.loc15_62.5) -// CHECK:STDOUT: %.loc15_63: %.3 = converted %.loc15_62.1, %struct.loc15 -// CHECK:STDOUT: %x: %.3 = bind_name x, %.loc15_63 -// CHECK:STDOUT: %.loc16_15.1: Core.IntLiteral = int_value 64 [template = constants.%.2] +// CHECK:STDOUT: %struct.loc15: %.2 = struct_value (%.loc15_62.3, %.loc15_62.5) +// CHECK:STDOUT: %.loc15_63: %.2 = converted %.loc15_62.1, %struct.loc15 +// CHECK:STDOUT: %x: %.2 = bind_name x, %.loc15_63 +// CHECK:STDOUT: %.loc16_15.1: Core.IntLiteral = int_value 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%.loc16_15.1) [template = f64] // CHECK:STDOUT: %.loc16_15.2: type = value_of_initializer %float.make_type.loc16 [template = f64] // CHECK:STDOUT: %.loc16_15.3: type = converted %float.make_type.loc16, %.loc16_15.2 [template = f64] // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_24.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_24.2: type = converted %int.make_type_32.loc16, %.loc16_24.1 [template = i32] -// CHECK:STDOUT: %.loc16_27: type = struct_type {.b: f64, .a: i32} [template = constants.%.5] -// CHECK:STDOUT: %x.ref: %.3 = name_ref x, %x +// CHECK:STDOUT: %.loc16_27: type = struct_type {.b: f64, .a: i32} [template = constants.%.4] +// CHECK:STDOUT: %x.ref: %.2 = name_ref x, %x // CHECK:STDOUT: %.loc16_31.1: f64 = struct_access %x.ref, element1 // CHECK:STDOUT: %.loc16_31.2: i32 = struct_access %x.ref, element0 -// CHECK:STDOUT: %struct.loc16: %.5 = struct_value (%.loc16_31.1, %.loc16_31.2) -// CHECK:STDOUT: %.loc16_32: %.5 = converted %x.ref, %struct.loc16 -// CHECK:STDOUT: %y: %.5 = bind_name y, %.loc16_32 -// CHECK:STDOUT: %y.ref: %.5 = name_ref y, %y +// CHECK:STDOUT: %struct.loc16: %.4 = struct_value (%.loc16_31.1, %.loc16_31.2) +// CHECK:STDOUT: %.loc16_32: %.4 = converted %x.ref, %struct.loc16 +// CHECK:STDOUT: %y: %.4 = bind_name y, %.loc16_32 +// CHECK:STDOUT: %y.ref: %.4 = name_ref y, %y // CHECK:STDOUT: %.loc17_10.1: i32 = struct_access %y.ref, element1 // CHECK:STDOUT: %.loc17_10.2: ref i32 = struct_access %return, element1 // CHECK:STDOUT: %.loc17_10.3: init i32 = initialize_from %.loc17_10.1 to %.loc17_10.2 // CHECK:STDOUT: %.loc17_10.4: f64 = struct_access %y.ref, element0 // CHECK:STDOUT: %.loc17_10.5: ref f64 = struct_access %return, element0 // CHECK:STDOUT: %.loc17_10.6: init f64 = initialize_from %.loc17_10.4 to %.loc17_10.5 -// CHECK:STDOUT: %.loc17_10.7: init %.3 = struct_init (%.loc17_10.3, %.loc17_10.6) to %return -// CHECK:STDOUT: %.loc17_11: init %.3 = converted %y.ref, %.loc17_10.7 +// CHECK:STDOUT: %.loc17_10.7: init %.2 = struct_init (%.loc17_10.3, %.loc17_10.6) to %return +// CHECK:STDOUT: %.loc17_11: init %.2 = converted %y.ref, %.loc17_10.7 // CHECK:STDOUT: return %.loc17_11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index a9b0bb7d6005..1e0e2880f79b 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -15,16 +15,16 @@ var y: {.a: i32, .b: (i32,)} = x; // 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: %.4: type = struct_type {.a: i32, .b: %.3} [template] -// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_value 1 [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.7) [template] -// CHECK:STDOUT: %struct: %.4 = struct_value (%.6, %tuple) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: %tuple.type.2} [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.4) [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.3, %tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,57 +47,57 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11_13 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11_13, %.loc11_13.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_27.1: %.2 = tuple_literal (%int.make_type_32.loc11_23) +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_23) // CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32] // CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_32.loc11_23, %.loc11_27.2 [template = i32] -// CHECK:STDOUT: %.loc11_27.4: type = converted %.loc11_27.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_28: type = struct_type {.a: i32, .b: %.3} [template = constants.%.4] -// CHECK:STDOUT: %x.var: ref %.4 = var x -// CHECK:STDOUT: %x: ref %.4 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_27.4: type = converted %.loc11_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc11_28: type = struct_type {.a: i32, .b: %tuple.type.2} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12_13 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12_13, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_23: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_27.1: %.2 = tuple_literal (%int.make_type_32.loc12_23) +// CHECK:STDOUT: %.loc12_27.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12_23) // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_32.loc12_23 [template = i32] // CHECK:STDOUT: %.loc12_27.3: type = converted %int.make_type_32.loc12_23, %.loc12_27.2 [template = i32] -// CHECK:STDOUT: %.loc12_27.4: type = converted %.loc12_27.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_28: type = struct_type {.a: i32, .b: %.3} [template = constants.%.4] -// CHECK:STDOUT: %y.var: ref %.4 = var y -// CHECK:STDOUT: %y: ref %.4 = bind_name y, %y.var +// CHECK:STDOUT: %.loc12_27.4: type = converted %.loc12_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc12_28: type = struct_type {.a: i32, .b: %tuple.type.2} [template = constants.%.1] +// CHECK:STDOUT: %y.var: ref %.1 = var y +// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.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_38: i32 = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_47: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_49.1: %.3 = tuple_literal (%.loc11_47) -// CHECK:STDOUT: %.loc11_50.1: %.4 = struct_literal (%.loc11_38, %.loc11_49.1) +// CHECK:STDOUT: %.loc11_38: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_47: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_49.1: %tuple.type.2 = tuple_literal (%.loc11_47) +// CHECK:STDOUT: %.loc11_50.1: %.1 = struct_literal (%.loc11_38, %.loc11_49.1) // CHECK:STDOUT: %.loc11_50.2: ref i32 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_50.3: init i32 = initialize_from %.loc11_38 to %.loc11_50.2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_50.4: ref %.3 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_49.2: init %.3 = tuple_init (%.loc11_47) to %.loc11_50.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.5: init %.3 = converted %.loc11_49.1, %.loc11_49.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.6: init %.3 = initialize_from %.loc11_50.5 to %.loc11_50.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.7: init %.4 = struct_init (%.loc11_50.3, %.loc11_50.6) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_51: init %.4 = converted %.loc11_50.1, %.loc11_50.7 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_50.3: init i32 = initialize_from %.loc11_38 to %.loc11_50.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_50.4: ref %tuple.type.2 = struct_access file.%x.var, element1 +// CHECK:STDOUT: %.loc11_49.2: init %tuple.type.2 = tuple_init (%.loc11_47) to %.loc11_50.4 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_50.5: init %tuple.type.2 = converted %.loc11_49.1, %.loc11_49.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_50.6: init %tuple.type.2 = initialize_from %.loc11_50.5 to %.loc11_50.4 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_50.7: init %.1 = struct_init (%.loc11_50.3, %.loc11_50.6) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_51: init %.1 = converted %.loc11_50.1, %.loc11_50.7 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_51 -// CHECK:STDOUT: %x.ref: ref %.4 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x // CHECK:STDOUT: %.loc12_32.1: ref i32 = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc12_32.2: i32 = bind_value %.loc12_32.1 // CHECK:STDOUT: %.loc12_32.3: ref i32 = struct_access file.%y.var, element0 // CHECK:STDOUT: %.loc12_32.4: init i32 = initialize_from %.loc12_32.2 to %.loc12_32.3 -// CHECK:STDOUT: %.loc12_32.5: ref %.3 = struct_access %x.ref, element1 +// CHECK:STDOUT: %.loc12_32.5: ref %tuple.type.2 = struct_access %x.ref, element1 // CHECK:STDOUT: %.loc12_32.6: ref i32 = tuple_access %.loc12_32.5, element0 // CHECK:STDOUT: %.loc12_32.7: i32 = bind_value %.loc12_32.6 -// CHECK:STDOUT: %.loc12_32.8: ref %.3 = struct_access file.%y.var, element1 -// CHECK:STDOUT: %.loc12_32.9: init %.3 = tuple_init (%.loc12_32.7) to %.loc12_32.8 -// CHECK:STDOUT: %.loc12_32.10: init %.3 = converted %.loc12_32.5, %.loc12_32.9 -// CHECK:STDOUT: %.loc12_32.11: init %.3 = initialize_from %.loc12_32.10 to %.loc12_32.8 -// CHECK:STDOUT: %.loc12_32.12: init %.4 = struct_init (%.loc12_32.4, %.loc12_32.11) to file.%y.var -// CHECK:STDOUT: %.loc12_33: init %.4 = converted %x.ref, %.loc12_32.12 +// CHECK:STDOUT: %.loc12_32.8: ref %tuple.type.2 = struct_access file.%y.var, element1 +// CHECK:STDOUT: %.loc12_32.9: init %tuple.type.2 = tuple_init (%.loc12_32.7) to %.loc12_32.8 +// CHECK:STDOUT: %.loc12_32.10: init %tuple.type.2 = converted %.loc12_32.5, %.loc12_32.9 +// CHECK:STDOUT: %.loc12_32.11: init %tuple.type.2 = initialize_from %.loc12_32.10 to %.loc12_32.8 +// CHECK:STDOUT: %.loc12_32.12: init %.1 = struct_init (%.loc12_32.4, %.loc12_32.11) to file.%y.var +// CHECK:STDOUT: %.loc12_33: init %.1 = converted %x.ref, %.loc12_32.12 // CHECK:STDOUT: assign file.%y.var, %.loc12_33 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 95516dfbaaa7..05b74f73bee7 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -18,13 +18,13 @@ var y: {.a: i32, .b: i32} = x; // 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 = struct_type {.a: i32, .b: 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: %struct: %.2 = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.2: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,57 +51,57 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11_22 [template = i32] // CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11_22, %.loc11_22.1 [template = i32] -// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] +// CHECK:STDOUT: %.loc11_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12_13 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12_13, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_32.loc12_22 [template = i32] // CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_32.loc12_22, %.loc12_22.1 [template = i32] -// CHECK:STDOUT: %.loc12_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] +// CHECK:STDOUT: %.loc12_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] // CHECK:STDOUT: %int.make_type_32.loc14_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14_13 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14_13, %.loc14_13.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32] // CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_32.loc14_22, %.loc14_22.1 [template = i32] -// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc15_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15_13 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15_13, %.loc15_13.1 [template = i32] // CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32] // CHECK:STDOUT: %.loc15_22.2: type = converted %int.make_type_32.loc15_22, %.loc15_22.1 [template = i32] -// CHECK:STDOUT: %.loc15_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var +// CHECK:STDOUT: %.loc15_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.1] +// CHECK:STDOUT: %y.var: ref %.1 = var y +// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.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_35: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_43: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_44: %.2 = struct_literal (%.loc11_35, %.loc11_43) -// CHECK:STDOUT: %struct: %.2 = struct_value (%.loc11_35, %.loc11_43) [template = constants.%struct] -// CHECK:STDOUT: %.loc11_45: %.2 = converted %.loc11_44, %struct [template = constants.%struct] -// CHECK:STDOUT: %v: %.2 = bind_name v, %.loc11_45 -// CHECK:STDOUT: %v.ref: %.2 = name_ref v, %v -// CHECK:STDOUT: %w: %.2 = bind_name w, %v.ref -// CHECK:STDOUT: %.loc14_35: i32 = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_43: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_44.1: %.2 = struct_literal (%.loc14_35, %.loc14_43) +// CHECK:STDOUT: %.loc11_35: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_43: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_44: %.1 = struct_literal (%.loc11_35, %.loc11_43) +// CHECK:STDOUT: %struct: %.1 = struct_value (%.loc11_35, %.loc11_43) [template = constants.%struct] +// CHECK:STDOUT: %.loc11_45: %.1 = converted %.loc11_44, %struct [template = constants.%struct] +// CHECK:STDOUT: %v: %.1 = bind_name v, %.loc11_45 +// CHECK:STDOUT: %v.ref: %.1 = name_ref v, %v +// CHECK:STDOUT: %w: %.1 = bind_name w, %v.ref +// CHECK:STDOUT: %.loc14_35: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_43: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_44.1: %.1 = struct_literal (%.loc14_35, %.loc14_43) // CHECK:STDOUT: %.loc14_44.2: ref i32 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc14_44.3: init i32 = initialize_from %.loc14_35 to %.loc14_44.2 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_44.3: init i32 = initialize_from %.loc14_35 to %.loc14_44.2 [template = constants.%.3] // CHECK:STDOUT: %.loc14_44.4: ref i32 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc14_44.5: init i32 = initialize_from %.loc14_43 to %.loc14_44.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_44.6: init %.2 = struct_init (%.loc14_44.3, %.loc14_44.5) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_45: init %.2 = converted %.loc14_44.1, %.loc14_44.6 [template = constants.%struct] +// CHECK:STDOUT: %.loc14_44.5: init i32 = initialize_from %.loc14_43 to %.loc14_44.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_44.6: init %.1 = struct_init (%.loc14_44.3, %.loc14_44.5) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_45: init %.1 = converted %.loc14_44.1, %.loc14_44.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc14_45 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x // CHECK:STDOUT: %.loc15_29.1: ref i32 = struct_access %x.ref, element0 // CHECK:STDOUT: %.loc15_29.2: i32 = bind_value %.loc15_29.1 // CHECK:STDOUT: %.loc15_29.3: ref i32 = struct_access file.%y.var, element0 @@ -110,8 +110,8 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc15_29.6: i32 = bind_value %.loc15_29.5 // CHECK:STDOUT: %.loc15_29.7: ref i32 = struct_access file.%y.var, element1 // CHECK:STDOUT: %.loc15_29.8: init i32 = initialize_from %.loc15_29.6 to %.loc15_29.7 -// CHECK:STDOUT: %.loc15_29.9: init %.2 = struct_init (%.loc15_29.4, %.loc15_29.8) to file.%y.var -// CHECK:STDOUT: %.loc15_30: init %.2 = converted %x.ref, %.loc15_29.9 +// CHECK:STDOUT: %.loc15_29.9: init %.1 = struct_init (%.loc15_29.4, %.loc15_29.8) to file.%y.var +// CHECK:STDOUT: %.loc15_30: init %.1 = converted %x.ref, %.loc15_29.9 // CHECK:STDOUT: assign file.%y.var, %.loc15_30 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index fbb8105fd507..c4a673589e57 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -16,13 +16,13 @@ var c: i32 = b.0; // 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: %.4: i32 = int_value 12 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] -// CHECK:STDOUT: %.5: i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.1) [template] +// CHECK:STDOUT: %.2: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,19 +43,19 @@ var c: i32 = b.0; // 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_13.1: %.2 = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_32.loc11, %.loc11_13.2 [template = i32] -// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.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_13.4: type = converted %.loc11_13.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_13.1: %.2 = tuple_literal (%int.make_type_32.loc12) +// CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_32.loc12, %.loc12_13.2 [template = i32] -// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %b.var: ref %.3 = var b -// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var +// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b +// CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] @@ -67,19 +67,19 @@ var c: i32 = b.0; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_18: i32 = int_value 12 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_21.1: %.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: init %.3 = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_22: init %.3 = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_18: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_21.1: %tuple.type.2 = tuple_literal (%.loc11_18) +// CHECK:STDOUT: %.loc11_21.2: init %tuple.type.2 = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_22 -// 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_17.1: ref i32 = tuple_access %a.ref, element0 // CHECK:STDOUT: %.loc12_17.2: i32 = bind_value %.loc12_17.1 -// CHECK:STDOUT: %.loc12_17.3: init %.3 = tuple_init (%.loc12_17.2) to file.%b.var -// CHECK:STDOUT: %.loc12_18: init %.3 = converted %a.ref, %.loc12_17.3 +// CHECK:STDOUT: %.loc12_17.3: init %tuple.type.2 = tuple_init (%.loc12_17.2) to file.%b.var +// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.3 // CHECK:STDOUT: assign file.%b.var, %.loc12_18 -// CHECK:STDOUT: %b.ref: ref %.3 = name_ref b, file.%b -// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.5] +// CHECK:STDOUT: %b.ref: ref %tuple.type.2 = name_ref b, file.%b +// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc13_15.1: ref i32 = tuple_access %b.ref, element0 // CHECK:STDOUT: %.loc13_15.2: i32 = bind_value %.loc13_15.1 // CHECK:STDOUT: assign file.%c.var, %.loc13_15.2 diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index bd36e5e748b6..1d171ad18384 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -18,14 +18,14 @@ var b: i32 = a.(oops); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,14 +46,14 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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.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] @@ -65,17 +65,17 @@ var b: i32 = a.(oops); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_26) // CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_27.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.6: init %.3 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 -// 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: %oops.ref: = name_ref oops, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon index f22af7e438d6..aa1bb2611e21 100644 --- a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon @@ -21,11 +21,11 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -54,10 +54,10 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() -// CHECK:STDOUT: %.loc17_7: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc17_4.1: ref %.1 = temporary_storage -// CHECK:STDOUT: %.loc17_4.2: ref %.1 = temporary %.loc17_4.1, %F.call +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() +// CHECK:STDOUT: %.loc17_7: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_4.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc17_4.2: ref %empty_tuple.type = temporary %.loc17_4.1, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index 32b4694fc3b5..e4a6f2179a40 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -24,14 +24,14 @@ var d: i32 = b.(0x7FFF_FFFF); // 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: %.4: i32 = int_value 12 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] -// CHECK:STDOUT: %.6: i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 12 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.1) [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,19 +53,19 @@ var d: i32 = b.(0x7FFF_FFFF); // 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_13.1: %.2 = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_32.loc11, %.loc11_13.2 [template = i32] -// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.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_13.4: type = converted %.loc11_13.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_13.1: %.2 = tuple_literal (%int.make_type_32.loc12) +// CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_32.loc12, %.loc12_13.2 [template = i32] -// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %b.var: ref %.3 = var b -// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var +// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b +// CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_32.loc17, %.loc17_8.1 [template = i32] @@ -82,22 +82,22 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_18: i32 = int_value 12 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_21.1: %.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: init %.3 = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_22: init %.3 = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_18: i32 = int_value 12 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_21.1: %tuple.type.2 = tuple_literal (%.loc11_18) +// CHECK:STDOUT: %.loc11_21.2: init %tuple.type.2 = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_22 -// 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_17.1: ref i32 = tuple_access %a.ref, element0 // CHECK:STDOUT: %.loc12_17.2: i32 = bind_value %.loc12_17.1 -// CHECK:STDOUT: %.loc12_17.3: init %.3 = tuple_init (%.loc12_17.2) to file.%b.var -// CHECK:STDOUT: %.loc12_18: init %.3 = converted %a.ref, %.loc12_17.3 +// CHECK:STDOUT: %.loc12_17.3: init %tuple.type.2 = tuple_init (%.loc12_17.2) to file.%b.var +// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.3 // CHECK:STDOUT: assign file.%b.var, %.loc12_18 -// CHECK:STDOUT: %b.ref.loc17: ref %.3 = name_ref b, file.%b -// CHECK:STDOUT: %.loc17: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.2 = name_ref b, file.%b +// CHECK:STDOUT: %.loc17: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: assign file.%c.var, -// CHECK:STDOUT: %b.ref.loc21: ref %.3 = name_ref b, file.%b -// CHECK:STDOUT: %.loc21: i32 = int_value 2147483647 [template = constants.%.6] +// CHECK:STDOUT: %b.ref.loc21: ref %tuple.type.2 = name_ref b, file.%b +// CHECK:STDOUT: %.loc21: i32 = int_value 2147483647 [template = constants.%.3] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index 0539143b7e18..c59c4633a949 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -18,21 +18,21 @@ var b: i32 = a.(-10); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: i32 = int_value 10 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: i32 = int_value 10 [template] // CHECK:STDOUT: %Negate.type: type = interface_type @Negate [template] // CHECK:STDOUT: %Self: %Negate.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %Negate.type, %Op.type [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %Negate.type, %Op.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -45,7 +45,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref Core//prelude/operators/arithmetic, inst+85, loaded [template = constants.%Negate.type] // CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/arithmetic, inst+87, unloaded -// CHECK:STDOUT: %import_ref.4: %.8 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//prelude/operators/arithmetic, inst+108, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/arithmetic, inst+103, unloaded // CHECK:STDOUT: } @@ -59,14 +59,14 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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.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] @@ -91,18 +91,18 @@ var b: i32 = a.(-10); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_26) // CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_27.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.6: init %.3 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: i32 = int_value 10 [template = constants.%.7] +// CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc15: i32 = int_value 10 [template = constants.%.4] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index 381273852499..95f548615f23 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -19,15 +19,15 @@ var c: i32 = a.(b); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, 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: %tuple: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,14 +49,14 @@ var c: i32 = a.(b); // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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_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] @@ -73,19 +73,19 @@ var c: i32 = a.(b); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_25: i32 = int_value 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.1: %.3 = tuple_literal (%.loc11_22, %.loc11_25) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_25: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_25) // CHECK:STDOUT: %.loc11_26.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_26.3: init i32 = initialize_from %.loc11_22 to %.loc11_26.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_26.3: init i32 = initialize_from %.loc11_22 to %.loc11_26.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_26.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_26.5: init i32 = initialize_from %.loc11_25 to %.loc11_26.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.6: init %.3 = tuple_init (%.loc11_26.3, %.loc11_26.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_26.5: init i32 = initialize_from %.loc11_25 to %.loc11_26.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_26.6: init %tuple.type.2 = tuple_init (%.loc11_26.3, %.loc11_26.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_27: init %tuple.type.2 = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 -// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.7] +// CHECK:STDOUT: %.loc12: i32 = int_value 0 [template = constants.%.4] // CHECK:STDOUT: assign file.%b.var, %.loc12 -// 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: %b.ref: ref i32 = name_ref b, file.%b // CHECK:STDOUT: %.loc16: i32 = bind_value %b.ref // CHECK:STDOUT: assign file.%c.var, diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index a3201db0bac5..6eff772233da 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -21,15 +21,15 @@ var b: i32 = a.(2.6); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: f64 = float_literal 2.6000000000000001 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: f64 = float_literal 2.6000000000000001 [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] @@ -39,14 +39,14 @@ var b: i32 = a.(2.6); // 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: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = 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: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,7 +59,7 @@ var b: i32 = a.(2.6); // 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 (%.8) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // 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 @@ -74,14 +74,14 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_8.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_8.2: type = converted %int.make_type_32.loc18, %.loc18_8.1 [template = i32] @@ -98,8 +98,8 @@ var b: i32 = a.(2.6); // 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.%.8)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -121,18 +121,18 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_26) // CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_27.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.6: init %.3 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.7] +// CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.4] // CHECK:STDOUT: %.loc18_17.2: i32 = converted %.loc18_17.1, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return @@ -168,7 +168,7 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.10 -// CHECK:STDOUT: %.2 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon index 1e85149ddec3..e971551a1490 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -26,10 +26,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_value 0 [template] -// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %ElementType: type = bind_symbolic_name ElementType, 1 [symbolic] @@ -41,16 +41,16 @@ fn Main() { // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic] // CHECK:STDOUT: %At: %At.type = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.2, %At.type [symbolic] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.6: i32 = int_value 2 [template] -// CHECK:STDOUT: %.7: type = array_type %.6, i32 [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] -// CHECK:STDOUT: %.9: i32 = int_value 5 [template] -// CHECK:STDOUT: %.10: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %array: %.7 = tuple_value (%.9, %.9) [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] +// CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.8: i32 = int_value 5 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %array: %.6 = tuple_value (%.8, %.8) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,8 +88,8 @@ fn Main() { // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 2 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %At.type: type = fn_type @At, @IndexWith(%SubscriptType, %ElementType) [symbolic = %At.type (constants.%At.type)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type) = struct_value () [symbolic = %At (constants.%At)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.2: @IndexWith.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -101,34 +101,34 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_3: i32 = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_5: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc16_3: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_5: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_24: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_24: i32 = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_19.2: type = converted %int.make_type_32.loc18, %.loc18_19.1 [template = i32] -// CHECK:STDOUT: %.loc18_25: type = array_type %.loc18_24, i32 [template = constants.%.7] -// CHECK:STDOUT: %non_tuple.var: ref %.7 = var non_tuple -// CHECK:STDOUT: %non_tuple: ref %.7 = bind_name non_tuple, %non_tuple.var -// CHECK:STDOUT: %.loc18_30: i32 = int_value 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_33: i32 = int_value 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_34.1: %.10 = tuple_literal (%.loc18_30, %.loc18_33) -// CHECK:STDOUT: %.loc18_34.2: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_25: type = array_type %.loc18_24, i32 [template = constants.%.6] +// CHECK:STDOUT: %non_tuple.var: ref %.6 = var non_tuple +// CHECK:STDOUT: %non_tuple: ref %.6 = bind_name non_tuple, %non_tuple.var +// CHECK:STDOUT: %.loc18_30: i32 = int_value 5 [template = constants.%.8] +// CHECK:STDOUT: %.loc18_33: i32 = int_value 5 [template = constants.%.8] +// CHECK:STDOUT: %.loc18_34.1: %tuple.type = tuple_literal (%.loc18_30, %.loc18_33) +// CHECK:STDOUT: %.loc18_34.2: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %.loc18_34.3: ref i32 = array_index %non_tuple.var, %.loc18_34.2 -// CHECK:STDOUT: %.loc18_34.4: init i32 = initialize_from %.loc18_30 to %.loc18_34.3 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_34.5: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc18_34.4: init i32 = initialize_from %.loc18_30 to %.loc18_34.3 [template = constants.%.8] +// CHECK:STDOUT: %.loc18_34.5: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_34.6: ref i32 = array_index %non_tuple.var, %.loc18_34.5 -// CHECK:STDOUT: %.loc18_34.7: init i32 = initialize_from %.loc18_33 to %.loc18_34.6 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_34.8: init %.7 = array_init (%.loc18_34.4, %.loc18_34.7) to %non_tuple.var [template = constants.%array] -// CHECK:STDOUT: %.loc18_35: init %.7 = converted %.loc18_34.1, %.loc18_34.8 [template = constants.%array] +// CHECK:STDOUT: %.loc18_34.7: init i32 = initialize_from %.loc18_33 to %.loc18_34.6 [template = constants.%.8] +// CHECK:STDOUT: %.loc18_34.8: init %.6 = array_init (%.loc18_34.4, %.loc18_34.7) to %non_tuple.var [template = constants.%array] +// CHECK:STDOUT: %.loc18_35: init %.6 = converted %.loc18_34.1, %.loc18_34.8 [template = constants.%array] // CHECK:STDOUT: assign %non_tuple.var, %.loc18_35 // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_14.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_32.loc22, %.loc22_14.1 [template = i32] // CHECK:STDOUT: %first.var: ref i32 = var first // CHECK:STDOUT: %first: ref i32 = bind_name first, %first.var -// CHECK:STDOUT: %non_tuple.ref: ref %.7 = name_ref non_tuple, %non_tuple -// CHECK:STDOUT: %.loc22_30: i32 = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %non_tuple.ref: ref %.6 = name_ref non_tuple, %non_tuple +// CHECK:STDOUT: %.loc22_30: i32 = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign %first.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon index 9728bff86e02..c325b47a88c6 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon @@ -18,15 +18,15 @@ var b: i32 = a.2; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,14 +47,14 @@ var b: i32 = a.2; // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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.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,18 +66,18 @@ var b: i32 = a.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 6 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_26) // CHECK:STDOUT: %.loc11_27.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_27.3: init i32 = initialize_from %.loc11_22 to %.loc11_27.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_27.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.6: init %.3 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_27.5: init i32 = initialize_from %.loc11_26 to %.loc11_27.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_27.6: init %tuple.type.2 = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc15: i32 = int_value 2 [template = constants.%.4] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index 3cf3ee1fd68f..0670e4fa12b1 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon @@ -18,17 +18,17 @@ 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: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 34 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: i32 = int_value 2 [template] -// CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct: %.8 = struct_value (%.7) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: i32 = int_value 34 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %.5: type = struct_type {.index: i32} [template] +// CHECK:STDOUT: %struct: %.5 = struct_value (%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,14 +49,14 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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.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] @@ -68,22 +68,22 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 34 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 34 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_28.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_26) // CHECK:STDOUT: %.loc11_28.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_28.3: init i32 = initialize_from %.loc11_22 to %.loc11_28.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_28.3: init i32 = initialize_from %.loc11_22 to %.loc11_28.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_28.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_28.5: init i32 = initialize_from %.loc11_26 to %.loc11_28.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28.6: init %.3 = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: init %.3 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28.5: init i32 = initialize_from %.loc11_26 to %.loc11_28.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_28.6: init %tuple.type.2 = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_29 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15_27: i32 = int_value 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_28.1: %.8 = struct_literal (%.loc15_27) -// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc15_27) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_28.2: %.8 = converted %.loc15_28.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc15_29: i32 = struct_access %.loc15_28.2, element0 [template = constants.%.7] +// CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc15_27: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc15_28.1: %.5 = struct_literal (%.loc15_27) +// CHECK:STDOUT: %struct: %.5 = struct_value (%.loc15_27) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_28.2: %.5 = converted %.loc15_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_29: i32 = struct_access %.loc15_28.2, element0 [template = constants.%.4] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index ac976b883e68..6bea14d773e5 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -15,17 +15,17 @@ var b: i32 = a.({.index = 1}.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: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 12 [template] -// CHECK:STDOUT: %.6: i32 = int_value 34 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %.7: i32 = int_value 1 [template] -// CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct: %.8 = struct_value (%.7) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 12 [template] +// CHECK:STDOUT: %.3: i32 = int_value 34 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: type = struct_type {.index: i32} [template] +// CHECK:STDOUT: %struct: %.5 = struct_value (%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,14 +46,14 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.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_17.6: type = converted %.loc11_17.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_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] @@ -65,22 +65,22 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_26: i32 = int_value 34 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28.1: %.3 = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 12 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_26: i32 = int_value 34 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_28.1: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_26) // CHECK:STDOUT: %.loc11_28.2: ref i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_28.3: init i32 = initialize_from %.loc11_22 to %.loc11_28.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_28.3: init i32 = initialize_from %.loc11_22 to %.loc11_28.2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_28.4: ref i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_28.5: init i32 = initialize_from %.loc11_26 to %.loc11_28.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28.6: init %.3 = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: init %.3 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_28.5: init i32 = initialize_from %.loc11_26 to %.loc11_28.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_28.6: init %tuple.type.2 = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_29 -// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_27: i32 = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_28.1: %.8 = struct_literal (%.loc12_27) -// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc12_27) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_28.2: %.8 = converted %.loc12_28.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc12_29: i32 = struct_access %.loc12_28.2, element0 [template = constants.%.7] +// CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a +// CHECK:STDOUT: %.loc12_27: i32 = int_value 1 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_28.1: %.5 = struct_literal (%.loc12_27) +// CHECK:STDOUT: %struct: %.5 = struct_value (%.loc12_27) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_28.2: %.5 = converted %.loc12_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_29: i32 = struct_access %.loc12_28.2, element0 [template = constants.%.4] // CHECK:STDOUT: %.loc12_15.1: ref i32 = tuple_access %a.ref, element1 // CHECK:STDOUT: %.loc12_15.2: i32 = bind_value %.loc12_15.1 // CHECK:STDOUT: assign file.%b.var, %.loc12_15.2 diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index 159d004329b5..a93cdfa7a1ef 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -18,14 +18,14 @@ fn Run() -> 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: 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: } @@ -47,16 +47,16 @@ fn Run() -> i32 { // 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: %return.patt: i32 = return_slot_pattern @@ -72,22 +72,22 @@ fn Run() -> i32 { // 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() -> i32 { // CHECK:STDOUT: !entry: // 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_14: i32 = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_11.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %.loc14_11.2: ref %.3 = temporary %.loc14_11.1, %F.call +// CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() +// CHECK:STDOUT: %.loc14_14: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_11.1: ref %tuple.type.2 = temporary_storage +// CHECK:STDOUT: %.loc14_11.2: ref %tuple.type.2 = temporary %.loc14_11.1, %F.call // CHECK:STDOUT: %.loc14_13.1: ref i32 = tuple_access %.loc14_11.2, element0 // CHECK:STDOUT: %.loc14_13.2: i32 = bind_value %.loc14_13.1 // CHECK:STDOUT: return %.loc14_13.2 diff --git a/toolchain/check/testdata/tuple/fail_assign_nested.carbon b/toolchain/check/testdata/tuple/fail_assign_nested.carbon index b52b39c3a607..d90dbac256c0 100644 --- a/toolchain/check/testdata/tuple/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuple/fail_assign_nested.carbon @@ -17,23 +17,23 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (%.2, %.2) [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%.4, %.4) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.6, %.6) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] -// CHECK:STDOUT: %.9: i32 = int_value 1 [template] -// CHECK:STDOUT: %.10: i32 = int_value 2 [template] -// CHECK:STDOUT: %.11: i32 = int_value 3 [template] -// CHECK:STDOUT: %.12: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.13: i32 = int_value 4 [template] -// CHECK:STDOUT: %.14: i32 = int_value 5 [template] -// CHECK:STDOUT: %.15: i32 = int_value 6 [template] -// CHECK:STDOUT: %.16: type = tuple_type (%.12, %.12) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, %tuple.type.1) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.3, %tuple.type.3) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.3 [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.1, %.1) [template] +// CHECK:STDOUT: %.2: type = ptr_type %tuple.type.5 [template] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple.type.6: type = tuple_type (i32, i32, i32) [template] +// CHECK:STDOUT: %.6: i32 = int_value 4 [template] +// CHECK:STDOUT: %.7: i32 = int_value 5 [template] +// CHECK:STDOUT: %.8: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.6, %tuple.type.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,39 +53,39 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_18: %.2 = tuple_literal (%int.make_type_32.loc14_10, %int.make_type_32.loc14_15) +// CHECK:STDOUT: %.loc14_18: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_10, %int.make_type_32.loc14_15) // CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_30: %.2 = tuple_literal (%int.make_type_32.loc14_22, %int.make_type_32.loc14_27) -// CHECK:STDOUT: %.loc14_31.1: %.3 = tuple_literal (%.loc14_18, %.loc14_30) +// CHECK:STDOUT: %.loc14_30: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_22, %int.make_type_32.loc14_27) +// CHECK:STDOUT: %.loc14_31.1: %tuple.type.2 = tuple_literal (%.loc14_18, %.loc14_30) // CHECK:STDOUT: %.loc14_31.2: type = value_of_initializer %int.make_type_32.loc14_10 [template = i32] // CHECK:STDOUT: %.loc14_31.3: type = converted %int.make_type_32.loc14_10, %.loc14_31.2 [template = i32] // CHECK:STDOUT: %.loc14_31.4: type = value_of_initializer %int.make_type_32.loc14_15 [template = i32] // CHECK:STDOUT: %.loc14_31.5: type = converted %int.make_type_32.loc14_15, %.loc14_31.4 [template = i32] -// CHECK:STDOUT: %.loc14_31.6: type = converted %.loc14_18, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_31.6: type = converted %.loc14_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %.loc14_31.7: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32] // CHECK:STDOUT: %.loc14_31.8: type = converted %int.make_type_32.loc14_22, %.loc14_31.7 [template = i32] // CHECK:STDOUT: %.loc14_31.9: type = value_of_initializer %int.make_type_32.loc14_27 [template = i32] // CHECK:STDOUT: %.loc14_31.10: type = converted %int.make_type_32.loc14_27, %.loc14_31.9 [template = i32] -// CHECK:STDOUT: %.loc14_31.11: type = converted %.loc14_30, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_31.12: type = converted %.loc14_31.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.var: ref %.5 = var x -// CHECK:STDOUT: %x: ref %.5 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_31.11: type = converted %.loc14_30, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %.loc14_31.12: type = converted %.loc14_31.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %x.var: ref %tuple.type.4 = var x +// CHECK:STDOUT: %x: ref %tuple.type.4 = bind_name x, %x.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_37: i32 = int_value 1 [template = constants.%.9] -// CHECK:STDOUT: %.loc14_40: i32 = int_value 2 [template = constants.%.10] -// CHECK:STDOUT: %.loc14_43: i32 = int_value 3 [template = constants.%.11] -// CHECK:STDOUT: %.loc14_44: %.12 = tuple_literal (%.loc14_37, %.loc14_40, %.loc14_43) -// CHECK:STDOUT: %.loc14_48: i32 = int_value 4 [template = constants.%.13] -// CHECK:STDOUT: %.loc14_51: i32 = int_value 5 [template = constants.%.14] -// CHECK:STDOUT: %.loc14_54: i32 = int_value 6 [template = constants.%.15] -// CHECK:STDOUT: %.loc14_55: %.12 = tuple_literal (%.loc14_48, %.loc14_51, %.loc14_54) -// CHECK:STDOUT: %.loc14_56: %.16 = tuple_literal (%.loc14_44, %.loc14_55) +// CHECK:STDOUT: %.loc14_37: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_40: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc14_43: i32 = int_value 3 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_44: %tuple.type.6 = tuple_literal (%.loc14_37, %.loc14_40, %.loc14_43) +// CHECK:STDOUT: %.loc14_48: i32 = int_value 4 [template = constants.%.6] +// CHECK:STDOUT: %.loc14_51: i32 = int_value 5 [template = constants.%.7] +// CHECK:STDOUT: %.loc14_54: i32 = int_value 6 [template = constants.%.8] +// CHECK:STDOUT: %.loc14_55: %tuple.type.6 = tuple_literal (%.loc14_48, %.loc14_51, %.loc14_54) +// CHECK:STDOUT: %.loc14_56: %tuple.type.7 = tuple_literal (%.loc14_44, %.loc14_55) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index 3bd03bb78834..b4f08ef18227 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -20,14 +20,14 @@ var x: (i32, i32) = (2, 65.89); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 2 [template] -// CHECK:STDOUT: %.6: f64 = float_literal 65.890000000000001 [template] -// CHECK:STDOUT: %.7: type = tuple_type (i32, f64) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %.3: f64 = float_literal 65.890000000000001 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32, f64) [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] @@ -37,14 +37,14 @@ var x: (i32, i32) = (2, 65.89); // 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: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = 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: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.12: %.8 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,7 +57,7 @@ var x: (i32, i32) = (2, 65.89); // 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 (%.8) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.12)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // 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 @@ -71,14 +71,14 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc17_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_17.1: %.2 = tuple_literal (%int.make_type_32.loc17_9, %int.make_type_32.loc17_14) +// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc17_9, %int.make_type_32.loc17_14) // CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32] // CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_32.loc17_9, %.loc17_17.2 [template = i32] // CHECK:STDOUT: %.loc17_17.4: type = value_of_initializer %int.make_type_32.loc17_14 [template = i32] // CHECK:STDOUT: %.loc17_17.5: type = converted %int.make_type_32.loc17_14, %.loc17_17.4 [template = i32] -// CHECK:STDOUT: %.loc17_17.6: type = converted %.loc17_17.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc17_17.6: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x +// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -90,8 +90,8 @@ var x: (i32, i32) = (2, 65.89); // 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.%.8)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -113,11 +113,11 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17_22: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_25: f64 = float_literal 65.890000000000001 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_30.1: %.7 = tuple_literal (%.loc17_22, %.loc17_25) +// CHECK:STDOUT: %.loc17_22: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc17_25: f64 = float_literal 65.890000000000001 [template = constants.%.3] +// CHECK:STDOUT: %.loc17_30.1: %tuple.type.3 = tuple_literal (%.loc17_22, %.loc17_25) // CHECK:STDOUT: %.loc17_30.2: ref i32 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc17_30.3: init i32 = initialize_from %.loc17_22 to %.loc17_30.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc17_30.3: init i32 = initialize_from %.loc17_22 to %.loc17_30.2 [template = constants.%.2] // CHECK:STDOUT: %.loc17_30.4: i32 = converted %.loc17_25, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return @@ -153,7 +153,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.10 -// CHECK:STDOUT: %.2 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon index 218b93a422cf..7c54223171cc 100644 --- a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon @@ -25,12 +25,12 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, %Incomplete) [template] -// CHECK:STDOUT: %.4: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.5: i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, %Incomplete) [template] +// CHECK:STDOUT: %.1: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.2: i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,16 +53,16 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc19_24.1: %.2 = tuple_literal (%int.make_type_32, %Incomplete.ref.loc19) +// CHECK:STDOUT: %.loc19_24.1: %tuple.type.1 = tuple_literal (%int.make_type_32, %Incomplete.ref.loc19) // CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_24.3: type = converted %int.make_type_32, %.loc19_24.2 [template = i32] -// CHECK:STDOUT: %.loc19_24.4: type = converted %.loc19_24.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_24.4: type = converted %.loc19_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %t.var: ref = var t // CHECK:STDOUT: %t: ref = bind_name t, %t.var // CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc21: type = ptr_type %Incomplete [template = constants.%.4] -// CHECK:STDOUT: %p.var: ref %.4 = var p -// CHECK:STDOUT: %p: ref %.4 = bind_name p, %p.var +// CHECK:STDOUT: %.loc21: type = ptr_type %Incomplete [template = constants.%.1] +// CHECK:STDOUT: %p.var: ref %.1 = var p +// CHECK:STDOUT: %p: ref %.1 = bind_name p, %p.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; @@ -72,7 +72,7 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref = name_ref t, file.%t -// CHECK:STDOUT: %.loc21_25: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc21_25: i32 = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc21_22: = addr_of [template = ] // CHECK:STDOUT: assign file.%p.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/fail_too_few_element.carbon b/toolchain/check/testdata/tuple/fail_too_few_element.carbon index 09280b614964..0b95e1909893 100644 --- a/toolchain/check/testdata/tuple/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuple/fail_too_few_element.carbon @@ -17,13 +17,13 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 2 [template] -// CHECK:STDOUT: %.6: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,22 +43,22 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_17.1: %.2 = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) +// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_32.loc14_9, %.loc14_17.2 [template = i32] // CHECK:STDOUT: %.loc14_17.4: type = value_of_initializer %int.make_type_32.loc14_14 [template = i32] // CHECK:STDOUT: %.loc14_17.5: type = converted %int.make_type_32.loc14_14, %.loc14_17.4 [template = i32] -// CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x +// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.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_22: i32 = int_value 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: %.6 = tuple_literal (%.loc14_22) +// CHECK:STDOUT: %.loc14_22: i32 = int_value 2 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_25: %tuple.type.3 = tuple_literal (%.loc14_22) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index 4f46a21f9f3a..82e5fca4f0a1 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -20,10 +20,10 @@ var x: (i32, ) = (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: 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: %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] @@ -33,14 +33,14 @@ var x: (i32, ) = (i32, ); // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.2: %.1 = 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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.5: %.1 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ var x: (i32, ) = (i32, ); // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.1) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.5)] // 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 @@ -66,12 +66,12 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_14.1: %.2 = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc17_14.1: %tuple.type.1 = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc17_14.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_14.3: type = converted %int.make_type_32, %.loc17_14.2 [template = i32] -// CHECK:STDOUT: %.loc17_14.4: type = converted %.loc17_14.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc17_14.4: type = converted %.loc17_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x +// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -83,8 +83,8 @@ var x: (i32, ) = (i32, ); // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -107,7 +107,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_24.1: %.2 = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc17_24.1: %tuple.type.1 = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc17_19.1: ref type = temporary_storage // CHECK:STDOUT: %.loc17_19.2: ref type = temporary %.loc17_19.1, %int.make_type_32 // CHECK:STDOUT: %.loc17_24.2: i32 = converted %int.make_type_32, [template = ] @@ -145,7 +145,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.3 +// CHECK:STDOUT: %.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/fail_value_as_type.carbon b/toolchain/check/testdata/tuple/fail_value_as_type.carbon index 036a7d9b0bc4..52b4cf40f18d 100644 --- a/toolchain/check/testdata/tuple/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuple/fail_value_as_type.carbon @@ -20,9 +20,9 @@ var x: (1, ); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_value 1 [template] -// CHECK:STDOUT: %.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32) [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] -// CHECK:STDOUT: %.3: 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] @@ -31,14 +31,14 @@ var x: (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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = 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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: %.4 = 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 { @@ -49,7 +49,7 @@ var x: (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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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 @@ -62,7 +62,7 @@ var x: (1, ); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_9: i32 = int_value 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_12.1: %.2 = tuple_literal (%.loc17_9) +// CHECK:STDOUT: %.loc17_12.1: %tuple.type = tuple_literal (%.loc17_9) // CHECK:STDOUT: %.loc17_12.2: type = converted %.loc17_9, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var @@ -77,8 +77,8 @@ var x: (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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// 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 x: (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.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.4 +// CHECK:STDOUT: %.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 97b6e40c9663..735301c1adae 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -57,36 +57,36 @@ var c_bad: C((3, 4)) = F(); // 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: %.4: i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple.1: %.3 = tuple_value (%.4) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%.2, type) [template] -// CHECK:STDOUT: %.6: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.5, %.6) [template] -// CHECK:STDOUT: %.8: type = tuple_type (%.3, i32) [template] -// CHECK:STDOUT: %.9: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.10: type = tuple_type (%.8, %.9) [template] -// CHECK:STDOUT: %.11: type = ptr_type %.9 [template] -// CHECK:STDOUT: %.12: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.13: type = tuple_type (%.12, %.11) [template] -// CHECK:STDOUT: %.14: type = ptr_type %.13 [template] -// CHECK:STDOUT: %.15: i32 = int_value 1 [template] -// CHECK:STDOUT: %.16: i32 = int_value 2 [template] -// CHECK:STDOUT: %.17: i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple.2: %.8 = tuple_value (%tuple.1, %.15) [template] -// CHECK:STDOUT: %tuple.3: %.9 = tuple_value (%.16, %.17) [template] -// CHECK:STDOUT: %tuple.4: %.10 = tuple_value (%tuple.2, %tuple.3) [template] -// CHECK:STDOUT: %X: %.9 = bind_symbolic_name X, 0 [symbolic] -// CHECK:STDOUT: %X.patt: %.9 = symbolic_binding_pattern X, 0 [symbolic] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.1) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, type) [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%tuple.type.3, %tuple.type.4) [template] +// CHECK:STDOUT: %tuple.type.6: type = tuple_type (%tuple.type.2, i32) [template] +// CHECK:STDOUT: %tuple.type.7: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.8: type = tuple_type (%tuple.type.6, %tuple.type.7) [template] +// CHECK:STDOUT: %.2: type = ptr_type %tuple.type.7 [template] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.6 [template] +// CHECK:STDOUT: %tuple.type.9: type = tuple_type (%.3, %.2) [template] +// CHECK:STDOUT: %.4: type = ptr_type %tuple.type.9 [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.2: %tuple.type.6 = tuple_value (%tuple.1, %.5) [template] +// CHECK:STDOUT: %tuple.3: %tuple.type.7 = tuple_value (%.6, %.7) [template] +// CHECK:STDOUT: %tuple.4: %tuple.type.8 = tuple_value (%tuple.2, %tuple.3) [template] +// CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic] +// CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic] -// CHECK:STDOUT: %.18: type = struct_type {} [template] -// CHECK:STDOUT: %.19: = complete_type_witness %.18 [template] -// CHECK:STDOUT: %tuple.5: %.9 = tuple_value (%.15, %.16) [template] +// CHECK:STDOUT: %.8: type = struct_type {} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %tuple.5: %tuple.type.7 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.5) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -111,73 +111,73 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_17.1: %.2 = tuple_literal (%int.make_type_32.loc4) +// CHECK:STDOUT: %.loc4_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc4) // CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_32.loc4, %.loc4_17.2 [template = i32] -// CHECK:STDOUT: %.loc4_17.4: type = converted %.loc4_17.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %a_ref.var: ref %.3 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.3 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %.loc4_17.4: type = converted %.loc4_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %a_ref.var: ref %tuple.type.2 = var a_ref +// CHECK:STDOUT: %a_ref: ref %tuple.type.2 = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_19: %.2 = tuple_literal (%int.make_type_32.loc5_15) +// CHECK:STDOUT: %.loc5_19: %tuple.type.1 = tuple_literal (%int.make_type_32.loc5_15) // CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_25: %.5 = tuple_literal (%.loc5_19, %int.make_type_32.loc5_22) +// CHECK:STDOUT: %.loc5_25: %tuple.type.3 = tuple_literal (%.loc5_19, %int.make_type_32.loc5_22) // CHECK:STDOUT: %int.make_type_32.loc5_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc5_34: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_37: %.6 = tuple_literal (%int.make_type_32.loc5_29, %int.make_type_32.loc5_34) -// CHECK:STDOUT: %.loc5_38.1: %.7 = tuple_literal (%.loc5_25, %.loc5_37) +// CHECK:STDOUT: %.loc5_37: %tuple.type.4 = tuple_literal (%int.make_type_32.loc5_29, %int.make_type_32.loc5_34) +// CHECK:STDOUT: %.loc5_38.1: %tuple.type.5 = tuple_literal (%.loc5_25, %.loc5_37) // CHECK:STDOUT: %.loc5_38.2: type = value_of_initializer %int.make_type_32.loc5_15 [template = i32] // CHECK:STDOUT: %.loc5_38.3: type = converted %int.make_type_32.loc5_15, %.loc5_38.2 [template = i32] -// CHECK:STDOUT: %.loc5_38.4: type = converted %.loc5_19, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_38.4: type = converted %.loc5_19, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc5_38.5: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] // CHECK:STDOUT: %.loc5_38.6: type = converted %int.make_type_32.loc5_22, %.loc5_38.5 [template = i32] -// CHECK:STDOUT: %.loc5_38.7: type = converted %.loc5_25, constants.%.8 [template = constants.%.8] +// CHECK:STDOUT: %.loc5_38.7: type = converted %.loc5_25, constants.%tuple.type.6 [template = constants.%tuple.type.6] // CHECK:STDOUT: %.loc5_38.8: type = value_of_initializer %int.make_type_32.loc5_29 [template = i32] // CHECK:STDOUT: %.loc5_38.9: type = converted %int.make_type_32.loc5_29, %.loc5_38.8 [template = i32] // CHECK:STDOUT: %.loc5_38.10: type = value_of_initializer %int.make_type_32.loc5_34 [template = i32] // CHECK:STDOUT: %.loc5_38.11: type = converted %int.make_type_32.loc5_34, %.loc5_38.10 [template = i32] -// CHECK:STDOUT: %.loc5_38.12: type = converted %.loc5_37, constants.%.9 [template = constants.%.9] -// CHECK:STDOUT: %.loc5_38.13: type = converted %.loc5_38.1, constants.%.10 [template = constants.%.10] -// CHECK:STDOUT: %b_ref.var: ref %.10 = var b_ref -// CHECK:STDOUT: %b_ref: ref %.10 = bind_name b_ref, %b_ref.var +// CHECK:STDOUT: %.loc5_38.12: type = converted %.loc5_37, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %.loc5_38.13: type = converted %.loc5_38.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] +// CHECK:STDOUT: %b_ref.var: ref %tuple.type.8 = var b_ref +// CHECK:STDOUT: %b_ref: ref %tuple.type.8 = bind_name b_ref, %b_ref.var // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %X.patt.loc7_9.1: %.9 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] -// CHECK:STDOUT: %X.param_patt: %.9 = value_param_pattern %X.patt.loc7_9.1, runtime_param [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.patt.loc7_9.1: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.param_patt: %tuple.type.7 = value_param_pattern %X.patt.loc7_9.1, runtime_param [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int.make_type_32.loc7_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc7_22.1: %.6 = tuple_literal (%int.make_type_32.loc7_14, %int.make_type_32.loc7_19) +// CHECK:STDOUT: %.loc7_22.1: %tuple.type.4 = tuple_literal (%int.make_type_32.loc7_14, %int.make_type_32.loc7_19) // CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %int.make_type_32.loc7_14 [template = i32] // CHECK:STDOUT: %.loc7_22.3: type = converted %int.make_type_32.loc7_14, %.loc7_22.2 [template = i32] // CHECK:STDOUT: %.loc7_22.4: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_22.5: type = converted %int.make_type_32.loc7_19, %.loc7_22.4 [template = i32] -// CHECK:STDOUT: %.loc7_22.6: type = converted %.loc7_22.1, constants.%.9 [template = constants.%.9] -// CHECK:STDOUT: %X.param: %.9 = value_param runtime_param -// CHECK:STDOUT: %X.loc7_9.1: %.9 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc7_9.2 (constants.%X)] +// CHECK:STDOUT: %.loc7_22.6: type = converted %.loc7_22.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %X.param: %tuple.type.7 = value_param runtime_param +// CHECK:STDOUT: %X.loc7_9.1: %tuple.type.7 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc7_9.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %C.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_14: i32 = int_value 1 [template = constants.%.15] -// CHECK:STDOUT: %.loc9_17: i32 = int_value 2 [template = constants.%.16] -// CHECK:STDOUT: %.loc9_18: %.9 = tuple_literal (%.loc9_14, %.loc9_17) -// CHECK:STDOUT: %tuple: %.9 = tuple_value (%.loc9_14, %.loc9_17) [template = constants.%tuple.5] -// CHECK:STDOUT: %.loc9_12: %.9 = converted %.loc9_18, %tuple [template = constants.%tuple.5] +// CHECK:STDOUT: %.loc9_14: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc9_17: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc9_18: %tuple.type.7 = tuple_literal (%.loc9_14, %.loc9_17) +// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc9_14, %.loc9_17) [template = constants.%tuple.5] +// CHECK:STDOUT: %.loc9_12: %tuple.type.7 = converted %.loc9_18, %tuple [template = constants.%tuple.5] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.5) [template = constants.%C.3] // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%X.loc7_9.1: %.9) { -// CHECK:STDOUT: %X.loc7_9.2: %.9 = bind_symbolic_name X, 0 [symbolic = %X.loc7_9.2 (constants.%X)] -// CHECK:STDOUT: %X.patt.loc7_9.2: %.9 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] +// CHECK:STDOUT: generic class @C(%X.loc7_9.1: %tuple.type.7) { +// CHECK:STDOUT: %X.loc7_9.2: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic = %X.loc7_9.2 (constants.%X)] +// CHECK:STDOUT: %X.patt.loc7_9.2: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7_26: = complete_type_witness %.18 [template = constants.%.19] +// CHECK:STDOUT: %.loc7_26: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -190,37 +190,37 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_22: i32 = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_24.1: %.3 = tuple_literal (%.loc4_22) -// CHECK:STDOUT: %.loc4_24.2: init %.3 = tuple_init (%.loc4_22) to file.%a_ref.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc4_25: init %.3 = converted %.loc4_24.1, %.loc4_24.2 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc4_22: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_24.1: %tuple.type.2 = tuple_literal (%.loc4_22) +// CHECK:STDOUT: %.loc4_24.2: init %tuple.type.2 = tuple_init (%.loc4_22) to file.%a_ref.var [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc4_25: init %tuple.type.2 = converted %.loc4_24.1, %.loc4_24.2 [template = constants.%tuple.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_25 -// CHECK:STDOUT: %.loc5_45: i32 = int_value 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc5_47.1: %.3 = tuple_literal (%.loc5_45) -// CHECK:STDOUT: %.loc5_50: i32 = int_value 1 [template = constants.%.15] -// CHECK:STDOUT: %.loc5_51.1: %.8 = tuple_literal (%.loc5_47.1, %.loc5_50) -// CHECK:STDOUT: %.loc5_55: i32 = int_value 2 [template = constants.%.16] -// CHECK:STDOUT: %.loc5_58: i32 = int_value 3 [template = constants.%.17] -// CHECK:STDOUT: %.loc5_59.1: %.9 = tuple_literal (%.loc5_55, %.loc5_58) -// CHECK:STDOUT: %.loc5_60.1: %.10 = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %.loc5_60.2: ref %.8 = tuple_access file.%b_ref.var, element0 -// CHECK:STDOUT: %.loc5_51.2: ref %.3 = tuple_access %.loc5_60.2, element0 -// CHECK:STDOUT: %.loc5_47.2: init %.3 = tuple_init (%.loc5_45) to %.loc5_51.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.3: init %.3 = converted %.loc5_47.1, %.loc5_47.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.4: init %.3 = initialize_from %.loc5_51.3 to %.loc5_51.2 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc5_45: i32 = int_value 0 [template = constants.%.1] +// CHECK:STDOUT: %.loc5_47.1: %tuple.type.2 = tuple_literal (%.loc5_45) +// CHECK:STDOUT: %.loc5_50: i32 = int_value 1 [template = constants.%.5] +// CHECK:STDOUT: %.loc5_51.1: %tuple.type.6 = tuple_literal (%.loc5_47.1, %.loc5_50) +// CHECK:STDOUT: %.loc5_55: i32 = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_58: i32 = int_value 3 [template = constants.%.7] +// CHECK:STDOUT: %.loc5_59.1: %tuple.type.7 = tuple_literal (%.loc5_55, %.loc5_58) +// CHECK:STDOUT: %.loc5_60.1: %tuple.type.8 = tuple_literal (%.loc5_51.1, %.loc5_59.1) +// CHECK:STDOUT: %.loc5_60.2: ref %tuple.type.6 = tuple_access file.%b_ref.var, element0 +// CHECK:STDOUT: %.loc5_51.2: ref %tuple.type.2 = tuple_access %.loc5_60.2, element0 +// CHECK:STDOUT: %.loc5_47.2: init %tuple.type.2 = tuple_init (%.loc5_45) to %.loc5_51.2 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc5_51.3: init %tuple.type.2 = converted %.loc5_47.1, %.loc5_47.2 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc5_51.4: init %tuple.type.2 = initialize_from %.loc5_51.3 to %.loc5_51.2 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.5: ref i32 = tuple_access %.loc5_60.2, element1 -// CHECK:STDOUT: %.loc5_51.6: init i32 = initialize_from %.loc5_50 to %.loc5_51.5 [template = constants.%.15] -// CHECK:STDOUT: %.loc5_51.7: init %.8 = tuple_init (%.loc5_51.4, %.loc5_51.6) to %.loc5_60.2 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_60.3: init %.8 = converted %.loc5_51.1, %.loc5_51.7 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_60.4: ref %.9 = tuple_access file.%b_ref.var, element1 +// CHECK:STDOUT: %.loc5_51.6: init i32 = initialize_from %.loc5_50 to %.loc5_51.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc5_51.7: init %tuple.type.6 = tuple_init (%.loc5_51.4, %.loc5_51.6) to %.loc5_60.2 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc5_60.3: init %tuple.type.6 = converted %.loc5_51.1, %.loc5_51.7 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc5_60.4: ref %tuple.type.7 = tuple_access file.%b_ref.var, element1 // CHECK:STDOUT: %.loc5_59.2: ref i32 = tuple_access %.loc5_60.4, element0 -// CHECK:STDOUT: %.loc5_59.3: init i32 = initialize_from %.loc5_55 to %.loc5_59.2 [template = constants.%.16] +// CHECK:STDOUT: %.loc5_59.3: init i32 = initialize_from %.loc5_55 to %.loc5_59.2 [template = constants.%.6] // CHECK:STDOUT: %.loc5_59.4: ref i32 = tuple_access %.loc5_60.4, element1 -// CHECK:STDOUT: %.loc5_59.5: init i32 = initialize_from %.loc5_58 to %.loc5_59.4 [template = constants.%.17] -// CHECK:STDOUT: %.loc5_59.6: init %.9 = tuple_init (%.loc5_59.3, %.loc5_59.5) to %.loc5_60.4 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc5_60.5: init %.9 = converted %.loc5_59.1, %.loc5_59.6 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc5_60.6: init %.10 = tuple_init (%.loc5_60.3, %.loc5_60.5) to file.%b_ref.var [template = constants.%tuple.4] -// CHECK:STDOUT: %.loc5_61: init %.10 = converted %.loc5_60.1, %.loc5_60.6 [template = constants.%tuple.4] +// CHECK:STDOUT: %.loc5_59.5: init i32 = initialize_from %.loc5_58 to %.loc5_59.4 [template = constants.%.7] +// CHECK:STDOUT: %.loc5_59.6: init %tuple.type.7 = tuple_init (%.loc5_59.3, %.loc5_59.5) to %.loc5_60.4 [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc5_60.5: init %tuple.type.7 = converted %.loc5_59.1, %.loc5_59.6 [template = constants.%tuple.3] +// CHECK:STDOUT: %.loc5_60.6: init %tuple.type.8 = tuple_init (%.loc5_60.3, %.loc5_60.5) to file.%b_ref.var [template = constants.%tuple.4] +// CHECK:STDOUT: %.loc5_61: init %tuple.type.8 = converted %.loc5_60.1, %.loc5_60.6 [template = constants.%tuple.4] // CHECK:STDOUT: assign file.%b_ref.var, %.loc5_61 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -239,39 +239,39 @@ var c_bad: C((3, 4)) = F(); // 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: %.4: type = tuple_type (%.2, type) [template] -// CHECK:STDOUT: %.5: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.6: type = tuple_type (%.4, %.5) [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.3, i32) [template] -// CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.9: type = tuple_type (%.7, %.8) [template] -// CHECK:STDOUT: %.10: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] -// CHECK:STDOUT: %.12: type = tuple_type (%.11, %.10) [template] -// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, type) [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%tuple.type.3, %tuple.type.4) [template] +// CHECK:STDOUT: %tuple.type.6: type = tuple_type (%tuple.type.2, i32) [template] +// CHECK:STDOUT: %tuple.type.7: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.8: type = tuple_type (%tuple.type.6, %tuple.type.7) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.7 [template] +// CHECK:STDOUT: %.2: type = ptr_type %tuple.type.6 [template] +// CHECK:STDOUT: %tuple.type.9: type = tuple_type (%.2, %.1) [template] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.9 [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.14: type = struct_type {} [template] -// CHECK:STDOUT: %.15: = complete_type_witness %.14 [template] -// CHECK:STDOUT: %X: %.8 = bind_symbolic_name X, 0 [symbolic] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic] -// CHECK:STDOUT: %X.patt: %.8 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.16: i32 = int_value 1 [template] -// CHECK:STDOUT: %.17: i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %.8 = tuple_value (%.16, %.17) [template] +// CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic] +// CHECK:STDOUT: %.6: i32 = int_value 1 [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.6, %.7) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template] -// CHECK:STDOUT: %.18: type = ptr_type %.14 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.4 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: ref %.3 = import_ref Implicit//default, inst+19, loaded -// CHECK:STDOUT: %import_ref.2: ref %.9 = import_ref Implicit//default, inst+59, loaded +// CHECK:STDOUT: %import_ref.1: ref %tuple.type.2 = import_ref Implicit//default, inst+19, loaded +// CHECK:STDOUT: %import_ref.2: ref %tuple.type.8 = import_ref Implicit//default, inst+59, loaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+108, loaded [template = constants.%C.1] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+130, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { @@ -298,48 +298,48 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_13.1: %.2 = tuple_literal (%int.make_type_32.loc4) +// CHECK:STDOUT: %.loc4_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc4) // CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_32.loc4, %.loc4_13.2 [template = i32] -// CHECK:STDOUT: %.loc4_13.4: type = converted %.loc4_13.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: %.loc4_13.4: type = converted %.loc4_13.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.loc5_11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_15: %.2 = tuple_literal (%int.make_type_32.loc5_11) +// CHECK:STDOUT: %.loc5_15: %tuple.type.1 = tuple_literal (%int.make_type_32.loc5_11) // CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_21: %.4 = tuple_literal (%.loc5_15, %int.make_type_32.loc5_18) +// CHECK:STDOUT: %.loc5_21: %tuple.type.3 = tuple_literal (%.loc5_15, %int.make_type_32.loc5_18) // CHECK:STDOUT: %int.make_type_32.loc5_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc5_30: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_33: %.5 = tuple_literal (%int.make_type_32.loc5_25, %int.make_type_32.loc5_30) -// CHECK:STDOUT: %.loc5_34.1: %.6 = tuple_literal (%.loc5_21, %.loc5_33) +// CHECK:STDOUT: %.loc5_33: %tuple.type.4 = tuple_literal (%int.make_type_32.loc5_25, %int.make_type_32.loc5_30) +// CHECK:STDOUT: %.loc5_34.1: %tuple.type.5 = tuple_literal (%.loc5_21, %.loc5_33) // CHECK:STDOUT: %.loc5_34.2: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_34.3: type = converted %int.make_type_32.loc5_11, %.loc5_34.2 [template = i32] -// CHECK:STDOUT: %.loc5_34.4: type = converted %.loc5_15, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc5_34.4: type = converted %.loc5_15, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc5_34.5: type = value_of_initializer %int.make_type_32.loc5_18 [template = i32] // CHECK:STDOUT: %.loc5_34.6: type = converted %int.make_type_32.loc5_18, %.loc5_34.5 [template = i32] -// CHECK:STDOUT: %.loc5_34.7: type = converted %.loc5_21, constants.%.7 [template = constants.%.7] +// CHECK:STDOUT: %.loc5_34.7: type = converted %.loc5_21, constants.%tuple.type.6 [template = constants.%tuple.type.6] // CHECK:STDOUT: %.loc5_34.8: type = value_of_initializer %int.make_type_32.loc5_25 [template = i32] // CHECK:STDOUT: %.loc5_34.9: type = converted %int.make_type_32.loc5_25, %.loc5_34.8 [template = i32] // CHECK:STDOUT: %.loc5_34.10: type = value_of_initializer %int.make_type_32.loc5_30 [template = i32] // CHECK:STDOUT: %.loc5_34.11: type = converted %int.make_type_32.loc5_30, %.loc5_34.10 [template = i32] -// CHECK:STDOUT: %.loc5_34.12: type = converted %.loc5_33, constants.%.8 [template = constants.%.8] -// CHECK:STDOUT: %.loc5_34.13: type = converted %.loc5_34.1, constants.%.9 [template = constants.%.9] -// CHECK:STDOUT: %b.var: ref %.9 = var b -// CHECK:STDOUT: %b: ref %.9 = bind_name b, %b.var +// CHECK:STDOUT: %.loc5_34.12: type = converted %.loc5_33, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %.loc5_34.13: type = converted %.loc5_34.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] +// CHECK:STDOUT: %b.var: ref %tuple.type.8 = var b +// CHECK:STDOUT: %b: ref %tuple.type.8 = bind_name b, %b.var // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_11: i32 = int_value 1 [template = constants.%.16] -// CHECK:STDOUT: %.loc6_14: i32 = int_value 2 [template = constants.%.17] -// CHECK:STDOUT: %.loc6_15: %.8 = tuple_literal (%.loc6_11, %.loc6_14) -// CHECK:STDOUT: %tuple: %.8 = tuple_value (%.loc6_11, %.loc6_14) [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_9: %.8 = converted %.loc6_15, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_11: i32 = int_value 1 [template = constants.%.6] +// CHECK:STDOUT: %.loc6_14: i32 = int_value 2 [template = constants.%.7] +// CHECK:STDOUT: %.loc6_15: %tuple.type.7 = tuple_literal (%.loc6_11, %.loc6_14) +// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc6_11, %.loc6_14) [template = constants.%tuple] +// CHECK:STDOUT: %.loc6_9: %tuple.type.7 = converted %.loc6_15, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%X: %.8) { -// CHECK:STDOUT: %X: %.8 = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)] -// CHECK:STDOUT: %X.patt: %.8 = symbolic_binding_pattern X, 0 [symbolic = %X.patt (constants.%X.patt)] +// CHECK:STDOUT: generic class @C(constants.%X: %tuple.type.7) { +// CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic = %X.patt (constants.%X.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -355,42 +355,42 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.3 = name_ref a_ref, imports.%import_ref.1 +// CHECK:STDOUT: %a_ref.ref: ref %tuple.type.2 = name_ref a_ref, imports.%import_ref.1 // CHECK:STDOUT: %.loc4_17.1: ref i32 = tuple_access %a_ref.ref, element0 // CHECK:STDOUT: %.loc4_17.2: i32 = bind_value %.loc4_17.1 -// CHECK:STDOUT: %.loc4_17.3: init %.3 = tuple_init (%.loc4_17.2) to file.%a.var -// CHECK:STDOUT: %.loc4_22: init %.3 = converted %a_ref.ref, %.loc4_17.3 +// CHECK:STDOUT: %.loc4_17.3: init %tuple.type.2 = tuple_init (%.loc4_17.2) to file.%a.var +// CHECK:STDOUT: %.loc4_22: init %tuple.type.2 = converted %a_ref.ref, %.loc4_17.3 // CHECK:STDOUT: assign file.%a.var, %.loc4_22 -// CHECK:STDOUT: %b_ref.ref: ref %.9 = name_ref b_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc5_38.1: ref %.7 = tuple_access %b_ref.ref, element0 -// CHECK:STDOUT: %.loc5_38.2: ref %.3 = tuple_access %.loc5_38.1, element0 +// CHECK:STDOUT: %b_ref.ref: ref %tuple.type.8 = name_ref b_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc5_38.1: ref %tuple.type.6 = tuple_access %b_ref.ref, element0 +// CHECK:STDOUT: %.loc5_38.2: ref %tuple.type.2 = tuple_access %.loc5_38.1, element0 // CHECK:STDOUT: %.loc5_38.3: ref i32 = tuple_access %.loc5_38.2, element0 // CHECK:STDOUT: %.loc5_38.4: i32 = bind_value %.loc5_38.3 -// CHECK:STDOUT: %.loc5_38.5: ref %.7 = tuple_access file.%b.var, element0 -// CHECK:STDOUT: %.loc5_38.6: ref %.3 = tuple_access %.loc5_38.5, element0 -// CHECK:STDOUT: %.loc5_38.7: init %.3 = tuple_init (%.loc5_38.4) to %.loc5_38.6 -// CHECK:STDOUT: %.loc5_38.8: init %.3 = converted %.loc5_38.2, %.loc5_38.7 -// CHECK:STDOUT: %.loc5_38.9: init %.3 = initialize_from %.loc5_38.8 to %.loc5_38.6 +// CHECK:STDOUT: %.loc5_38.5: ref %tuple.type.6 = tuple_access file.%b.var, element0 +// CHECK:STDOUT: %.loc5_38.6: ref %tuple.type.2 = tuple_access %.loc5_38.5, element0 +// CHECK:STDOUT: %.loc5_38.7: init %tuple.type.2 = tuple_init (%.loc5_38.4) to %.loc5_38.6 +// CHECK:STDOUT: %.loc5_38.8: init %tuple.type.2 = converted %.loc5_38.2, %.loc5_38.7 +// CHECK:STDOUT: %.loc5_38.9: init %tuple.type.2 = initialize_from %.loc5_38.8 to %.loc5_38.6 // CHECK:STDOUT: %.loc5_38.10: ref i32 = tuple_access %.loc5_38.1, element1 // CHECK:STDOUT: %.loc5_38.11: i32 = bind_value %.loc5_38.10 // CHECK:STDOUT: %.loc5_38.12: ref i32 = tuple_access %.loc5_38.5, element1 // CHECK:STDOUT: %.loc5_38.13: init i32 = initialize_from %.loc5_38.11 to %.loc5_38.12 -// CHECK:STDOUT: %.loc5_38.14: init %.7 = tuple_init (%.loc5_38.9, %.loc5_38.13) to %.loc5_38.5 -// CHECK:STDOUT: %.loc5_38.15: init %.7 = converted %.loc5_38.1, %.loc5_38.14 -// CHECK:STDOUT: %.loc5_38.16: ref %.8 = tuple_access %b_ref.ref, element1 +// CHECK:STDOUT: %.loc5_38.14: init %tuple.type.6 = tuple_init (%.loc5_38.9, %.loc5_38.13) to %.loc5_38.5 +// CHECK:STDOUT: %.loc5_38.15: init %tuple.type.6 = converted %.loc5_38.1, %.loc5_38.14 +// CHECK:STDOUT: %.loc5_38.16: ref %tuple.type.7 = tuple_access %b_ref.ref, element1 // CHECK:STDOUT: %.loc5_38.17: ref i32 = tuple_access %.loc5_38.16, element0 // CHECK:STDOUT: %.loc5_38.18: i32 = bind_value %.loc5_38.17 -// CHECK:STDOUT: %.loc5_38.19: ref %.8 = tuple_access file.%b.var, element1 +// CHECK:STDOUT: %.loc5_38.19: ref %tuple.type.7 = tuple_access file.%b.var, element1 // CHECK:STDOUT: %.loc5_38.20: ref i32 = tuple_access %.loc5_38.19, element0 // CHECK:STDOUT: %.loc5_38.21: init i32 = initialize_from %.loc5_38.18 to %.loc5_38.20 // CHECK:STDOUT: %.loc5_38.22: ref i32 = tuple_access %.loc5_38.16, element1 // CHECK:STDOUT: %.loc5_38.23: i32 = bind_value %.loc5_38.22 // CHECK:STDOUT: %.loc5_38.24: ref i32 = tuple_access %.loc5_38.19, element1 // CHECK:STDOUT: %.loc5_38.25: init i32 = initialize_from %.loc5_38.23 to %.loc5_38.24 -// CHECK:STDOUT: %.loc5_38.26: init %.8 = tuple_init (%.loc5_38.21, %.loc5_38.25) to %.loc5_38.19 -// CHECK:STDOUT: %.loc5_38.27: init %.8 = converted %.loc5_38.16, %.loc5_38.26 -// CHECK:STDOUT: %.loc5_38.28: init %.9 = tuple_init (%.loc5_38.15, %.loc5_38.27) to file.%b.var -// CHECK:STDOUT: %.loc5_43: init %.9 = converted %b_ref.ref, %.loc5_38.28 +// CHECK:STDOUT: %.loc5_38.26: init %tuple.type.7 = tuple_init (%.loc5_38.21, %.loc5_38.25) to %.loc5_38.19 +// CHECK:STDOUT: %.loc5_38.27: init %tuple.type.7 = converted %.loc5_38.16, %.loc5_38.26 +// CHECK:STDOUT: %.loc5_38.28: init %tuple.type.8 = tuple_init (%.loc5_38.15, %.loc5_38.27) to file.%b.var +// CHECK:STDOUT: %.loc5_43: init %tuple.type.8 = converted %b_ref.ref, %.loc5_38.28 // CHECK:STDOUT: assign file.%b.var, %.loc5_43 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc6: ref %C.3 = splice_block file.%c.var {} @@ -415,24 +415,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %X: %.4 = bind_symbolic_name X, 0 [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic] -// CHECK:STDOUT: %X.patt: %.4 = symbolic_binding_pattern X, 0 [symbolic] -// 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: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.9: type = ptr_type %.4 [template] +// CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] +// CHECK:STDOUT: %.3: i32 = int_value 1 [template] +// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %.5: i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32, i32) [template] +// CHECK:STDOUT: %.6: type = ptr_type %tuple.type.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.3, %.4) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template] -// CHECK:STDOUT: %.10: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -460,17 +460,17 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_15: i32 = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_18: i32 = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_21: i32 = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_22: %.8 = tuple_literal (%.loc12_15, %.loc12_18, %.loc12_21) +// CHECK:STDOUT: %.loc12_15: i32 = int_value 1 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_18: i32 = int_value 2 [template = constants.%.4] +// CHECK:STDOUT: %.loc12_21: i32 = int_value 3 [template = constants.%.5] +// CHECK:STDOUT: %.loc12_22: %tuple.type.2 = tuple_literal (%.loc12_15, %.loc12_18, %.loc12_21) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%X: %.4) { -// CHECK:STDOUT: %X: %.4 = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)] -// CHECK:STDOUT: %X.patt: %.4 = symbolic_binding_pattern X, 0 [symbolic = %X.patt (constants.%X.patt)] +// CHECK:STDOUT: generic class @C(constants.%X: %tuple.type.1) { +// CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic = %X.patt (constants.%X.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -507,25 +507,25 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %X: %.4 = bind_symbolic_name X, 0 [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %X: %tuple.type = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic] -// CHECK:STDOUT: %X.patt: %.4 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.5: i32 = int_value 3 [template] -// CHECK:STDOUT: %.6: i32 = int_value 4 [template] -// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] -// CHECK:STDOUT: %tuple.1: %.4 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %X.patt: %tuple.type = symbolic_binding_pattern X, 0 [symbolic] +// CHECK:STDOUT: %.3: i32 = int_value 3 [template] +// CHECK:STDOUT: %.4: i32 = int_value 4 [template] +// CHECK:STDOUT: %.5: type = ptr_type %tuple.type [template] +// CHECK:STDOUT: %tuple.1: %tuple.type = tuple_value (%.3, %.4) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.1) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.6: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.9: i32 = int_value 2 [template] -// CHECK:STDOUT: %.10: i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple.2: %.4 = tuple_value (%.10, %.9) [template] +// CHECK:STDOUT: %.7: i32 = int_value 2 [template] +// CHECK:STDOUT: %.8: i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type = tuple_value (%.8, %.7) [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%tuple.2) [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] @@ -536,14 +536,14 @@ var c_bad: C((3, 4)) = F(); // 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.10 [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.10 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%C.3) [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.10 [template] -// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -559,7 +559,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+113, unloaded // CHECK:STDOUT: %import_ref.6: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.8: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] // CHECK:STDOUT: %import_ref.9 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -578,11 +578,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_15: i32 = int_value 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_18: i32 = int_value 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc10_19: %.4 = tuple_literal (%.loc10_15, %.loc10_18) -// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc10_15, %.loc10_18) [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc10_13: %.4 = converted %.loc10_19, %tuple [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc10_15: i32 = int_value 3 [template = constants.%.3] +// CHECK:STDOUT: %.loc10_18: i32 = int_value 4 [template = constants.%.4] +// CHECK:STDOUT: %.loc10_19: %tuple.type = tuple_literal (%.loc10_15, %.loc10_18) +// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc10_15, %.loc10_18) [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc10_13: %tuple.type = converted %.loc10_19, %tuple [template = constants.%tuple.1] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.1) [template = constants.%C.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var @@ -597,8 +597,8 @@ var c_bad: C((3, 4)) = F(); // 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.10 [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.10 [symbolic = %.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -608,9 +608,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%X: %.4) { -// CHECK:STDOUT: %X: %.4 = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)] -// CHECK:STDOUT: %X.patt: %.4 = symbolic_binding_pattern X, 0 [symbolic = %X.patt (constants.%X.patt)] +// CHECK:STDOUT: generic class @C(constants.%X: %tuple.type) { +// CHECK:STDOUT: %X: %tuple.type = bind_symbolic_name X, 0 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X.patt: %tuple.type = symbolic_binding_pattern X, 0 [symbolic = %X.patt (constants.%X.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -690,7 +690,7 @@ var c_bad: C((3, 4)) = F(); // 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: diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index 51d9ec79e3b7..7bf89625ccfd 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -14,20 +14,20 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (%.2, type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%.4, i32) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.6, i32) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] -// CHECK:STDOUT: %.9: i32 = int_value 12 [template] -// CHECK:STDOUT: %.10: i32 = int_value 76 [template] -// CHECK:STDOUT: %.11: i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple.1: %.4 = tuple_value (%.9, %.10) [template] -// CHECK:STDOUT: %tuple.2: %.5 = tuple_value (%tuple.1, %.11) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, type) [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.3, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.3 [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.1, i32) [template] +// CHECK:STDOUT: %.2: type = ptr_type %tuple.type.5 [template] +// CHECK:STDOUT: %.3: i32 = int_value 12 [template] +// CHECK:STDOUT: %.4: i32 = int_value 76 [template] +// CHECK:STDOUT: %.5: i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%.3, %.4) [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,41 +47,41 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int.make_type_32.loc11_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_18: %.2 = tuple_literal (%int.make_type_32.loc11_10, %int.make_type_32.loc11_15) +// CHECK:STDOUT: %.loc11_18: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_10, %int.make_type_32.loc11_15) // CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_24.1: %.3 = tuple_literal (%.loc11_18, %int.make_type_32.loc11_21) +// CHECK:STDOUT: %.loc11_24.1: %tuple.type.2 = tuple_literal (%.loc11_18, %int.make_type_32.loc11_21) // CHECK:STDOUT: %.loc11_24.2: type = value_of_initializer %int.make_type_32.loc11_10 [template = i32] // CHECK:STDOUT: %.loc11_24.3: type = converted %int.make_type_32.loc11_10, %.loc11_24.2 [template = i32] // CHECK:STDOUT: %.loc11_24.4: type = value_of_initializer %int.make_type_32.loc11_15 [template = i32] // CHECK:STDOUT: %.loc11_24.5: type = converted %int.make_type_32.loc11_15, %.loc11_24.4 [template = i32] -// CHECK:STDOUT: %.loc11_24.6: type = converted %.loc11_18, constants.%.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_24.6: type = converted %.loc11_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %.loc11_24.7: type = value_of_initializer %int.make_type_32.loc11_21 [template = i32] // CHECK:STDOUT: %.loc11_24.8: type = converted %int.make_type_32.loc11_21, %.loc11_24.7 [template = i32] -// CHECK:STDOUT: %.loc11_24.9: type = converted %.loc11_24.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %x.var: ref %.5 = var x -// CHECK:STDOUT: %x: ref %.5 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_24.9: type = converted %.loc11_24.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %x.var: ref %tuple.type.4 = var x +// CHECK:STDOUT: %x: ref %tuple.type.4 = bind_name x, %x.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_30: i32 = int_value 12 [template = constants.%.9] -// CHECK:STDOUT: %.loc11_34: i32 = int_value 76 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_36.1: %.4 = tuple_literal (%.loc11_30, %.loc11_34) -// CHECK:STDOUT: %.loc11_39: i32 = int_value 6 [template = constants.%.11] -// CHECK:STDOUT: %.loc11_40.1: %.5 = tuple_literal (%.loc11_36.1, %.loc11_39) -// CHECK:STDOUT: %.loc11_40.2: ref %.4 = tuple_access file.%x.var, element0 +// CHECK:STDOUT: %.loc11_30: i32 = int_value 12 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_34: i32 = int_value 76 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_36.1: %tuple.type.3 = tuple_literal (%.loc11_30, %.loc11_34) +// CHECK:STDOUT: %.loc11_39: i32 = int_value 6 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_40.1: %tuple.type.4 = tuple_literal (%.loc11_36.1, %.loc11_39) +// CHECK:STDOUT: %.loc11_40.2: ref %tuple.type.3 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_36.2: ref i32 = tuple_access %.loc11_40.2, element0 -// CHECK:STDOUT: %.loc11_36.3: init i32 = initialize_from %.loc11_30 to %.loc11_36.2 [template = constants.%.9] +// CHECK:STDOUT: %.loc11_36.3: init i32 = initialize_from %.loc11_30 to %.loc11_36.2 [template = constants.%.3] // CHECK:STDOUT: %.loc11_36.4: ref i32 = tuple_access %.loc11_40.2, element1 -// CHECK:STDOUT: %.loc11_36.5: init i32 = initialize_from %.loc11_34 to %.loc11_36.4 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_36.6: init %.4 = tuple_init (%.loc11_36.3, %.loc11_36.5) to %.loc11_40.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_40.3: init %.4 = converted %.loc11_36.1, %.loc11_36.6 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_36.5: init i32 = initialize_from %.loc11_34 to %.loc11_36.4 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_36.6: init %tuple.type.3 = tuple_init (%.loc11_36.3, %.loc11_36.5) to %.loc11_40.2 [template = constants.%tuple.1] +// CHECK:STDOUT: %.loc11_40.3: init %tuple.type.3 = converted %.loc11_36.1, %.loc11_36.6 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_40.4: ref i32 = tuple_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_40.5: init i32 = initialize_from %.loc11_39 to %.loc11_40.4 [template = constants.%.11] -// CHECK:STDOUT: %.loc11_40.6: init %.5 = tuple_init (%.loc11_40.3, %.loc11_40.5) to file.%x.var [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc11_41: init %.5 = converted %.loc11_40.1, %.loc11_40.6 [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc11_40.5: init i32 = initialize_from %.loc11_39 to %.loc11_40.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_40.6: init %tuple.type.4 = tuple_init (%.loc11_40.3, %.loc11_40.5) to file.%x.var [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc11_41: init %tuple.type.4 = converted %.loc11_40.1, %.loc11_40.6 [template = constants.%tuple.2] // CHECK:STDOUT: assign file.%x.var, %.loc11_41 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index ca98baf37089..eab6b9f68997 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -22,27 +22,27 @@ fn H() { // 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: type = tuple_type (%.2, %.2) [template] -// CHECK:STDOUT: %.5: type = tuple_type (%.3, %.3) [template] -// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.7: type = tuple_type (%.6, %.6) [template] -// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, %tuple.type.1) [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.2, %tuple.type.2) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.1, %.1) [template] +// CHECK:STDOUT: %.2: type = ptr_type %tuple.type.5 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.9: type = tuple_type (type, %.2, type) [template] -// CHECK:STDOUT: %.10: type = tuple_type (i32, %.3, i32) [template] -// CHECK:STDOUT: %.11: type = tuple_type (i32, %.6, i32) [template] -// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] -// CHECK:STDOUT: %.13: i32 = int_value 1 [template] -// CHECK:STDOUT: %.14: i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.type.6: type = tuple_type (type, %tuple.type.1, type) [template] +// CHECK:STDOUT: %tuple.type.7: type = tuple_type (i32, %tuple.type.2, i32) [template] +// CHECK:STDOUT: %tuple.type.8: type = tuple_type (i32, %.1, i32) [template] +// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.8 [template] +// CHECK:STDOUT: %.4: i32 = int_value 1 [template] +// CHECK:STDOUT: %.5: i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -63,22 +63,22 @@ fn H() { // 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: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} @@ -86,45 +86,45 @@ fn H() { // 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: %.2 = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22) +// CHECK:STDOUT: %.loc14_25: %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: %int.make_type_32.loc14_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_39: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_42: %.2 = tuple_literal (%int.make_type_32.loc14_29, %int.make_type_32.loc14_34, %int.make_type_32.loc14_39) -// CHECK:STDOUT: %.loc14_43.1: %.4 = tuple_literal (%.loc14_25, %.loc14_42) +// CHECK:STDOUT: %.loc14_42: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_29, %int.make_type_32.loc14_34, %int.make_type_32.loc14_39) +// CHECK:STDOUT: %.loc14_43.1: %tuple.type.3 = tuple_literal (%.loc14_25, %.loc14_42) // CHECK:STDOUT: %.loc14_43.2: type = value_of_initializer %int.make_type_32.loc14_12 [template = i32] // CHECK:STDOUT: %.loc14_43.3: type = converted %int.make_type_32.loc14_12, %.loc14_43.2 [template = i32] // CHECK:STDOUT: %.loc14_43.4: type = value_of_initializer %int.make_type_32.loc14_17 [template = i32] // CHECK:STDOUT: %.loc14_43.5: type = converted %int.make_type_32.loc14_17, %.loc14_43.4 [template = i32] // CHECK:STDOUT: %.loc14_43.6: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32] // CHECK:STDOUT: %.loc14_43.7: type = converted %int.make_type_32.loc14_22, %.loc14_43.6 [template = i32] -// CHECK:STDOUT: %.loc14_43.8: type = converted %.loc14_25, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_43.8: type = converted %.loc14_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc14_43.9: type = value_of_initializer %int.make_type_32.loc14_29 [template = i32] // CHECK:STDOUT: %.loc14_43.10: type = converted %int.make_type_32.loc14_29, %.loc14_43.9 [template = i32] // CHECK:STDOUT: %.loc14_43.11: type = value_of_initializer %int.make_type_32.loc14_34 [template = i32] // CHECK:STDOUT: %.loc14_43.12: type = converted %int.make_type_32.loc14_34, %.loc14_43.11 [template = i32] // CHECK:STDOUT: %.loc14_43.13: type = value_of_initializer %int.make_type_32.loc14_39 [template = i32] // CHECK:STDOUT: %.loc14_43.14: type = converted %int.make_type_32.loc14_39, %.loc14_43.13 [template = i32] -// CHECK:STDOUT: %.loc14_43.15: type = converted %.loc14_42, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_43.16: type = converted %.loc14_43.1, constants.%.5 [template = constants.%.5] -// CHECK:STDOUT: %v.var: ref %.5 = var v -// CHECK:STDOUT: %v: ref %.5 = bind_name v, %v.var +// CHECK:STDOUT: %.loc14_43.15: type = converted %.loc14_42, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc14_43.16: type = converted %.loc14_43.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %v.var: ref %tuple.type.4 = var v +// CHECK:STDOUT: %v: ref %tuple.type.4 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_48: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_56.1: ref %.3 = tuple_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_49: init %.3 = call %F.ref.loc14_48() to %.loc14_56.1 +// CHECK:STDOUT: %.loc14_56.1: ref %tuple.type.2 = tuple_access %v.var, element0 +// CHECK:STDOUT: %F.call.loc14_49: init %tuple.type.2 = call %F.ref.loc14_48() to %.loc14_56.1 // CHECK:STDOUT: %F.ref.loc14_53: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_56.2: ref %.3 = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_54: init %.3 = call %F.ref.loc14_53() to %.loc14_56.2 -// CHECK:STDOUT: %.loc14_56.3: %.5 = tuple_literal (%F.call.loc14_49, %F.call.loc14_54) -// CHECK:STDOUT: %.loc14_56.4: init %.5 = tuple_init (%F.call.loc14_49, %F.call.loc14_54) to %v.var -// CHECK:STDOUT: %.loc14_57: init %.5 = converted %.loc14_56.3, %.loc14_56.4 +// CHECK:STDOUT: %.loc14_56.2: ref %tuple.type.2 = tuple_access %v.var, element1 +// CHECK:STDOUT: %F.call.loc14_54: init %tuple.type.2 = call %F.ref.loc14_53() to %.loc14_56.2 +// CHECK:STDOUT: %.loc14_56.3: %tuple.type.4 = tuple_literal (%F.call.loc14_49, %F.call.loc14_54) +// CHECK:STDOUT: %.loc14_56.4: init %tuple.type.4 = tuple_init (%F.call.loc14_49, %F.call.loc14_54) to %v.var +// CHECK:STDOUT: %.loc14_57: init %tuple.type.4 = converted %.loc14_56.3, %.loc14_56.4 // CHECK:STDOUT: assign %v.var, %.loc14_57 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -135,9 +135,9 @@ fn H() { // CHECK:STDOUT: %int.make_type_32.loc18_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc18_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc18_27: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_30: %.2 = tuple_literal (%int.make_type_32.loc18_17, %int.make_type_32.loc18_22, %int.make_type_32.loc18_27) +// CHECK:STDOUT: %.loc18_30: %tuple.type.1 = tuple_literal (%int.make_type_32.loc18_17, %int.make_type_32.loc18_22, %int.make_type_32.loc18_27) // CHECK:STDOUT: %int.make_type_32.loc18_33: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_36.1: %.9 = tuple_literal (%int.make_type_32.loc18_11, %.loc18_30, %int.make_type_32.loc18_33) +// CHECK:STDOUT: %.loc18_36.1: %tuple.type.6 = tuple_literal (%int.make_type_32.loc18_11, %.loc18_30, %int.make_type_32.loc18_33) // CHECK:STDOUT: %.loc18_36.2: type = value_of_initializer %int.make_type_32.loc18_11 [template = i32] // CHECK:STDOUT: %.loc18_36.3: type = converted %int.make_type_32.loc18_11, %.loc18_36.2 [template = i32] // CHECK:STDOUT: %.loc18_36.4: type = value_of_initializer %int.make_type_32.loc18_17 [template = i32] @@ -146,24 +146,24 @@ fn H() { // CHECK:STDOUT: %.loc18_36.7: type = converted %int.make_type_32.loc18_22, %.loc18_36.6 [template = i32] // CHECK:STDOUT: %.loc18_36.8: type = value_of_initializer %int.make_type_32.loc18_27 [template = i32] // CHECK:STDOUT: %.loc18_36.9: type = converted %int.make_type_32.loc18_27, %.loc18_36.8 [template = i32] -// CHECK:STDOUT: %.loc18_36.10: type = converted %.loc18_30, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc18_36.10: type = converted %.loc18_30, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc18_36.11: type = value_of_initializer %int.make_type_32.loc18_33 [template = i32] // CHECK:STDOUT: %.loc18_36.12: type = converted %int.make_type_32.loc18_33, %.loc18_36.11 [template = i32] -// CHECK:STDOUT: %.loc18_36.13: type = converted %.loc18_36.1, constants.%.10 [template = constants.%.10] -// CHECK:STDOUT: %v.var: ref %.10 = var v -// CHECK:STDOUT: %v: ref %.10 = bind_name v, %v.var -// CHECK:STDOUT: %.loc18_41: i32 = int_value 1 [template = constants.%.13] +// CHECK:STDOUT: %.loc18_36.13: type = converted %.loc18_36.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %v.var: ref %tuple.type.7 = var v +// CHECK:STDOUT: %v: ref %tuple.type.7 = bind_name v, %v.var +// CHECK:STDOUT: %.loc18_41: i32 = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc18_50.1: ref %.3 = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc18_50.1 -// CHECK:STDOUT: %.loc18_49: i32 = int_value 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc18_50.2: %.10 = tuple_literal (%.loc18_41, %F.call, %.loc18_49) +// CHECK:STDOUT: %.loc18_50.1: ref %tuple.type.2 = tuple_access %v.var, element1 +// CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() to %.loc18_50.1 +// CHECK:STDOUT: %.loc18_49: i32 = int_value 2 [template = constants.%.5] +// CHECK:STDOUT: %.loc18_50.2: %tuple.type.7 = tuple_literal (%.loc18_41, %F.call, %.loc18_49) // CHECK:STDOUT: %.loc18_50.3: ref i32 = tuple_access %v.var, element0 -// CHECK:STDOUT: %.loc18_50.4: init i32 = initialize_from %.loc18_41 to %.loc18_50.3 [template = constants.%.13] +// CHECK:STDOUT: %.loc18_50.4: init i32 = initialize_from %.loc18_41 to %.loc18_50.3 [template = constants.%.4] // CHECK:STDOUT: %.loc18_50.5: ref i32 = tuple_access %v.var, element2 -// CHECK:STDOUT: %.loc18_50.6: init i32 = initialize_from %.loc18_49 to %.loc18_50.5 [template = constants.%.14] -// CHECK:STDOUT: %.loc18_50.7: init %.10 = tuple_init (%.loc18_50.4, %F.call, %.loc18_50.6) to %v.var -// CHECK:STDOUT: %.loc18_51: init %.10 = converted %.loc18_50.2, %.loc18_50.7 +// CHECK:STDOUT: %.loc18_50.6: init i32 = initialize_from %.loc18_49 to %.loc18_50.5 [template = constants.%.5] +// CHECK:STDOUT: %.loc18_50.7: init %tuple.type.7 = tuple_init (%.loc18_50.4, %F.call, %.loc18_50.6) to %v.var +// CHECK:STDOUT: %.loc18_51: init %tuple.type.7 = converted %.loc18_50.2, %.loc18_50.7 // CHECK:STDOUT: assign %v.var, %.loc18_51 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/no_prelude/empty.carbon b/toolchain/check/testdata/tuple/no_prelude/empty.carbon index ba4d875a8ee5..ea1f690d976a 100644 --- a/toolchain/check/testdata/tuple/no_prelude/empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/empty.carbon @@ -14,8 +14,8 @@ var y: () = x; // CHECK:STDOUT: --- empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -23,25 +23,25 @@ var y: () = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %y.var: ref %.1 = var y -// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var +// CHECK:STDOUT: %.loc11_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %y.var: ref %empty_tuple.type = var y +// CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: init %.1 = tuple_init () to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_15: init %.1 = converted %.loc11_14.1, %.loc11_14.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_14.2: init %empty_tuple.type = tuple_init () to file.%x.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_15: init %empty_tuple.type = converted %.loc11_14.1, %.loc11_14.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%x.var, %.loc11_15 -// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_13: init %.1 = tuple_init () to file.%y.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_14: init %.1 = converted %x.ref, %.loc12_13 [template = constants.%tuple] +// CHECK:STDOUT: %x.ref: ref %empty_tuple.type = name_ref x, file.%x +// CHECK:STDOUT: %.loc12_13: init %empty_tuple.type = tuple_init () to file.%y.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_14: init %empty_tuple.type = converted %x.ref, %.loc12_13 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%y.var, %.loc12_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon b/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon index b8cf00191aba..1e21bddbc41a 100644 --- a/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon @@ -16,25 +16,25 @@ var x: ((),) = (); // CHECK:STDOUT: --- fail_assign_empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type (%.1) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_10: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_12.1: %.2 = tuple_literal (%.loc14_10) -// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_10, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_12.3: type = converted %.loc14_12.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_10: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_12.1: %tuple.type = tuple_literal (%.loc14_10) +// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_10, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc14_12.3: type = converted %.loc14_12.1, constants.%tuple.type [template = constants.%tuple.type] +// CHECK:STDOUT: %x.var: ref %tuple.type = var x +// CHECK:STDOUT: %x: ref %tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc14: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon b/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon index d78daa776d85..d5fe5553a234 100644 --- a/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon @@ -16,24 +16,24 @@ var x: () = ((),); // CHECK:STDOUT: --- fail_assign_to_empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type (%.1) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_15: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_17: %.2 = tuple_literal (%.loc14_15) +// CHECK:STDOUT: %.loc14_15: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_17: %tuple.type = tuple_literal (%.loc14_15) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index e054cd5b6817..1d2c9b7167ad 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -15,12 +15,12 @@ var y: (i32,) = x; // 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: %.4: i32 = int_value 4 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template] +// CHECK:STDOUT: %.1: i32 = int_value 4 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -40,35 +40,35 @@ var y: (i32,) = x; // 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_13.1: %.2 = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_32.loc11, %.loc11_13.2 [template = i32] -// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x +// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_13.1: %.2 = tuple_literal (%int.make_type_32.loc12) +// CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_32.loc12, %.loc12_13.2 [template = i32] -// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %y.var: ref %.3 = var y -// CHECK:STDOUT: %y: ref %.3 = bind_name y, %y.var +// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %y.var: ref %tuple.type.2 = var y +// CHECK:STDOUT: %y: ref %tuple.type.2 = bind_name y, %y.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_18: i32 = int_value 4 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_20.1: %.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_20.2: init %.3 = tuple_init (%.loc11_18) to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_21: init %.3 = converted %.loc11_20.1, %.loc11_20.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_18: i32 = int_value 4 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_20.1: %tuple.type.2 = tuple_literal (%.loc11_18) +// CHECK:STDOUT: %.loc11_20.2: init %tuple.type.2 = tuple_init (%.loc11_18) to file.%x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_21: init %tuple.type.2 = converted %.loc11_20.1, %.loc11_20.2 [template = constants.%tuple] // CHECK:STDOUT: assign file.%x.var, %.loc11_21 -// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, file.%x // CHECK:STDOUT: %.loc12_17.1: ref i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %.loc12_17.2: i32 = bind_value %.loc12_17.1 -// CHECK:STDOUT: %.loc12_17.3: init %.3 = tuple_init (%.loc12_17.2) to file.%y.var -// CHECK:STDOUT: %.loc12_18: init %.3 = converted %x.ref, %.loc12_17.3 +// CHECK:STDOUT: %.loc12_17.3: init %tuple.type.2 = tuple_init (%.loc12_17.2) to file.%y.var +// CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %x.ref, %.loc12_17.3 // CHECK:STDOUT: assign file.%y.var, %.loc12_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index 67072f88612b..d0571937953a 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -18,14 +18,14 @@ var y: (i32, i32) = x; // 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) [template] -// CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] -// CHECK:STDOUT: %.5: i32 = int_value 4 [template] -// CHECK:STDOUT: %.6: i32 = int_value 102 [template] -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32) [template] +// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [template] +// CHECK:STDOUT: %.2: i32 = int_value 4 [template] +// CHECK:STDOUT: %.3: i32 = int_value 102 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.2, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -48,65 +48,65 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %Core.import = import Core // 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: %.loc11_17.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] // CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_32.loc11_14, %.loc11_17.4 [template = i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_17.1: %.2 = tuple_literal (%int.make_type_32.loc12_9, %int.make_type_32.loc12_14) +// CHECK:STDOUT: %.loc12_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc12_9, %int.make_type_32.loc12_14) // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %int.make_type_32.loc12_9 [template = i32] // CHECK:STDOUT: %.loc12_17.3: type = converted %int.make_type_32.loc12_9, %.loc12_17.2 [template = i32] // CHECK:STDOUT: %.loc12_17.4: type = value_of_initializer %int.make_type_32.loc12_14 [template = i32] // CHECK:STDOUT: %.loc12_17.5: type = converted %int.make_type_32.loc12_14, %.loc12_17.4 [template = i32] -// CHECK:STDOUT: %.loc12_17.6: type = converted %.loc12_17.1, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_17.6: type = converted %.loc12_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_17.1: %.2 = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) +// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_32.loc14_9, %.loc14_17.2 [template = i32] // CHECK:STDOUT: %.loc14_17.4: type = value_of_initializer %int.make_type_32.loc14_14 [template = i32] // CHECK:STDOUT: %.loc14_17.5: type = converted %int.make_type_32.loc14_14, %.loc14_17.4 [template = i32] -// CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref %.3 = var x -// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x +// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: %int.make_type_32.loc15_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc15_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_17.1: %.2 = tuple_literal (%int.make_type_32.loc15_9, %int.make_type_32.loc15_14) +// CHECK:STDOUT: %.loc15_17.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc15_9, %int.make_type_32.loc15_14) // CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %int.make_type_32.loc15_9 [template = i32] // CHECK:STDOUT: %.loc15_17.3: type = converted %int.make_type_32.loc15_9, %.loc15_17.2 [template = i32] // CHECK:STDOUT: %.loc15_17.4: type = value_of_initializer %int.make_type_32.loc15_14 [template = i32] // CHECK:STDOUT: %.loc15_17.5: type = converted %int.make_type_32.loc15_14, %.loc15_17.4 [template = i32] -// CHECK:STDOUT: %.loc15_17.6: type = converted %.loc15_17.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %y.var: ref %.3 = var y -// CHECK:STDOUT: %y: ref %.3 = bind_name y, %y.var +// CHECK:STDOUT: %.loc15_17.6: type = converted %.loc15_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %y.var: ref %tuple.type.2 = var y +// CHECK:STDOUT: %y: ref %tuple.type.2 = bind_name y, %y.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_22: i32 = int_value 4 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_25: i32 = int_value 102 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28: %.3 = tuple_literal (%.loc11_22, %.loc11_25) -// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc11_22, %.loc11_25) [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: %.3 = converted %.loc11_28, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %v: %.3 = bind_name v, %.loc11_29 -// CHECK:STDOUT: %v.ref: %.3 = name_ref v, %v -// CHECK:STDOUT: %w: %.3 = bind_name w, %v.ref -// CHECK:STDOUT: %.loc14_22: i32 = int_value 4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: i32 = int_value 102 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_28.1: %.3 = tuple_literal (%.loc14_22, %.loc14_25) +// CHECK:STDOUT: %.loc11_22: i32 = int_value 4 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_25: i32 = int_value 102 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_28: %tuple.type.2 = tuple_literal (%.loc11_22, %.loc11_25) +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_22, %.loc11_25) [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_29: %tuple.type.2 = converted %.loc11_28, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %v: %tuple.type.2 = bind_name v, %.loc11_29 +// CHECK:STDOUT: %v.ref: %tuple.type.2 = name_ref v, %v +// CHECK:STDOUT: %w: %tuple.type.2 = bind_name w, %v.ref +// CHECK:STDOUT: %.loc14_22: i32 = int_value 4 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_25: i32 = int_value 102 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_28.1: %tuple.type.2 = tuple_literal (%.loc14_22, %.loc14_25) // CHECK:STDOUT: %.loc14_28.2: ref i32 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc14_28.3: init i32 = initialize_from %.loc14_22 to %.loc14_28.2 [template = constants.%.5] +// CHECK:STDOUT: %.loc14_28.3: init i32 = initialize_from %.loc14_22 to %.loc14_28.2 [template = constants.%.2] // CHECK:STDOUT: %.loc14_28.4: ref i32 = tuple_access file.%x.var, element1 -// CHECK:STDOUT: %.loc14_28.5: init i32 = initialize_from %.loc14_25 to %.loc14_28.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_28.6: init %.3 = tuple_init (%.loc14_28.3, %.loc14_28.5) to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_29: init %.3 = converted %.loc14_28.1, %.loc14_28.6 [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_28.5: init i32 = initialize_from %.loc14_25 to %.loc14_28.4 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_28.6: init %tuple.type.2 = tuple_init (%.loc14_28.3, %.loc14_28.5) to file.%x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_29: init %tuple.type.2 = converted %.loc14_28.1, %.loc14_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%x.var, %.loc14_29 -// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, file.%x // CHECK:STDOUT: %.loc15_21.1: ref i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %.loc15_21.2: i32 = bind_value %.loc15_21.1 // CHECK:STDOUT: %.loc15_21.3: ref i32 = tuple_access file.%y.var, element0 @@ -115,8 +115,8 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc15_21.6: i32 = bind_value %.loc15_21.5 // CHECK:STDOUT: %.loc15_21.7: ref i32 = tuple_access file.%y.var, element1 // CHECK:STDOUT: %.loc15_21.8: init i32 = initialize_from %.loc15_21.6 to %.loc15_21.7 -// CHECK:STDOUT: %.loc15_21.9: init %.3 = tuple_init (%.loc15_21.4, %.loc15_21.8) to file.%y.var -// CHECK:STDOUT: %.loc15_22: init %.3 = converted %x.ref, %.loc15_21.9 +// CHECK:STDOUT: %.loc15_21.9: init %tuple.type.2 = tuple_init (%.loc15_21.4, %.loc15_21.8) to file.%y.var +// CHECK:STDOUT: %.loc15_22: init %tuple.type.2 = converted %x.ref, %.loc15_21.9 // CHECK:STDOUT: assign file.%y.var, %.loc15_22 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/fail_not_copyable.carbon b/toolchain/check/testdata/var/fail_not_copyable.carbon index 525470f6a136..e7a6a976eb18 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -34,11 +34,11 @@ fn F(x: X) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] -// CHECK:STDOUT: %.5: type = ptr_type String [template] -// CHECK:STDOUT: %.6: String = string_literal "hello" [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.4: type = ptr_type String [template] +// CHECK:STDOUT: %.5: String = string_literal "hello" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,7 +77,7 @@ fn F(x: X) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.var: ref String = var s // CHECK:STDOUT: %s: ref String = bind_name s, %s.var -// CHECK:STDOUT: %.loc21: String = string_literal "hello" [template = constants.%.6] +// CHECK:STDOUT: %.loc21: String = string_literal "hello" [template = constants.%.5] // CHECK:STDOUT: assign %s.var, // CHECK:STDOUT: %X.ref.loc27: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %y.var: ref %X = var y diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index c2b3839054c6..da4fb6b9b28e 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -22,9 +22,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.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] @@ -34,14 +34,14 @@ fn Main() { // 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 { @@ -52,7 +52,7 @@ fn Main() { // 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 @@ -76,8 +76,8 @@ fn Main() { // 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: @@ -89,11 +89,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_10.1: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_10.1: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: %.loc18_10.2: type = converted %.loc18_10.1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var -// CHECK:STDOUT: %.loc18_14: i32 = int_value 1 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_14: i32 = int_value 1 [template = constants.%.1] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -136,7 +136,7 @@ fn Main() { // 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: diff --git a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon index edf248bd0597..c4eaced8167a 100644 --- a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon +++ b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon @@ -58,10 +58,10 @@ var y2: bool = false or true; // CHECK:STDOUT: --- fail_todo_control_flow_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %.3: bool = bool_literal false [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } @@ -84,14 +84,14 @@ var y2: bool = false or true; // CHECK:STDOUT: .y2 = %y2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc23_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc23_9.2: type = converted %.loc23_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var -// CHECK:STDOUT: %.loc37_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc37_10.2: type = converted %.loc37_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x2.var: ref %.1 = var x2 -// CHECK:STDOUT: %x2: ref %.1 = bind_name x2, %x2.var +// CHECK:STDOUT: %.loc23_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc23_9.2: type = converted %.loc23_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var +// CHECK:STDOUT: %.loc37_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc37_10.2: type = converted %.loc37_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x2.var: ref %empty_tuple.type = var x2 +// CHECK:STDOUT: %x2: ref %empty_tuple.type = bind_name x2, %x2.var // CHECK:STDOUT: %bool.make_type.loc47: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc47_8.1: type = value_of_initializer %bool.make_type.loc47 [template = bool] // CHECK:STDOUT: %.loc47_8.2: type = converted %bool.make_type.loc47, %.loc47_8.1 [template = bool] @@ -108,7 +108,7 @@ var y2: bool = false or true; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc23: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc23 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/no_prelude/decl.carbon b/toolchain/check/testdata/var/no_prelude/decl.carbon index 546d552b2373..6fd50710afa3 100644 --- a/toolchain/check/testdata/var/no_prelude/decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl.carbon @@ -16,7 +16,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -29,10 +29,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon index 87ba8a6c6276..5ca2ea03d5b8 100644 --- a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon @@ -16,9 +16,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,13 +30,13 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init %.1 = tuple_init () to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init %.1 = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_16.2: init %empty_tuple.type = tuple_init () to %x.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_17: init %empty_tuple.type = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var, %.loc12_17 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/export_name.carbon b/toolchain/check/testdata/var/no_prelude/export_name.carbon index 3ca4be96d6bb..714b13c9024b 100644 --- a/toolchain/check/testdata/var/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/var/no_prelude/export_name.carbon @@ -46,27 +46,27 @@ var w: () = v; // CHECK:STDOUT: --- base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %v.var: ref %.1 = var v -// CHECK:STDOUT: %v: ref %.1 = bind_name v, %v.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %v.var: ref %empty_tuple.type = var v +// CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: ref %.1 = import_ref Main//base, inst+5, loaded +// CHECK:STDOUT: %import_ref: ref %empty_tuple.type = import_ref Main//base, inst+5, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -74,18 +74,18 @@ var w: () = v; // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %v: ref %.1 = export v, imports.%import_ref +// CHECK:STDOUT: %v: ref %empty_tuple.type = export v, imports.%import_ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_use_export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: ref %.1 = import_ref Main//export, inst+4, loaded [template = ] +// CHECK:STDOUT: %import_ref: ref %empty_tuple.type = import_ref Main//export, inst+4, loaded [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -94,17 +94,17 @@ var w: () = v; // CHECK:STDOUT: .w = %w // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc11_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %w.var: ref %.1 = var w -// CHECK:STDOUT: %w: ref %.1 = bind_name w, %w.var +// CHECK:STDOUT: %.loc11_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %w.var: ref %empty_tuple.type = var w +// CHECK:STDOUT: %w: ref %empty_tuple.type = bind_name w, %w.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: ref %.1 = name_ref v, imports.%import_ref [template = ] -// CHECK:STDOUT: %.loc11_13: init %.1 = tuple_init () to file.%w.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_14: init %.1 = converted %v.ref, %.loc11_13 [template = constants.%tuple] +// CHECK:STDOUT: %v.ref: ref %empty_tuple.type = name_ref v, imports.%import_ref [template = ] +// CHECK:STDOUT: %.loc11_13: init %empty_tuple.type = tuple_init () to file.%w.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_14: init %empty_tuple.type = converted %v.ref, %.loc11_13 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%w.var, %.loc11_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon index 59afbdb1a0f1..7711cf1823e8 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon @@ -24,9 +24,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,21 +38,21 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc13_11.2: type = converted %.loc13_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var.loc13: ref %.1 = var x -// CHECK:STDOUT: %x.loc13: ref %.1 = bind_name x, %x.var.loc13 -// CHECK:STDOUT: %.loc13_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc13_16.2: init %.1 = tuple_init () to %x.var.loc13 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_17: init %.1 = converted %.loc13_16.1, %.loc13_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc13_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc13_11.2: type = converted %.loc13_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var.loc13: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x.loc13: ref %empty_tuple.type = bind_name x, %x.var.loc13 +// CHECK:STDOUT: %.loc13_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc13_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc13 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_17: init %empty_tuple.type = converted %.loc13_16.1, %.loc13_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var.loc13, %.loc13_17 -// CHECK:STDOUT: %.loc20_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_11.2: type = converted %.loc20_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var.loc20: ref %.1 = var x -// CHECK:STDOUT: %x.loc20: ref %.1 = bind_name x, %x.var.loc20 -// CHECK:STDOUT: %.loc20_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_16.2: init %.1 = tuple_init () to %x.var.loc20 [template = constants.%tuple] -// CHECK:STDOUT: %.loc20_17: init %.1 = converted %.loc20_16.1, %.loc20_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc20_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_11.2: type = converted %.loc20_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var.loc20: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x.loc20: ref %empty_tuple.type = bind_name x, %x.var.loc20 +// CHECK:STDOUT: %.loc20_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc20 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc20_17: init %empty_tuple.type = converted %.loc20_16.1, %.loc20_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var.loc20, %.loc20_17 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon index a6d712565e09..94f80ca1e786 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon @@ -19,10 +19,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %x: %.1 = bind_symbolic_name x [symbolic] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x [symbolic] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,13 +34,13 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: %.1 = bind_symbolic_name x, %x.var [symbolic = constants.%x] -// CHECK:STDOUT: %.loc15_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_17.2: init %.1 = tuple_init () to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_18: init %.1 = converted %.loc15_17.1, %.loc15_17.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x, %x.var [symbolic = constants.%x] +// CHECK:STDOUT: %.loc15_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_17.2: init %empty_tuple.type = tuple_init () to %x.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_18: init %empty_tuple.type = converted %.loc15_17.1, %.loc15_17.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var, %.loc15_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon index cd455e5ad5cd..e8481a6019b8 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon @@ -19,10 +19,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,14 +34,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %.2 = struct_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_16.2: %.1 = converted %.loc15_16.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_17: %.2 = converted %.loc15_16.1, [template = ] +// CHECK:STDOUT: %.loc15_11.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc15_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_16.2: %empty_tuple.type = converted %.loc15_16.1, %empty_tuple [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_17: %.1 = converted %.loc15_16.1, [template = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon index cc59108ec608..109caf7855a9 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon @@ -19,7 +19,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,10 +32,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon index 7c140d306b99..0b8c74632c3b 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon @@ -21,7 +21,7 @@ var y: () = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -31,18 +31,18 @@ var y: () = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} -// CHECK:STDOUT: %.loc18_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc18_9.2: type = converted %.loc18_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %y.var: ref %.1 = var y -// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var +// CHECK:STDOUT: %.loc18_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc18_9.2: type = converted %.loc18_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %y.var: ref %empty_tuple.type = var y +// CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon index 276a2e8369f3..0423bd01a922 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon @@ -44,7 +44,7 @@ abstract var e: (); // CHECK:STDOUT: --- fail_modifiers.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,21 +54,21 @@ abstract var e: (); // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_19.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_19.2: type = converted %.loc15_19.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref %.1 = var b -// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var -// CHECK:STDOUT: %.loc24_27.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc24_27.2: type = converted %.loc24_27.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %c.var: ref %.1 = var c -// CHECK:STDOUT: %c: ref %.1 = bind_name c, %c.var -// CHECK:STDOUT: %.loc37_29.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc37_29.2: type = converted %.loc37_29.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref %.1 = var d -// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var -// CHECK:STDOUT: %.loc42_18.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc42_18.2: type = converted %.loc42_18.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref %.1 = var e -// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var +// CHECK:STDOUT: %.loc15_19.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_19.2: type = converted %.loc15_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b +// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var +// CHECK:STDOUT: %.loc24_27.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc24_27.2: type = converted %.loc24_27.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %c.var: ref %empty_tuple.type = var c +// CHECK:STDOUT: %c: ref %empty_tuple.type = bind_name c, %c.var +// CHECK:STDOUT: %.loc37_29.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc37_29.2: type = converted %.loc37_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d +// CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var +// CHECK:STDOUT: %.loc42_18.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc42_18.2: type = converted %.loc42_18.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e +// CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon index 983625760744..85c8c309a068 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon @@ -30,8 +30,8 @@ var A: () = (); // CHECK:STDOUT: --- fail_namespace_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,21 +39,21 @@ var A: () = (); // CHECK:STDOUT: .A = %A.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: %A.loc11: = namespace [template] {} -// CHECK:STDOUT: %.loc20_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc20_9.2: type = converted %.loc20_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %A.var.loc20: ref %.1 = var A -// CHECK:STDOUT: %A.loc20: ref %.1 = bind_name A, %A.var.loc20 -// CHECK:STDOUT: %.loc28_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc28_9.2: type = converted %.loc28_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %A.var.loc28: ref %.1 = var A -// CHECK:STDOUT: %A.loc28: ref %.1 = bind_name A, %A.var.loc28 +// CHECK:STDOUT: %.loc20_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_9.2: type = converted %.loc20_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %A.var.loc20: ref %empty_tuple.type = var A +// CHECK:STDOUT: %A.loc20: ref %empty_tuple.type = bind_name A, %A.var.loc20 +// CHECK:STDOUT: %.loc28_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc28_9.2: type = converted %.loc28_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %A.var.loc28: ref %empty_tuple.type = var A +// CHECK:STDOUT: %A.loc28: ref %empty_tuple.type = bind_name A, %A.var.loc28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc28_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc28_14.2: init %.1 = tuple_init () to file.%A.var.loc28 [template = constants.%tuple] -// CHECK:STDOUT: %.loc28_15: init %.1 = converted %.loc28_14.1, %.loc28_14.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc28_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc28_14.2: init %empty_tuple.type = tuple_init () to file.%A.var.loc28 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc28_15: init %empty_tuple.type = converted %.loc28_14.1, %.loc28_14.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%A.var.loc28, %.loc28_15 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_decl.carbon b/toolchain/check/testdata/var/no_prelude/global_decl.carbon index 52703b065d83..ef155eb1cb9f 100644 --- a/toolchain/check/testdata/var/no_prelude/global_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_decl.carbon @@ -13,18 +13,18 @@ var x: {.v: ()}; // CHECK:STDOUT: --- global_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %.1} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon b/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon index 7e11780910dc..978480f63ac3 100644 --- a/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon @@ -13,32 +13,32 @@ var x: {.v: ()} = {.v = ()}; // CHECK:STDOUT: --- global_decl_with_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %.1} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: %.2 = struct_literal (%.loc11_26.1) -// CHECK:STDOUT: %.loc11_27.2: ref %.1 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_26.2: init %.1 = tuple_init () to %.loc11_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.3: init %.1 = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init %.2 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26.1) +// CHECK:STDOUT: %.loc11_27.2: ref %empty_tuple.type = struct_access file.%x.var, element0 +// CHECK:STDOUT: %.loc11_26.2: init %empty_tuple.type = tuple_init () to %.loc11_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_27.3: init %empty_tuple.type = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_27.4: init %.1 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_lookup.carbon b/toolchain/check/testdata/var/no_prelude/global_lookup.carbon index 566e9c5ae64e..c12791d38adf 100644 --- a/toolchain/check/testdata/var/no_prelude/global_lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_lookup.carbon @@ -14,10 +14,10 @@ var y: {.v: ()} = x; // CHECK:STDOUT: --- global_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -25,35 +25,35 @@ var y: {.v: ()} = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %.1} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_14.2: type = converted %.loc12_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_15: type = struct_type {.v: %.1} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var +// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_14.2: type = converted %.loc12_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc12_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] +// CHECK:STDOUT: %y.var: ref %.1 = var y +// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: %.2 = struct_literal (%.loc11_26.1) -// CHECK:STDOUT: %.loc11_27.2: ref %.1 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_26.2: init %.1 = tuple_init () to %.loc11_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.3: init %.1 = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init %.2 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26.1) +// CHECK:STDOUT: %.loc11_27.2: ref %empty_tuple.type = struct_access file.%x.var, element0 +// CHECK:STDOUT: %.loc11_26.2: init %empty_tuple.type = tuple_init () to %.loc11_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_27.3: init %empty_tuple.type = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_27.4: init %.1 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_19.1: ref %.1 = struct_access %x.ref, element0 -// CHECK:STDOUT: %.loc12_19.2: ref %.1 = struct_access file.%y.var, element0 -// CHECK:STDOUT: %.loc12_19.3: init %.1 = tuple_init () to %.loc12_19.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_19.4: init %.1 = converted %.loc12_19.1, %.loc12_19.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_19.5: init %.2 = struct_init (%.loc12_19.4) to file.%y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_20: init %.2 = converted %x.ref, %.loc12_19.5 [template = constants.%struct] +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x +// CHECK:STDOUT: %.loc12_19.1: ref %empty_tuple.type = struct_access %x.ref, element0 +// CHECK:STDOUT: %.loc12_19.2: ref %empty_tuple.type = struct_access file.%y.var, element0 +// CHECK:STDOUT: %.loc12_19.3: init %empty_tuple.type = tuple_init () to %.loc12_19.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_19.4: init %empty_tuple.type = converted %.loc12_19.1, %.loc12_19.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_19.5: init %.1 = struct_init (%.loc12_19.4) to file.%y.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_20: init %.1 = converted %x.ref, %.loc12_19.5 [template = constants.%struct] // CHECK:STDOUT: assign file.%y.var, %.loc12_20 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon b/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon index 421a3ec22641..70027cfbf584 100644 --- a/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon @@ -17,10 +17,10 @@ fn Main() { // CHECK:STDOUT: --- global_lookup_in_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%tuple) [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = struct_type {.v: %empty_tuple.type} [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %struct: %.1 = struct_value (%empty_tuple) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } @@ -30,41 +30,41 @@ fn Main() { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %.1} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref %.2 = var x -// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_15: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_16.2: type = converted %.loc14_16.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_17: type = struct_type {.v: %.1} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref %.2 = var y -// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var -// CHECK:STDOUT: %x.ref: ref %.2 = name_ref x, file.%x -// CHECK:STDOUT: %.loc14_21.1: ref %.1 = struct_access %x.ref, element0 -// CHECK:STDOUT: %.loc14_21.2: ref %.1 = struct_access %y.var, element0 -// CHECK:STDOUT: %.loc14_21.3: init %.1 = tuple_init () to %.loc14_21.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21.4: init %.1 = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21.5: init %.2 = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_22: init %.2 = converted %x.ref, %.loc14_21.5 [template = constants.%struct] +// CHECK:STDOUT: %.loc14_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_16.2: type = converted %.loc14_16.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc14_17: type = struct_type {.v: %empty_tuple.type} [template = constants.%.1] +// CHECK:STDOUT: %y.var: ref %.1 = var y +// CHECK:STDOUT: %y: ref %.1 = bind_name y, %y.var +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x +// CHECK:STDOUT: %.loc14_21.1: ref %empty_tuple.type = struct_access %x.ref, element0 +// CHECK:STDOUT: %.loc14_21.2: ref %empty_tuple.type = struct_access %y.var, element0 +// CHECK:STDOUT: %.loc14_21.3: init %empty_tuple.type = tuple_init () to %.loc14_21.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_21.4: init %empty_tuple.type = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_21.5: init %.1 = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_22: init %.1 = converted %x.ref, %.loc14_21.5 [template = constants.%struct] // CHECK:STDOUT: assign %y.var, %.loc14_22 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: %.2 = struct_literal (%.loc11_26.1) -// CHECK:STDOUT: %.loc11_27.2: ref %.1 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_26.2: init %.1 = tuple_init () to %.loc11_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.3: init %.1 = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init %.2 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_27.1: %.1 = struct_literal (%.loc11_26.1) +// CHECK:STDOUT: %.loc11_27.2: ref %empty_tuple.type = struct_access file.%x.var, element0 +// CHECK:STDOUT: %.loc11_26.2: init %empty_tuple.type = tuple_init () to %.loc11_27.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_27.3: init %empty_tuple.type = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_27.4: init %.1 = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init %.1 = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/import.carbon b/toolchain/check/testdata/var/no_prelude/import.carbon index 49d8c78941fd..a4ea7a0052bf 100644 --- a/toolchain/check/testdata/var/no_prelude/import.carbon +++ b/toolchain/check/testdata/var/no_prelude/import.carbon @@ -23,25 +23,25 @@ var a: () = a_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .a_ref = %a_ref // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_13.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_13.2: type = converted %.loc4_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a_ref.var: ref %.1 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.1 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %.loc4_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_13.2: type = converted %.loc4_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a_ref.var: ref %empty_tuple.type = var a_ref +// CHECK:STDOUT: %a_ref: ref %empty_tuple.type = bind_name a_ref, %a_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_18.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_18.2: init %.1 = tuple_init () to file.%a_ref.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_19: init %.1 = converted %.loc4_18.1, %.loc4_18.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc4_18.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_18.2: init %empty_tuple.type = tuple_init () to file.%a_ref.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_19: init %empty_tuple.type = converted %.loc4_18.1, %.loc4_18.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_19 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -49,12 +49,12 @@ var a: () = a_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: ref %.1 = import_ref Implicit//default, inst+5, loaded +// CHECK:STDOUT: %import_ref: ref %empty_tuple.type = import_ref Implicit//default, inst+5, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -64,17 +64,17 @@ var a: () = a_ref; // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref %.1 = var a -// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a +// CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.1 = name_ref a_ref, imports.%import_ref -// CHECK:STDOUT: %.loc4_13: init %.1 = tuple_init () to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_18: init %.1 = converted %a_ref.ref, %.loc4_13 [template = constants.%tuple] +// CHECK:STDOUT: %a_ref.ref: ref %empty_tuple.type = name_ref a_ref, imports.%import_ref +// CHECK:STDOUT: %.loc4_13: init %empty_tuple.type = tuple_init () to file.%a.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_18: init %empty_tuple.type = converted %a_ref.ref, %.loc4_13 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%a.var, %.loc4_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/import_access.carbon b/toolchain/check/testdata/var/no_prelude/import_access.carbon index 82e0cce0e8b4..d18c8f20c3fb 100644 --- a/toolchain/check/testdata/var/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/var/no_prelude/import_access.carbon @@ -54,25 +54,25 @@ var v2: () = Test.v; // CHECK:STDOUT: --- def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v [private] = %v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %v.var: ref %.1 = var v -// CHECK:STDOUT: %v: ref %.1 = bind_name v, %v.var +// CHECK:STDOUT: %.loc4_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %v.var: ref %empty_tuple.type = var v +// CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_22.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_22.2: init %.1 = tuple_init () to file.%v.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_23: init %.1 = converted %.loc4_22.1, %.loc4_22.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc4_22.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_22.2: init %empty_tuple.type = tuple_init () to file.%v.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_23: init %empty_tuple.type = converted %.loc4_22.1, %.loc4_22.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%v.var, %.loc4_23 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -80,12 +80,12 @@ var v2: () = Test.v; // CHECK:STDOUT: --- def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref: ref %.1 = import_ref Test//def, inst+5, loaded +// CHECK:STDOUT: %import_ref: ref %empty_tuple.type = import_ref Test//def, inst+5, loaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -95,17 +95,17 @@ var v2: () = Test.v; // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %v2.var: ref %.1 = var v2 -// CHECK:STDOUT: %v2: ref %.1 = bind_name v2, %v2.var +// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %v2.var: ref %empty_tuple.type = var v2 +// CHECK:STDOUT: %v2: ref %empty_tuple.type = bind_name v2, %v2.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: ref %.1 = name_ref v, imports.%import_ref -// CHECK:STDOUT: %.loc4_14: init %.1 = tuple_init () to file.%v2.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_15: init %.1 = converted %v.ref, %.loc4_14 [template = constants.%tuple] +// CHECK:STDOUT: %v.ref: ref %empty_tuple.type = name_ref v, imports.%import_ref +// CHECK:STDOUT: %.loc4_14: init %empty_tuple.type = tuple_init () to file.%v2.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc4_15: init %empty_tuple.type = converted %v.ref, %.loc4_14 [template = constants.%empty_tuple] // CHECK:STDOUT: assign file.%v2.var, %.loc4_15 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -113,7 +113,7 @@ var v2: () = Test.v; // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -121,10 +121,10 @@ var v2: () = Test.v; // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %v2.var: ref %.1 = var v2 -// CHECK:STDOUT: %v2: ref %.1 = bind_name v2, %v2.var +// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %v2.var: ref %empty_tuple.type = var v2 +// CHECK:STDOUT: %v2: ref %empty_tuple.type = bind_name v2, %v2.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -137,7 +137,7 @@ var v2: () = Test.v; // CHECK:STDOUT: --- fail_other_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -152,10 +152,10 @@ var v2: () = Test.v; // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc9_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc9_10.2: type = converted %.loc9_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %v2.var: ref %.1 = var v2 -// CHECK:STDOUT: %v2: ref %.1 = bind_name v2, %v2.var +// CHECK:STDOUT: %.loc9_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_10.2: type = converted %.loc9_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %v2.var: ref %empty_tuple.type = var v2 +// CHECK:STDOUT: %v2: ref %empty_tuple.type = bind_name v2, %v2.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/var/no_prelude/lookup.carbon b/toolchain/check/testdata/var/no_prelude/lookup.carbon index 883c00547c4f..94f57d850efc 100644 --- a/toolchain/check/testdata/var/no_prelude/lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/lookup.carbon @@ -17,9 +17,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,15 +31,15 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init %.1 = tuple_init () to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init %.1 = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12_16.2: init %empty_tuple.type = tuple_init () to %x.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_17: init %empty_tuple.type = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var, %.loc12_17 -// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/no_prelude/shadowing.carbon b/toolchain/check/testdata/var/no_prelude/shadowing.carbon index a771a46fe546..b26899d53e7f 100644 --- a/toolchain/check/testdata/var/no_prelude/shadowing.carbon +++ b/toolchain/check/testdata/var/no_prelude/shadowing.carbon @@ -27,10 +27,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal true [template] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] +// CHECK:STDOUT: %.1: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,43 +44,43 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_12.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %NS.var: ref %.1 = var NS -// CHECK:STDOUT: %NS: ref %.1 = bind_name NS, %NS.var -// CHECK:STDOUT: %.loc14_17.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc14_17.2: init %.1 = tuple_init () to %NS.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_18: init %.1 = converted %.loc14_17.1, %.loc14_17.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %NS.var: ref %empty_tuple.type = var NS +// CHECK:STDOUT: %NS: ref %empty_tuple.type = bind_name NS, %NS.var +// CHECK:STDOUT: %.loc14_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_17.2: init %empty_tuple.type = tuple_init () to %NS.var [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc14_18: init %empty_tuple.type = converted %.loc14_17.1, %.loc14_17.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %NS.var, %.loc14_18 -// CHECK:STDOUT: %NS.ref: ref %.1 = name_ref NS, %NS -// CHECK:STDOUT: %.loc15_9.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc15_9.2: init %.1 = tuple_init () to %NS.ref [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_6: init %.1 = converted %.loc15_9.1, %.loc15_9.2 [template = constants.%tuple] +// CHECK:STDOUT: %NS.ref: ref %empty_tuple.type = name_ref NS, %NS +// CHECK:STDOUT: %.loc15_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_9.2: init %empty_tuple.type = tuple_init () to %NS.ref [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc15_6: init %empty_tuple.type = converted %.loc15_9.1, %.loc15_9.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %NS.ref, %.loc15_6 -// CHECK:STDOUT: %.loc17_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc17_11.2: type = converted %.loc17_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var.loc17: ref %.1 = var x -// CHECK:STDOUT: %x.loc17: ref %.1 = bind_name x, %x.var.loc17 -// CHECK:STDOUT: %.loc17_16.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc17_16.2: init %.1 = tuple_init () to %x.var.loc17 [template = constants.%tuple] -// CHECK:STDOUT: %.loc17_17: init %.1 = converted %.loc17_16.1, %.loc17_16.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc17_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc17_11.2: type = converted %.loc17_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var.loc17: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x.loc17: ref %empty_tuple.type = bind_name x, %x.var.loc17 +// CHECK:STDOUT: %.loc17_16.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc17_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc17 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc17_17: init %empty_tuple.type = converted %.loc17_16.1, %.loc17_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var.loc17, %.loc17_17 -// CHECK:STDOUT: %.loc18: bool = bool_literal true [template = constants.%.2] +// CHECK:STDOUT: %.loc18: bool = bool_literal true [template = constants.%.1] // CHECK:STDOUT: if %.loc18 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc19_13.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_13.2: type = converted %.loc19_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var.loc19: ref %.1 = var x -// CHECK:STDOUT: %x.loc19: ref %.1 = bind_name x, %x.var.loc19 -// CHECK:STDOUT: %.loc19_18.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_18.2: init %.1 = tuple_init () to %x.var.loc19 [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_19: init %.1 = converted %.loc19_18.1, %.loc19_18.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc19_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_13.2: type = converted %.loc19_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var.loc19: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x.loc19: ref %empty_tuple.type = bind_name x, %x.var.loc19 +// CHECK:STDOUT: %.loc19_18.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_18.2: init %empty_tuple.type = tuple_init () to %x.var.loc19 [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc19_19: init %empty_tuple.type = converted %.loc19_18.1, %.loc19_18.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var.loc19, %.loc19_19 -// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, %x.loc19 -// CHECK:STDOUT: %.loc22_10.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc22_10.2: init %.1 = tuple_init () to %x.ref [template = constants.%tuple] -// CHECK:STDOUT: %.loc22_7: init %.1 = converted %.loc22_10.1, %.loc22_10.2 [template = constants.%tuple] +// CHECK:STDOUT: %x.ref: ref %empty_tuple.type = name_ref x, %x.loc19 +// CHECK:STDOUT: %.loc22_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_10.2: init %empty_tuple.type = tuple_init () to %x.ref [template = constants.%empty_tuple] +// CHECK:STDOUT: %.loc22_7: init %empty_tuple.type = converted %.loc22_10.1, %.loc22_10.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.ref, %.loc22_7 // CHECK:STDOUT: br !if.else // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 3cfd2925e64c..e1744532d543 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -176,24 +176,24 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.2: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%Member [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type, %J.type [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @I.%Second [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %J.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @I.%Second [template] // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = facet_type [template] -// CHECK:STDOUT: %U: %.6 = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %U.patt: %.6 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %.5: type = facet_type [template] +// CHECK:STDOUT: %U: %.5 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %.5 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %EqualEqual.type: type = fn_type @EqualEqual [template] // CHECK:STDOUT: %EqualEqual: %EqualEqual.type = struct_value () [template] // CHECK:STDOUT: %.Self.2: %J.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.7: type = facet_type [template] -// CHECK:STDOUT: %V: %.7 = bind_symbolic_name V, 0 [symbolic] -// CHECK:STDOUT: %V.patt: %.7 = symbolic_binding_pattern V, 0 [symbolic] +// CHECK:STDOUT: %.6: type = facet_type [template] +// CHECK:STDOUT: %V: %.6 = bind_symbolic_name V, 0 [symbolic] +// CHECK:STDOUT: %V.patt: %.6 = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] // CHECK:STDOUT: %Impls: %Impls.type = struct_value () [template] -// CHECK:STDOUT: %.8: type = facet_type [template] -// CHECK:STDOUT: %W: %.8 = bind_symbolic_name W, 0 [symbolic] -// CHECK:STDOUT: %W.patt: %.8 = symbolic_binding_pattern W, 0 [symbolic] +// CHECK:STDOUT: %.7: type = facet_type [template] +// CHECK:STDOUT: %W: %.7 = bind_symbolic_name W, 0 [symbolic] +// CHECK:STDOUT: %W.patt: %.7 = symbolic_binding_pattern W, 0 [symbolic] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: } @@ -218,22 +218,22 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %EqualEqual.decl: %EqualEqual.type = fn_decl @EqualEqual [template = constants.%EqualEqual] { -// CHECK:STDOUT: %U.patt.loc11_15.1: %.6 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.param_patt: %.6 = value_param_pattern %U.patt.loc11_15.1, runtime_param [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc11_15.1: %.5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.param_patt: %.5 = value_param_pattern %U.patt.loc11_15.1, runtime_param [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc11_37: %.3 = tuple_literal () -// CHECK:STDOUT: %.loc11_21: type = where_expr %.Self [template = constants.%.6] { +// CHECK:STDOUT: %.loc11_37: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_21: type = where_expr %.Self [template = constants.%.5] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc11_37 // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.6 = value_param runtime_param -// CHECK:STDOUT: %U.loc11_15.1: %.6 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_15.2 (constants.%U)] +// CHECK:STDOUT: %U.param: %.5 = value_param runtime_param +// CHECK:STDOUT: %U.loc11_15.1: %.5 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_15.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Impls.decl: %Impls.type = fn_decl @Impls [template = constants.%Impls] { -// CHECK:STDOUT: %V.patt.loc13_10.1: %.7 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.param_patt: %.7 = value_param_pattern %V.patt.loc13_10.1, runtime_param [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc13_10.1: %.6 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.param_patt: %.6 = value_param_pattern %V.patt.loc13_10.1, runtime_param [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] @@ -241,15 +241,15 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.loc13_22.1: type = facet_type_access %.Self.ref [symbolic = constants.%.Self.2] // CHECK:STDOUT: %.loc13_22.2: type = converted %.Self.ref, %.loc13_22.1 [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.loc13_16: type = where_expr %.Self [template = constants.%.7] { +// CHECK:STDOUT: %.loc13_16: type = where_expr %.Self [template = constants.%.6] { // CHECK:STDOUT: requirement_impls %.loc13_22.2, %I.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %V.param: %.7 = value_param runtime_param -// CHECK:STDOUT: %V.loc13_10.1: %.7 = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc13_10.2 (constants.%V)] +// CHECK:STDOUT: %V.param: %.6 = value_param runtime_param +// CHECK:STDOUT: %V.loc13_10.1: %.6 = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc13_10.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [template = constants.%And] { -// CHECK:STDOUT: %W.patt.loc15_8.1: %.8 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.param_patt: %.8 = value_param_pattern %W.patt.loc15_8.1, runtime_param [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc15_8.1: %.7 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.param_patt: %.7 = value_param_pattern %W.patt.loc15_8.1, runtime_param [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] @@ -259,13 +259,13 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.loc15_20.2: type = converted %.Self.ref.loc15_20, %.loc15_20.1 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref.loc15_38: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] // CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc7 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_50: %.3 = tuple_literal () -// CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [template = constants.%.8] { +// CHECK:STDOUT: %.loc15_50: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [template = constants.%.7] { // CHECK:STDOUT: requirement_impls %.loc15_20.2, %J.ref // CHECK:STDOUT: requirement_equivalent %Member.ref, %.loc15_50 // CHECK:STDOUT: } -// CHECK:STDOUT: %W.param: %.8 = value_param runtime_param -// CHECK:STDOUT: %W.loc15_8.1: %.8 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc15_8.2 (constants.%W)] +// CHECK:STDOUT: %W.param: %.7 = value_param runtime_param +// CHECK:STDOUT: %W.loc15_8.1: %.7 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc15_8.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -283,7 +283,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %Member [template = constants.%.2] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %Second: %J.type = assoc_const_decl Second [template] -// CHECK:STDOUT: %.loc8: %.4 = assoc_entity element1, %Second [template = constants.%.5] +// CHECK:STDOUT: %.loc8: %.3 = assoc_entity element1, %Second [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -292,25 +292,25 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: witness = (%Member, %Second) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EqualEqual(%U.loc11_15.1: %.6) { -// CHECK:STDOUT: %U.loc11_15.2: %.6 = bind_symbolic_name U, 0 [symbolic = %U.loc11_15.2 (constants.%U)] -// CHECK:STDOUT: %U.patt.loc11_15.2: %.6 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] +// CHECK:STDOUT: generic fn @EqualEqual(%U.loc11_15.1: %.5) { +// CHECK:STDOUT: %U.loc11_15.2: %.5 = bind_symbolic_name U, 0 [symbolic = %U.loc11_15.2 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc11_15.2: %.5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: %.6); +// CHECK:STDOUT: fn(%U.param_patt: %.5); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Impls(%V.loc13_10.1: %.7) { -// CHECK:STDOUT: %V.loc13_10.2: %.7 = bind_symbolic_name V, 0 [symbolic = %V.loc13_10.2 (constants.%V)] -// CHECK:STDOUT: %V.patt.loc13_10.2: %.7 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] +// CHECK:STDOUT: generic fn @Impls(%V.loc13_10.1: %.6) { +// CHECK:STDOUT: %V.loc13_10.2: %.6 = bind_symbolic_name V, 0 [symbolic = %V.loc13_10.2 (constants.%V)] +// CHECK:STDOUT: %V.patt.loc13_10.2: %.6 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%V.param_patt: %.7); +// CHECK:STDOUT: fn(%V.param_patt: %.6); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @And(%W.loc15_8.1: %.8) { -// CHECK:STDOUT: %W.loc15_8.2: %.8 = bind_symbolic_name W, 0 [symbolic = %W.loc15_8.2 (constants.%W)] -// CHECK:STDOUT: %W.patt.loc15_8.2: %.8 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] +// CHECK:STDOUT: generic fn @And(%W.loc15_8.1: %.7) { +// CHECK:STDOUT: %W.loc15_8.2: %.7 = bind_symbolic_name W, 0 [symbolic = %W.loc15_8.2 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc15_8.2: %.7 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%W.param_patt: %.8); +// CHECK:STDOUT: fn(%W.param_patt: %.7); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @EqualEqual(constants.%U) { @@ -336,8 +336,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.1: type = assoc_entity_type %N.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @N.%P [template] // CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = struct_type {} [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] @@ -347,18 +347,18 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.3: %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: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.1) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.1) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %struct: %.4 = struct_value () [template] -// CHECK:STDOUT: %.10: type = facet_type [template] -// CHECK:STDOUT: %T: %.10 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt: %.10 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %struct: %.3 = struct_value () [template] +// CHECK:STDOUT: %.9: type = facet_type [template] +// CHECK:STDOUT: %T: %.9 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt: %.9 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [template] // CHECK:STDOUT: } @@ -371,7 +371,7 @@ let B: type where .Self impls A = D; // 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 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // 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 @@ -386,22 +386,22 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %N.decl: type = interface_decl @N [template = constants.%N.type] {} {} // CHECK:STDOUT: %Equal.decl: %Equal.type = fn_decl @Equal [template = constants.%Equal] { -// CHECK:STDOUT: %T.patt.loc15_10.1: %.10 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.param_patt: %.10 = value_param_pattern %T.patt.loc15_10.1, runtime_param [symbolic = %T.patt.loc15_10.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_10.1: %.9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_10.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.param_patt: %.9 = value_param_pattern %T.patt.loc15_10.1, runtime_param [symbolic = %T.patt.loc15_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [template = constants.%N.type] // CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %P.ref: %.1 = name_ref P, @N.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_28.1: %.4 = struct_literal () -// CHECK:STDOUT: %struct: %.4 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc15_28.2: %.4 = converted %.loc15_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_28.1: %.3 = struct_literal () +// CHECK:STDOUT: %struct: %.3 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc15_28.2: %.3 = converted %.loc15_28.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc15_28.3: %.1 = converted %.loc15_28.1, [template = ] -// CHECK:STDOUT: %.loc15_16: type = where_expr %.Self [template = constants.%.10] { +// CHECK:STDOUT: %.loc15_16: type = where_expr %.Self [template = constants.%.9] { // CHECK:STDOUT: requirement_rewrite %P.ref, // CHECK:STDOUT: } -// CHECK:STDOUT: %T.param: %.10 = value_param runtime_param -// CHECK:STDOUT: %T.loc15_10.1: %.10 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_10.2 (constants.%T)] +// CHECK:STDOUT: %T.param: %.9 = value_param runtime_param +// CHECK:STDOUT: %T.loc15_10.1: %.9 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_10.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -425,8 +425,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.5)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -444,11 +444,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.3)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal(%T.loc15_10.1: %.10) { -// CHECK:STDOUT: %T.loc15_10.2: %.10 = bind_symbolic_name T, 0 [symbolic = %T.loc15_10.2 (constants.%T)] -// CHECK:STDOUT: %T.patt.loc15_10.2: %.10 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_10.2 (constants.%T.patt)] +// CHECK:STDOUT: generic fn @Equal(%T.loc15_10.1: %.9) { +// CHECK:STDOUT: %T.loc15_10.2: %.9 = bind_symbolic_name T, 0 [symbolic = %T.loc15_10.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc15_10.2: %.9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_10.2 (constants.%T.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: %.10); +// CHECK:STDOUT: fn(%T.param_patt: %.9); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -481,8 +481,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Equal(constants.%T) { @@ -499,9 +499,9 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.2: %M.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %K.type: type = interface_type @K [template] // CHECK:STDOUT: %Self.3: %K.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %K.type, %L.type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @K.%Associated [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %K.type, %L.type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @K.%Associated [template] // CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] @@ -512,17 +512,17 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.5: %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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [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: %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: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %.9: type = facet_type [template] -// CHECK:STDOUT: %W: %.9 = bind_symbolic_name W, 0 [symbolic] -// CHECK:STDOUT: %W.patt: %.9 = symbolic_binding_pattern W, 0 [symbolic] +// 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: %.8: type = facet_type [template] +// CHECK:STDOUT: %W: %.8 = bind_symbolic_name W, 0 [symbolic] +// CHECK:STDOUT: %W.patt: %.8 = symbolic_binding_pattern W, 0 [symbolic] // CHECK:STDOUT: %AssociatedTypeImpls.type: type = fn_type @AssociatedTypeImpls [template] // CHECK:STDOUT: %AssociatedTypeImpls: %AssociatedTypeImpls.type = struct_value () [template] // CHECK:STDOUT: } @@ -535,7 +535,7 @@ let B: type where .Self impls A = D; // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ -554,20 +554,20 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %M.decl: type = interface_decl @M [template = constants.%M.type] {} {} // CHECK:STDOUT: %K.decl: type = interface_decl @K [template = constants.%K.type] {} {} // CHECK:STDOUT: %AssociatedTypeImpls.decl: %AssociatedTypeImpls.type = fn_decl @AssociatedTypeImpls [template = constants.%AssociatedTypeImpls] { -// CHECK:STDOUT: %W.patt.loc18_24.1: %.9 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc18_24.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.param_patt: %.9 = value_param_pattern %W.patt.loc18_24.1, runtime_param [symbolic = %W.patt.loc18_24.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc18_24.1: %.8 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc18_24.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.param_patt: %.8 = value_param_pattern %W.patt.loc18_24.1, runtime_param [symbolic = %W.patt.loc18_24.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Associated.ref: %.2 = name_ref Associated, @K.%.loc8 [template = constants.%.3] +// CHECK:STDOUT: %Associated.ref: %.1 = name_ref Associated, @K.%.loc8 [template = constants.%.2] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [template = constants.%M.type] // CHECK:STDOUT: %.loc18_36: type = converted %Associated.ref, [template = ] -// CHECK:STDOUT: %.loc18_30: type = where_expr %.Self [template = constants.%.9] { +// CHECK:STDOUT: %.loc18_30: type = where_expr %.Self [template = constants.%.8] { // CHECK:STDOUT: requirement_impls , %M.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %W.param: %.9 = value_param runtime_param -// CHECK:STDOUT: %W.loc18_24.1: %.9 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc18_24.2 (constants.%W)] +// CHECK:STDOUT: %W.param: %.8 = value_param runtime_param +// CHECK:STDOUT: %W.loc18_24.1: %.8 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc18_24.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -591,7 +591,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %Associated: %L.type = assoc_const_decl Associated [template] -// CHECK:STDOUT: %.loc8: %.2 = assoc_entity element0, %Associated [template = constants.%.3] +// CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %Associated [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -608,8 +608,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.5)] // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -627,11 +627,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.5)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AssociatedTypeImpls(%W.loc18_24.1: %.9) { -// CHECK:STDOUT: %W.loc18_24.2: %.9 = bind_symbolic_name W, 0 [symbolic = %W.loc18_24.2 (constants.%W)] -// CHECK:STDOUT: %W.patt.loc18_24.2: %.9 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc18_24.2 (constants.%W.patt)] +// CHECK:STDOUT: generic fn @AssociatedTypeImpls(%W.loc18_24.1: %.8) { +// CHECK:STDOUT: %W.loc18_24.2: %.8 = bind_symbolic_name W, 0 [symbolic = %W.loc18_24.2 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc18_24.2: %.8 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc18_24.2 (constants.%W.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%W.param_patt: %.9); +// CHECK:STDOUT: fn(%W.param_patt: %.8); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -664,8 +664,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self => constants.%Self.5 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AssociatedTypeImpls(constants.%W) { @@ -679,10 +679,10 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %I.type: type = interface_type @I [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.4: i32 = int_value 2 [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.3: i32 = int_value 2 [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] @@ -692,17 +692,17 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.3: %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: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.16 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.2) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.2) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.16 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.1) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.1) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.16 [template] -// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.17 [symbolic] -// CHECK:STDOUT: %.10: type = facet_type [template] -// CHECK:STDOUT: %X: %.10 = bind_symbolic_name X, 0 [symbolic] -// CHECK:STDOUT: %X.patt: %.10 = symbolic_binding_pattern X, 0 [symbolic] +// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.17 [symbolic] +// CHECK:STDOUT: %.9: type = facet_type [template] +// CHECK:STDOUT: %X: %.9 = bind_symbolic_name X, 0 [symbolic] +// CHECK:STDOUT: %X.patt: %.9 = symbolic_binding_pattern X, 0 [symbolic] // CHECK:STDOUT: %RewriteTypeMismatch.type: type = fn_type @RewriteTypeMismatch [template] // CHECK:STDOUT: %RewriteTypeMismatch: %RewriteTypeMismatch.type = struct_value () [template] // CHECK:STDOUT: } @@ -719,14 +719,14 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref Main//state_constraints, inst+9, unloaded -// CHECK:STDOUT: %import_ref.7: %.2 = import_ref Main//state_constraints, inst+13, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.7: %.1 = import_ref Main//state_constraints, inst+13, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.8 = import_ref Main//state_constraints, inst+19, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//state_constraints, inst+11, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//state_constraints, inst+17, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//state_constraints, inst+11, unloaded // CHECK:STDOUT: %import_ref.12: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.13 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.14: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.14: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] // CHECK:STDOUT: %import_ref.15 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.16 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.17 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -745,20 +745,20 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %RewriteTypeMismatch.decl: %RewriteTypeMismatch.type = fn_decl @RewriteTypeMismatch [template = constants.%RewriteTypeMismatch] { -// CHECK:STDOUT: %X.patt.loc16_24.1: %.10 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] -// CHECK:STDOUT: %X.param_patt: %.10 = value_param_pattern %X.patt.loc16_24.1, runtime_param [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.patt.loc16_24.1: %.9 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.param_patt: %.9 = value_param_pattern %X.patt.loc16_24.1, runtime_param [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.2 [template = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Member.ref: %.2 = name_ref Member, imports.%import_ref.7 [template = constants.%.3] -// CHECK:STDOUT: %.loc16_46.1: i32 = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc16_46.2: %.2 = converted %.loc16_46.1, [template = ] -// CHECK:STDOUT: %.loc16_30: type = where_expr %.Self [template = constants.%.10] { +// CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, imports.%import_ref.7 [template = constants.%.2] +// CHECK:STDOUT: %.loc16_46.1: i32 = int_value 2 [template = constants.%.3] +// CHECK:STDOUT: %.loc16_46.2: %.1 = converted %.loc16_46.1, [template = ] +// CHECK:STDOUT: %.loc16_30: type = where_expr %.Self [template = constants.%.9] { // CHECK:STDOUT: requirement_rewrite %Member.ref, // CHECK:STDOUT: } -// CHECK:STDOUT: %X.param: %.10 = value_param runtime_param -// CHECK:STDOUT: %X.loc16_24.1: %.10 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc16_24.2 (constants.%X)] +// CHECK:STDOUT: %X.param: %.9 = value_param runtime_param +// CHECK:STDOUT: %X.loc16_24.1: %.9 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc16_24.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -779,8 +779,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.5)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.16 [symbolic = %.2 (constants.%.6)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.16 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -798,11 +798,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.3)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @RewriteTypeMismatch(%X.loc16_24.1: %.10) { -// CHECK:STDOUT: %X.loc16_24.2: %.10 = bind_symbolic_name X, 0 [symbolic = %X.loc16_24.2 (constants.%X)] -// CHECK:STDOUT: %X.patt.loc16_24.2: %.10 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] +// CHECK:STDOUT: generic fn @RewriteTypeMismatch(%X.loc16_24.1: %.9) { +// CHECK:STDOUT: %X.loc16_24.2: %.9 = bind_symbolic_name X, 0 [symbolic = %X.loc16_24.2 (constants.%X)] +// CHECK:STDOUT: %X.patt.loc16_24.2: %.9 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%X.param_patt: %.10); +// CHECK:STDOUT: fn(%X.param_patt: %.9); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -826,17 +826,17 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.2) { -// CHECK:STDOUT: %Dest => constants.%.2 -// CHECK:STDOUT: %Dest.patt => constants.%.2 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.1) { +// CHECK:STDOUT: %Dest => constants.%.1 +// CHECK:STDOUT: %Dest.patt => constants.%.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.7 -// CHECK:STDOUT: %.2 => constants.%.8 +// CHECK:STDOUT: %.1 => constants.%.6 +// CHECK:STDOUT: %.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RewriteTypeMismatch(constants.%X) { @@ -850,7 +850,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %.1: i32 = int_value 7 [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] @@ -859,17 +859,17 @@ let B: type where .Self impls A = D; // 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: %.8: type = facet_type [template] -// CHECK:STDOUT: %U: %.8 = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %U.patt: %.8 = symbolic_binding_pattern U, 0 [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: %.7: type = facet_type [template] +// CHECK:STDOUT: %U: %.7 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %.7 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %NonTypeImpls.type: type = fn_type @NonTypeImpls [template] // CHECK:STDOUT: %NonTypeImpls: %NonTypeImpls.type = struct_value () [template] // CHECK:STDOUT: } @@ -882,7 +882,7 @@ let B: type where .Self impls A = D; // 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 @@ -895,17 +895,17 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NonTypeImpls.decl: %NonTypeImpls.type = fn_decl @NonTypeImpls [template = constants.%NonTypeImpls] { -// CHECK:STDOUT: %U.patt.loc11_17.1: %.8 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.param_patt: %.8 = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc11_17.1: %.7 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.param_patt: %.7 = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.loc11_32.1: i32 = int_value 7 [template = constants.%.1] // CHECK:STDOUT: %.loc11_32.2: type = converted %.loc11_32.1, [template = ] -// CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%.8] { +// CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%.7] { // CHECK:STDOUT: requirement_impls , type // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.8 = value_param runtime_param -// CHECK:STDOUT: %U.loc11_17.1: %.8 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_17.2 (constants.%U)] +// CHECK:STDOUT: %U.param: %.7 = value_param runtime_param +// CHECK:STDOUT: %U.loc11_17.1: %.7 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_17.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -918,8 +918,8 @@ let B: type where .Self impls A = D; // 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: @@ -937,11 +937,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonTypeImpls(%U.loc11_17.1: %.8) { -// CHECK:STDOUT: %U.loc11_17.2: %.8 = bind_symbolic_name U, 0 [symbolic = %U.loc11_17.2 (constants.%U)] -// CHECK:STDOUT: %U.patt.loc11_17.2: %.8 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] +// CHECK:STDOUT: generic fn @NonTypeImpls(%U.loc11_17.1: %.7) { +// CHECK:STDOUT: %U.loc11_17.2: %.7 = bind_symbolic_name U, 0 [symbolic = %U.loc11_17.2 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc11_17.2: %.7 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: %.8); +// CHECK:STDOUT: fn(%U.param_patt: %.7); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -974,8 +974,8 @@ let B: type where .Self impls A = D; // 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: // CHECK:STDOUT: specific @NonTypeImpls(constants.%U) { @@ -989,7 +989,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %.1: i32 = int_value 7 [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] @@ -998,17 +998,17 @@ let B: type where .Self impls A = D; // 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: %.8: type = facet_type [template] -// CHECK:STDOUT: %U: %.8 = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %U.patt: %.8 = symbolic_binding_pattern U, 0 [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: %.7: type = facet_type [template] +// CHECK:STDOUT: %U: %.7 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %.7 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %ImplsNonType.type: type = fn_type @ImplsNonType [template] // CHECK:STDOUT: %ImplsNonType: %ImplsNonType.type = struct_value () [template] // CHECK:STDOUT: } @@ -1021,7 +1021,7 @@ let B: type where .Self impls A = D; // 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 @@ -1034,18 +1034,18 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplsNonType.decl: %ImplsNonType.type = fn_decl @ImplsNonType [template = constants.%ImplsNonType] { -// CHECK:STDOUT: %U.patt.loc11_17.1: %.8 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.param_patt: %.8 = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc11_17.1: %.7 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.param_patt: %.7 = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %.loc11_44.1: i32 = int_value 7 [template = constants.%.1] // CHECK:STDOUT: %.loc11_44.2: type = converted %.loc11_44.1, [template = ] -// CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%.8] { +// CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%.7] { // CHECK:STDOUT: requirement_impls %.Self.ref, // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.8 = value_param runtime_param -// CHECK:STDOUT: %U.loc11_17.1: %.8 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_17.2 (constants.%U)] +// CHECK:STDOUT: %U.param: %.7 = value_param runtime_param +// CHECK:STDOUT: %U.loc11_17.1: %.7 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_17.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1058,8 +1058,8 @@ let B: type where .Self impls A = D; // 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: @@ -1077,11 +1077,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplsNonType(%U.loc11_17.1: %.8) { -// CHECK:STDOUT: %U.loc11_17.2: %.8 = bind_symbolic_name U, 0 [symbolic = %U.loc11_17.2 (constants.%U)] -// CHECK:STDOUT: %U.patt.loc11_17.2: %.8 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] +// CHECK:STDOUT: generic fn @ImplsNonType(%U.loc11_17.1: %.7) { +// CHECK:STDOUT: %U.loc11_17.2: %.7 = bind_symbolic_name U, 0 [symbolic = %U.loc11_17.2 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc11_17.2: %.7 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: %.8); +// CHECK:STDOUT: fn(%U.param_patt: %.7); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -1114,8 +1114,8 @@ let B: type where .Self impls A = D; // 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: // CHECK:STDOUT: specific @ImplsNonType(constants.%U) { @@ -1128,11 +1128,11 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] // 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 = facet_type [template] -// CHECK:STDOUT: %U: %.2 = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %U.patt: %.2 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_type [template] +// CHECK:STDOUT: %U: %.1 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %.1 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %ImplsOfNonFacetType.type: type = fn_type @ImplsOfNonFacetType [template] // CHECK:STDOUT: %ImplsOfNonFacetType: %ImplsOfNonFacetType.type = struct_value () [template] // CHECK:STDOUT: } @@ -1153,29 +1153,29 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplsOfNonFacetType.decl: %ImplsOfNonFacetType.type = fn_decl @ImplsOfNonFacetType [template = constants.%ImplsOfNonFacetType] { -// CHECK:STDOUT: %U.patt.loc8_24.1: %.2 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.param_patt: %.2 = value_param_pattern %U.patt.loc8_24.1, runtime_param [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc8_24.1: %.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.param_patt: %.1 = value_param_pattern %U.patt.loc8_24.1, runtime_param [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_51.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_51.2: type = converted %int.make_type_32, %.loc8_51.1 [template = i32] -// CHECK:STDOUT: %.loc8_33: type = where_expr %.Self [template = constants.%.2] { +// CHECK:STDOUT: %.loc8_33: type = where_expr %.Self [template = constants.%.1] { // CHECK:STDOUT: requirement_impls %.Self.ref, // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.2 = value_param runtime_param -// CHECK:STDOUT: %U.loc8_24.1: %.2 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc8_24.2 (constants.%U)] +// CHECK:STDOUT: %U.param: %.1 = value_param runtime_param +// CHECK:STDOUT: %U.loc8_24.1: %.1 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc8_24.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplsOfNonFacetType(%U.loc8_24.1: %.2) { -// CHECK:STDOUT: %U.loc8_24.2: %.2 = bind_symbolic_name U, 0 [symbolic = %U.loc8_24.2 (constants.%U)] -// CHECK:STDOUT: %U.patt.loc8_24.2: %.2 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] +// CHECK:STDOUT: generic fn @ImplsOfNonFacetType(%U.loc8_24.1: %.1) { +// CHECK:STDOUT: %U.loc8_24.2: %.1 = bind_symbolic_name U, 0 [symbolic = %U.loc8_24.2 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc8_24.2: %.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: %.2); +// CHECK:STDOUT: fn(%U.param_patt: %.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplsOfNonFacetType(constants.%U) { @@ -1191,8 +1191,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: %J.type: type = interface_type @J [template] // CHECK:STDOUT: %Self.1: %J.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: %DoesNotImplI.type: type = fn_type @DoesNotImplI [template] // CHECK:STDOUT: %DoesNotImplI: %DoesNotImplI.type = struct_value () [template] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] @@ -1200,9 +1200,9 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %V: = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.5: type = facet_type [template] -// CHECK:STDOUT: %Y: %.5 = bind_symbolic_name Y, 0 [symbolic] -// CHECK:STDOUT: %Y.patt: %.5 = symbolic_binding_pattern Y, 0 [symbolic] +// CHECK:STDOUT: %.4: type = facet_type [template] +// CHECK:STDOUT: %Y: %.4 = bind_symbolic_name Y, 0 [symbolic] +// CHECK:STDOUT: %Y.patt: %.4 = symbolic_binding_pattern Y, 0 [symbolic] // CHECK:STDOUT: %EmptyStruct.type: type = fn_type @EmptyStruct [template] // CHECK:STDOUT: %EmptyStruct: %EmptyStruct.type = struct_value () [template] // CHECK:STDOUT: %NotEmptyStruct.type: type = fn_type @NotEmptyStruct [template] @@ -1216,14 +1216,14 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.3: %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: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.11 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.5) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.4) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.4) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.12 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1240,7 +1240,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %import_ref.6 = import_ref Main//state_constraints, inst+5, unloaded // CHECK:STDOUT: %import_ref.7: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/as, inst+55, unloaded -// CHECK:STDOUT: %import_ref.9: @ImplicitAs.%.1 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.9: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // CHECK:STDOUT: %import_ref.10 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Core//prelude/operators/as, inst+70, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Core//prelude/operators/as, inst+70, unloaded @@ -1268,18 +1268,18 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: %DoesNotImplI.decl: %DoesNotImplI.type = fn_decl @DoesNotImplI [template = constants.%DoesNotImplI] {} {} // CHECK:STDOUT: %EmptyStruct.decl: %EmptyStruct.type = fn_decl @EmptyStruct [template = constants.%EmptyStruct] { -// CHECK:STDOUT: %Y.patt.loc18_16.1: %.5 = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc18_16.2 (constants.%Y.patt)] -// CHECK:STDOUT: %Y.param_patt: %.5 = value_param_pattern %Y.patt.loc18_16.1, runtime_param [symbolic = %Y.patt.loc18_16.2 (constants.%Y.patt)] +// CHECK:STDOUT: %Y.patt.loc18_16.1: %.4 = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc18_16.2 (constants.%Y.patt)] +// CHECK:STDOUT: %Y.param_patt: %.4 = value_param_pattern %Y.patt.loc18_16.1, runtime_param [symbolic = %Y.patt.loc18_16.2 (constants.%Y.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %.loc18_38: %.1 = struct_literal () -// CHECK:STDOUT: %.loc18_22: type = where_expr %.Self [template = constants.%.5] { +// CHECK:STDOUT: %.loc18_22: type = where_expr %.Self [template = constants.%.4] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc18_38 // CHECK:STDOUT: } -// CHECK:STDOUT: %Y.param: %.5 = value_param runtime_param -// CHECK:STDOUT: %Y.loc18_16.1: %.5 = bind_symbolic_name Y, 0, %Y.param [symbolic = %Y.loc18_16.2 (constants.%Y)] +// CHECK:STDOUT: %Y.param: %.4 = value_param runtime_param +// CHECK:STDOUT: %Y.loc18_16.1: %.4 = bind_symbolic_name Y, 0, %Y.param [symbolic = %Y.loc18_16.2 (constants.%Y)] // CHECK:STDOUT: } // CHECK:STDOUT: %NotEmptyStruct.decl: %NotEmptyStruct.type = fn_decl @NotEmptyStruct [template = constants.%NotEmptyStruct] {} {} // CHECK:STDOUT: } @@ -1299,8 +1299,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.6)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1311,7 +1311,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %J.ref { -// CHECK:STDOUT: %.loc11: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc11: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc11 @@ -1338,18 +1338,18 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn(%V.param_patt: ); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EmptyStruct(%Y.loc18_16.1: %.5) { -// CHECK:STDOUT: %Y.loc18_16.2: %.5 = bind_symbolic_name Y, 0 [symbolic = %Y.loc18_16.2 (constants.%Y)] -// CHECK:STDOUT: %Y.patt.loc18_16.2: %.5 = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc18_16.2 (constants.%Y.patt)] +// CHECK:STDOUT: generic fn @EmptyStruct(%Y.loc18_16.1: %.4) { +// CHECK:STDOUT: %Y.loc18_16.2: %.4 = bind_symbolic_name Y, 0 [symbolic = %Y.loc18_16.2 (constants.%Y)] +// CHECK:STDOUT: %Y.patt.loc18_16.2: %.4 = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc18_16.2 (constants.%Y.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%Y.param_patt: %.5); +// CHECK:STDOUT: fn(%Y.param_patt: %.4); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NotEmptyStruct() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %EmptyStruct.ref: %EmptyStruct.type = name_ref EmptyStruct, file.%EmptyStruct.decl [template = constants.%EmptyStruct] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32: %.5 = converted %C.ref, [template = ] +// CHECK:STDOUT: %.loc32: %.4 = converted %C.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1392,17 +1392,17 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) { -// CHECK:STDOUT: %Dest => constants.%.5 -// CHECK:STDOUT: %Dest.patt => constants.%.5 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.4) { +// CHECK:STDOUT: %Dest => constants.%.4 +// CHECK:STDOUT: %Dest.patt => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_let.carbon @@ -1413,10 +1413,10 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: = interface_witness () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.5: type = facet_type [template] +// CHECK:STDOUT: %.4: type = facet_type [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] @@ -1426,14 +1426,14 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self.3: %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: %.6: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.5) [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.5) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(%.4) [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(%.4) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.10: %.6 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.9: %.5 = assoc_entity element0, imports.%import_ref.6 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1444,7 +1444,7 @@ let B: type where .Self impls A = D; // 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 (%.6) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.10)] +// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.5) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.9)] // 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 @@ -1467,7 +1467,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A.type] -// CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%.5] { +// CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%.4] { // CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1489,8 +1489,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] // 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.%.6)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.6) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.7)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.5) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1501,7 +1501,7 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %D.ref as %A.ref { -// CHECK:STDOUT: %.loc6: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc6 @@ -1525,8 +1525,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc14: %.5 = converted %D.ref, [template = ] -// CHECK:STDOUT: %B: %.5 = bind_name B, +// CHECK:STDOUT: %.loc14: %.4 = converted %D.ref, [template = ] +// CHECK:STDOUT: %B: %.4 = bind_name B, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1551,16 +1551,16 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) { -// CHECK:STDOUT: %Dest => constants.%.5 -// CHECK:STDOUT: %Dest.patt => constants.%.5 +// CHECK:STDOUT: specific @ImplicitAs(constants.%.4) { +// CHECK:STDOUT: %Dest => constants.%.4 +// CHECK:STDOUT: %Dest.patt => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.8 -// CHECK:STDOUT: %.2 => constants.%.9 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index bc5ae9f4647d..76fc4b86d1ff 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -94,21 +94,21 @@ class D { // CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%Member [template] // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = facet_type [template] -// CHECK:STDOUT: %T: %.4 = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt: %.4 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = facet_type [template] +// CHECK:STDOUT: %T: %.3 = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt: %.3 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %PeriodSelf.type: type = fn_type @PeriodSelf [template] // CHECK:STDOUT: %PeriodSelf: %PeriodSelf.type = struct_value () [template] -// CHECK:STDOUT: %.5: type = facet_type [template] -// CHECK:STDOUT: %U: %.5 = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %U.patt: %.5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %.4: type = facet_type [template] +// CHECK:STDOUT: %U: %.4 = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %.4 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %PeriodMember.type: type = fn_type @PeriodMember [template] // CHECK:STDOUT: %PeriodMember: %PeriodMember.type = struct_value () [template] // CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.6: type = facet_type [template] -// CHECK:STDOUT: %V: %.6 = bind_symbolic_name V, 0 [symbolic] -// CHECK:STDOUT: %V.patt: %.6 = symbolic_binding_pattern V, 0 [symbolic] +// CHECK:STDOUT: %.5: type = facet_type [template] +// CHECK:STDOUT: %V: %.5 = bind_symbolic_name V, 0 [symbolic] +// CHECK:STDOUT: %V.patt: %.5 = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %TypeSelfImpls.type: type = fn_type @TypeSelfImpls [template] // CHECK:STDOUT: %TypeSelfImpls: %TypeSelfImpls.type = struct_value () [template] // CHECK:STDOUT: } @@ -131,46 +131,46 @@ class D { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %PeriodSelf.decl: %PeriodSelf.type = fn_decl @PeriodSelf [template = constants.%PeriodSelf] { -// CHECK:STDOUT: %T.patt.loc8_15.1: %.4 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.param_patt: %.4 = value_param_pattern %T.patt.loc8_15.1, runtime_param [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_15.1: %.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.param_patt: %.3 = value_param_pattern %T.patt.loc8_15.1, runtime_param [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc8_37: %.3 = tuple_literal () -// CHECK:STDOUT: %.loc8_21: type = where_expr %.Self [template = constants.%.4] { +// CHECK:STDOUT: %.loc8_37: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_21: type = where_expr %.Self [template = constants.%.3] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc8_37 // CHECK:STDOUT: } -// CHECK:STDOUT: %T.param: %.4 = value_param runtime_param -// CHECK:STDOUT: %T.loc8_15.1: %.4 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_15.2 (constants.%T)] +// CHECK:STDOUT: %T.param: %.3 = value_param runtime_param +// CHECK:STDOUT: %T.loc8_15.1: %.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %PeriodMember.decl: %PeriodMember.type = fn_decl @PeriodMember [template = constants.%PeriodMember] { -// CHECK:STDOUT: %U.patt.loc10_17.1: %.5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.param_patt: %.5 = value_param_pattern %U.patt.loc10_17.1, runtime_param [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc10_17.1: %.4 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.param_patt: %.4 = value_param_pattern %U.patt.loc10_17.1, runtime_param [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] // CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_41: %.3 = tuple_literal () -// CHECK:STDOUT: %.loc10_23: type = where_expr %.Self [template = constants.%.5] { +// CHECK:STDOUT: %.loc10_41: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_23: type = where_expr %.Self [template = constants.%.4] { // CHECK:STDOUT: requirement_equivalent %Member.ref, %.loc10_41 // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.5 = value_param runtime_param -// CHECK:STDOUT: %U.loc10_17.1: %.5 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc10_17.2 (constants.%U)] +// CHECK:STDOUT: %U.param: %.4 = value_param runtime_param +// CHECK:STDOUT: %U.loc10_17.1: %.4 = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc10_17.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %TypeSelfImpls.decl: %TypeSelfImpls.type = fn_decl @TypeSelfImpls [template = constants.%TypeSelfImpls] { -// CHECK:STDOUT: %V.patt.loc12_18.1: %.6 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.param_patt: %.6 = value_param_pattern %V.patt.loc12_18.1, runtime_param [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc12_18.1: %.5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.param_patt: %.5 = value_param_pattern %V.patt.loc12_18.1, runtime_param [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.loc12: type = where_expr %.Self [template = constants.%.6] { +// CHECK:STDOUT: %.loc12: type = where_expr %.Self [template = constants.%.5] { // CHECK:STDOUT: requirement_impls %.Self.ref, %I.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %V.param: %.6 = value_param runtime_param -// CHECK:STDOUT: %V.loc12_18.1: %.6 = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc12_18.2 (constants.%V)] +// CHECK:STDOUT: %V.param: %.5 = value_param runtime_param +// CHECK:STDOUT: %V.loc12_18.1: %.5 = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc12_18.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -185,25 +185,25 @@ class D { // CHECK:STDOUT: witness = (%Member) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodSelf(%T.loc8_15.1: %.4) { -// CHECK:STDOUT: %T.loc8_15.2: %.4 = bind_symbolic_name T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %T.patt.loc8_15.2: %.4 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] +// CHECK:STDOUT: generic fn @PeriodSelf(%T.loc8_15.1: %.3) { +// CHECK:STDOUT: %T.loc8_15.2: %.3 = bind_symbolic_name T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc8_15.2: %.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: %.4); +// CHECK:STDOUT: fn(%T.param_patt: %.3); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodMember(%U.loc10_17.1: %.5) { -// CHECK:STDOUT: %U.loc10_17.2: %.5 = bind_symbolic_name U, 0 [symbolic = %U.loc10_17.2 (constants.%U)] -// CHECK:STDOUT: %U.patt.loc10_17.2: %.5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] +// CHECK:STDOUT: generic fn @PeriodMember(%U.loc10_17.1: %.4) { +// CHECK:STDOUT: %U.loc10_17.2: %.4 = bind_symbolic_name U, 0 [symbolic = %U.loc10_17.2 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc10_17.2: %.4 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: %.5); +// CHECK:STDOUT: fn(%U.param_patt: %.4); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TypeSelfImpls(%V.loc12_18.1: %.6) { -// CHECK:STDOUT: %V.loc12_18.2: %.6 = bind_symbolic_name V, 0 [symbolic = %V.loc12_18.2 (constants.%V)] -// CHECK:STDOUT: %V.patt.loc12_18.2: %.6 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] +// CHECK:STDOUT: generic fn @TypeSelfImpls(%V.loc12_18.1: %.5) { +// CHECK:STDOUT: %V.loc12_18.2: %.5 = bind_symbolic_name V, 0 [symbolic = %V.loc12_18.2 (constants.%V)] +// CHECK:STDOUT: %V.patt.loc12_18.2: %.5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%V.param_patt: %.6); +// CHECK:STDOUT: fn(%V.param_patt: %.5); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PeriodSelf(constants.%T) { @@ -229,11 +229,11 @@ class D { // CHECK:STDOUT: %.1: type = assoc_entity_type %J.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @J.%Member [template] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: type = facet_type [template] -// CHECK:STDOUT: %W: %.5 = bind_symbolic_name W, 0 [symbolic] -// CHECK:STDOUT: %W.patt: %.5 = symbolic_binding_pattern W, 0 [symbolic] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %.4: type = facet_type [template] +// CHECK:STDOUT: %W: %.4 = bind_symbolic_name W, 0 [symbolic] +// CHECK:STDOUT: %W.patt: %.4 = symbolic_binding_pattern W, 0 [symbolic] // CHECK:STDOUT: %PeriodMismatch.type: type = fn_type @PeriodMismatch [template] // CHECK:STDOUT: %PeriodMismatch: %PeriodMismatch.type = struct_value () [template] // CHECK:STDOUT: } @@ -254,19 +254,19 @@ class D { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%J.type] {} {} // CHECK:STDOUT: %PeriodMismatch.decl: %PeriodMismatch.type = fn_decl @PeriodMismatch [template = constants.%PeriodMismatch] { -// CHECK:STDOUT: %W.patt.loc12_19.1: %.5 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.param_patt: %.5 = value_param_pattern %W.patt.loc12_19.1, runtime_param [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc12_19.1: %.4 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.param_patt: %.4 = value_param_pattern %W.patt.loc12_19.1, runtime_param [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %Mismatch.ref: = name_ref Mismatch, [template = ] -// CHECK:STDOUT: %.loc12_44: %.4 = struct_literal () -// CHECK:STDOUT: %.loc12_25: type = where_expr %.Self [template = constants.%.5] { +// CHECK:STDOUT: %.loc12_44: %.3 = struct_literal () +// CHECK:STDOUT: %.loc12_25: type = where_expr %.Self [template = constants.%.4] { // CHECK:STDOUT: requirement_rewrite %Mismatch.ref, // CHECK:STDOUT: } -// CHECK:STDOUT: %W.param: %.5 = value_param runtime_param -// CHECK:STDOUT: %W.loc12_19.1: %.5 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc12_19.2 (constants.%W)] +// CHECK:STDOUT: %W.param: %.4 = value_param runtime_param +// CHECK:STDOUT: %W.loc12_19.1: %.4 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc12_19.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -281,11 +281,11 @@ class D { // CHECK:STDOUT: witness = (%Member) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodMismatch(%W.loc12_19.1: %.5) { -// CHECK:STDOUT: %W.loc12_19.2: %.5 = bind_symbolic_name W, 0 [symbolic = %W.loc12_19.2 (constants.%W)] -// CHECK:STDOUT: %W.patt.loc12_19.2: %.5 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] +// CHECK:STDOUT: generic fn @PeriodMismatch(%W.loc12_19.1: %.4) { +// CHECK:STDOUT: %W.loc12_19.2: %.4 = bind_symbolic_name W, 0 [symbolic = %W.loc12_19.2 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc12_19.2: %.4 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%W.param_patt: %.5); +// CHECK:STDOUT: fn(%W.param_patt: %.4); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PeriodMismatch(constants.%W) { @@ -296,7 +296,7 @@ class D { // CHECK:STDOUT: --- fail_designator_matches_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } @@ -315,22 +315,22 @@ class D { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_14.2: type = converted %.loc4_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc4_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_14.2: type = converted %.loc4_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo() -> %.1 { +// CHECK:STDOUT: fn @Foo() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_11.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref %.1 = var x -// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x +// CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %.Self.ref: = name_ref .Self, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -338,7 +338,7 @@ class D { // CHECK:STDOUT: --- fail_unknown_designator.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } @@ -357,17 +357,17 @@ class D { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { -// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_14.1: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc4_14.2: type = converted %.loc4_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0 -// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param +// CHECK:STDOUT: %.loc4_14.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_14.2: type = converted %.loc4_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 +// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Bar() -> %.1 { +// CHECK:STDOUT: fn @Bar() -> %empty_tuple.type { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.Self.ref: = name_ref .Self, [template = ] // CHECK:STDOUT: return @@ -378,11 +378,11 @@ class D { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] -// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -410,7 +410,7 @@ class D { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc10: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -428,10 +428,10 @@ class D { // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] // 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: type = struct_type {} [template] -// CHECK:STDOUT: %.3: = complete_type_witness %.2 [template] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -459,7 +459,7 @@ class D { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D diff --git a/toolchain/check/testdata/where_expr/fail_not_facet.carbon b/toolchain/check/testdata/where_expr/fail_not_facet.carbon index d5149dff6213..4fb2c473a9e8 100644 --- a/toolchain/check/testdata/where_expr/fail_not_facet.carbon +++ b/toolchain/check/testdata/where_expr/fail_not_facet.carbon @@ -49,7 +49,7 @@ var v: e where .x = 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: %.Self: = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -116,7 +116,7 @@ var v: e where .x = 3; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: = bind_symbolic_name .Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %U: = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: = symbolic_binding_pattern U, 0 [symbolic] diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index 0a6ab38cdcc2..6bb622fa2688 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -21,10 +21,10 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic] -// CHECK:STDOUT: %.3: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.4: type = facet_type [template] +// CHECK:STDOUT: %.3: type = facet_type [template] // CHECK:STDOUT: %NotGenericF.type: type = fn_type @NotGenericF [template] // CHECK:STDOUT: %NotGenericF: %NotGenericF.type = struct_value () [template] // CHECK:STDOUT: } @@ -47,19 +47,19 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: %NotGenericF.decl: %NotGenericF.type = fn_decl @NotGenericF [template = constants.%NotGenericF] { -// CHECK:STDOUT: %U.patt: %.4 = binding_pattern U -// CHECK:STDOUT: %U.param_patt: %.4 = value_param_pattern %U.patt, runtime_param0 +// CHECK:STDOUT: %U.patt: %.3 = binding_pattern U +// CHECK:STDOUT: %U.param_patt: %.3 = value_param_pattern %U.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %T.ref: %.1 = name_ref T, @I.%.loc11 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%.4] { +// CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%.3] { // CHECK:STDOUT: requirement_equivalent %T.ref, %int.make_type_32 // CHECK:STDOUT: } -// CHECK:STDOUT: %U.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %U: %.4 = bind_name U, %U.param +// CHECK:STDOUT: %U.param: %.3 = value_param runtime_param0 +// CHECK:STDOUT: %U: %.3 = bind_name U, %U.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -76,7 +76,7 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotGenericF(%U.param_patt: %.4) { +// CHECK:STDOUT: fn @NotGenericF(%U.param_patt: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/while/break_continue.carbon b/toolchain/check/testdata/while/break_continue.carbon index 3190822482ac..b3c7d7068b8f 100644 --- a/toolchain/check/testdata/while/break_continue.carbon +++ b/toolchain/check/testdata/while/break_continue.carbon @@ -34,7 +34,7 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index 3eb3da85b11b..fa4db3fc41fd 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -22,10 +22,10 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %While.type: type = fn_type @While [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %While: %While.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type String [template] -// CHECK:STDOUT: %.3: String = string_literal "Hello" [template] +// CHECK:STDOUT: %.1: type = ptr_type String [template] +// CHECK:STDOUT: %.2: String = string_literal "Hello" [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] @@ -35,14 +35,14 @@ fn While() { // 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: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [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: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(bool) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,7 +53,7 @@ fn While() { // 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 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)] +// 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.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 @@ fn While() { // 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.%.4)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.5)] +// 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: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -93,7 +93,7 @@ fn While() { // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: -// CHECK:STDOUT: %.loc18_10: String = string_literal "Hello" [template = constants.%.3] +// CHECK:STDOUT: %.loc18_10: String = string_literal "Hello" [template = constants.%.2] // CHECK:STDOUT: %.loc18_17: bool = converted %.loc18_10, [template = ] // CHECK:STDOUT: if br !while.body else br !while.done // CHECK:STDOUT: @@ -142,7 +142,7 @@ fn While() { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.5 +// CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/while/fail_break_continue.carbon b/toolchain/check/testdata/while/fail_break_continue.carbon index e640fc02e5c6..e5742e8e95a8 100644 --- a/toolchain/check/testdata/while/fail_break_continue.carbon +++ b/toolchain/check/testdata/while/fail_break_continue.carbon @@ -38,9 +38,9 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %While.type: type = fn_type @While [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %While: %While.type = struct_value () [template] -// CHECK:STDOUT: %.2: bool = bool_literal false [template] +// CHECK:STDOUT: %.1: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { diff --git a/toolchain/check/testdata/while/unreachable_end.carbon b/toolchain/check/testdata/while/unreachable_end.carbon index 68e1e2a7ddf9..ff933bc43678 100644 --- a/toolchain/check/testdata/while/unreachable_end.carbon +++ b/toolchain/check/testdata/while/unreachable_end.carbon @@ -27,7 +27,7 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template] // CHECK:STDOUT: %Cond: %Cond.type = struct_value () [template] @@ -89,7 +89,7 @@ fn While() { // CHECK:STDOUT: fn @While() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: @@ -101,12 +101,12 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: !while.body: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !while.done: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init %.1 = call %H.ref() +// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/while/while.carbon b/toolchain/check/testdata/while/while.carbon index aa9aef7c2759..c9a09a91e763 100644 --- a/toolchain/check/testdata/while/while.carbon +++ b/toolchain/check/testdata/while/while.carbon @@ -26,7 +26,7 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template] // CHECK:STDOUT: %Cond: %Cond.type = struct_value () [template] @@ -88,7 +88,7 @@ fn While() { // CHECK:STDOUT: fn @While() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: @@ -100,12 +100,12 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: !while.body: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.done: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init %.1 = call %H.ref() +// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index ddf6379c297f..c28efde708fd 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -22,7 +22,7 @@ fn Run() { // CHECK:STDOUT: @array.1.loc12_25 = internal constant [1 x i32] [i32 1] // CHECK:STDOUT: @array.2.loc13_33 = internal constant [2 x double] [double 0x4026333333333334, double 2.200000e+00] // CHECK:STDOUT: @array.3.loc14_41 = internal constant [5 x {}] zeroinitializer -// CHECK:STDOUT: @tuple.2.loc15_37 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } +// CHECK:STDOUT: @tuple.loc15_37 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !4 { // CHECK:STDOUT: entry: @@ -44,7 +44,7 @@ fn Run() { // CHECK:STDOUT: %.loc15_36.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !17 // CHECK:STDOUT: %.loc15_36.4.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !17 // CHECK:STDOUT: %.loc15_36.6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !17 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.2.loc15_37, i64 12, i1 false), !dbg !18 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.loc15_37, i64 12, i1 false), !dbg !18 // CHECK:STDOUT: %e.var = alloca [3 x i32], align 4, !dbg !19 // CHECK:STDOUT: %.loc16_21.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !20 // CHECK:STDOUT: %.loc16_21.2 = load i32, ptr %.loc16_21.1.tuple.elem, align 4, !dbg !20 diff --git a/toolchain/lower/testdata/function/call/tuple_param.carbon b/toolchain/lower/testdata/function/call/tuple_param.carbon index fea4246e7291..f7920d85a4d2 100644 --- a/toolchain/lower/testdata/function/call/tuple_param.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param.carbon @@ -17,7 +17,7 @@ fn Main() { // CHECK:STDOUT: ; ModuleID = 'tuple_param.carbon' // CHECK:STDOUT: source_filename = "tuple_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.3.loc14_20.2 = internal constant { i32, i32 } { i32 2, i32 3 } +// CHECK:STDOUT: @tuple.2.loc14_20.2 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 { // CHECK:STDOUT: entry: @@ -26,7 +26,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.3.loc14_20.2), !dbg !9 +// CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.2.loc14_20.2), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon index 89715764c063..a01be0ad1b62 100644 --- a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon @@ -19,7 +19,7 @@ fn Main() { // CHECK:STDOUT: ; ModuleID = 'tuple_param_with_return_slot.carbon' // CHECK:STDOUT: source_filename = "tuple_param_with_return_slot.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.3.loc16_20.2 = internal constant { i32, i32 } { i32 2, i32 3 } +// CHECK:STDOUT: @tuple.2.loc16_20.2 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) !dbg !4 { // CHECK:STDOUT: entry: @@ -40,7 +40,7 @@ fn Main() { // CHECK:STDOUT: define void @_CMain.Main() !dbg !12 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc16_4.1.temp = alloca { i32, i32, i32 }, align 8, !dbg !13 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_4.1.temp, { i32 } { i32 1 }, ptr @tuple.3.loc16_20.2), !dbg !13 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_4.1.temp, { i32 } { i32 1 }, ptr @tuple.2.loc16_20.2), !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index 62463a6692e7..721715eeb09f 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -569,9 +569,19 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } continue; } + case CARBON_KIND(TupleType inst): { + if (inst.elements_id == TypeBlockId::Empty) { + add_inst_name("empty_tuple.type"); + } else { + add_inst_name("tuple.type"); + } + continue; + } case CARBON_KIND(TupleValue inst): { if (sem_ir_.types().Is(inst.type_id)) { add_inst_name("array"); + } else if (inst.elements_id == InstBlockId::Empty) { + add_inst_name("empty_tuple"); } else { add_inst_name("tuple"); }