diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index 26e33da70052..70c9c2c878b6 100644 --- a/toolchain/check/testdata/alias/fail_bool_value.carbon +++ b/toolchain/check/testdata/alias/fail_bool_value.carbon @@ -20,7 +20,7 @@ let a_test: bool = a; // 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: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,7 +31,7 @@ let a_test: bool = a; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc14: bool = bool_literal false [template = constants.%.1] // CHECK:STDOUT: %a: = bind_alias a, [template = ] -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_13.2: type = converted %bool.make_type, %.loc15_13.1 [template = bool] diff --git a/toolchain/check/testdata/alias/fail_builtins.carbon b/toolchain/check/testdata/alias/fail_builtins.carbon index aceb91cbe720..07f843ac78c1 100644 --- a/toolchain/check/testdata/alias/fail_builtins.carbon +++ b/toolchain/check/testdata/alias/fail_builtins.carbon @@ -24,9 +24,9 @@ alias b = bool; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,10 +36,10 @@ alias b = bool; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %a: = bind_alias a, [template = ] -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %b: = bind_alias b, [template = ] // CHECK:STDOUT: } 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 0ee363bc9c2a..673cb3c74d86 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: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,13 +39,13 @@ let d: c = {}; // CHECK:STDOUT: %b.ref: type = name_ref b, %b [template = constants.%C] // CHECK:STDOUT: %c: type = bind_alias c, %b [template = constants.%C] // CHECK:STDOUT: %c.ref: type = name_ref c, %c [template = constants.%C] -// CHECK:STDOUT: %.loc15_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc15_13.2: ref C = temporary_storage -// CHECK:STDOUT: %.loc15_13.3: init C = class_init (), %.loc15_13.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc15_13.4: ref C = temporary %.loc15_13.2, %.loc15_13.3 -// CHECK:STDOUT: %.loc15_14.1: ref C = converted %.loc15_13.1, %.loc15_13.4 -// CHECK:STDOUT: %.loc15_14.2: C = bind_value %.loc15_14.1 -// CHECK:STDOUT: %d: C = bind_name d, %.loc15_14.2 +// CHECK:STDOUT: %.loc15_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc15_13.2: ref %C = temporary_storage +// CHECK:STDOUT: %.loc15_13.3: init %C = class_init (), %.loc15_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc15_13.4: ref %C = temporary %.loc15_13.2, %.loc15_13.3 +// CHECK:STDOUT: %.loc15_14.1: ref %C = converted %.loc15_13.1, %.loc15_13.4 +// CHECK:STDOUT: %.loc15_14.2: %C = bind_value %.loc15_14.1 +// CHECK:STDOUT: %d: %C = bind_name d, %.loc15_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/alias/no_prelude/export_name.carbon b/toolchain/check/testdata/alias/no_prelude/export_name.carbon index d7d39bdc336e..f46f5a4016b2 100644 --- a/toolchain/check/testdata/alias/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/alias/no_prelude/export_name.carbon @@ -142,8 +142,8 @@ var d: D* = &c; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -154,8 +154,8 @@ var d: D* = &c; // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+7, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+6, unloaded // CHECK:STDOUT: %D.ref: type = name_ref D, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %d.var: ref C = var d -// CHECK:STDOUT: %d: ref C = bind_name d, %d.var +// CHECK:STDOUT: %d.var: ref %C = var d +// CHECK:STDOUT: %d: ref %C = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -165,9 +165,9 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc6_13.2: init C = class_init (), file.%d.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_14: init C = converted %.loc6_13.1, %.loc6_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc6_13.2: init %C = class_init (), file.%d.var [template = constants.%struct] +// CHECK:STDOUT: %.loc6_14: init %C = converted %.loc6_13.1, %.loc6_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%d.var, %.loc6_14 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -191,7 +191,7 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: {} = struct_literal () +// CHECK:STDOUT: %.loc9: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -202,9 +202,9 @@ var d: D* = &c; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -218,12 +218,12 @@ var d: D* = &c; // CHECK:STDOUT: %import_ref.2: type = import_ref ir2, inst+7, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+6, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// 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, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.4] -// CHECK:STDOUT: %d.var: ref C* = var d -// CHECK:STDOUT: %d: ref C* = 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 { @@ -233,12 +233,12 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc7_13.2: init C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_14: init C = converted %.loc7_13.1, %.loc7_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc7_13.2: init %C = class_init (), file.%c.var [template = constants.%struct] +// 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: C* = addr_of %c.ref +// CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c +// 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 85e20f13477b..c0b2c56f577b 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: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: D = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %D = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,11 +42,11 @@ let c_var: c = d; // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c: type = bind_alias c, %C.decl [template = constants.%C] // CHECK:STDOUT: %D.ref: type = name_ref D, %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: %d.var: ref %D = var d +// CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: %c.ref: type = name_ref c, %c [template = constants.%C] -// CHECK:STDOUT: %d.ref: ref D = name_ref d, %d -// CHECK:STDOUT: %c_var: C = bind_name c_var, +// CHECK:STDOUT: %d.ref: ref %D = name_ref d, %d +// CHECK:STDOUT: %c_var: %C = bind_name c_var, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -61,9 +61,9 @@ let c_var: c = d; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc15_13.2: init D = class_init (), file.%d.var [template = constants.%struct] -// CHECK:STDOUT: %.loc15_14: init D = converted %.loc15_13.1, %.loc15_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc15_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc15_13.2: init %D = class_init (), file.%d.var [template = constants.%struct] +// CHECK:STDOUT: %.loc15_14: init %D = converted %.loc15_13.1, %.loc15_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%d.var, %.loc15_14 // CHECK:STDOUT: return // 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 83d621c6aca0..84d49d7370f2 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 @@ -32,7 +32,7 @@ fn F() -> {} { // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,16 +41,16 @@ fn F() -> {} { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NS: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %.loc13_12.1: {} = struct_literal () +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %.loc13_12.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_12.2: type = converted %.loc13_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @F.%return: ref {} = var +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> {} { +// CHECK:STDOUT: fn @F() -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_17: {} = struct_literal () +// CHECK:STDOUT: %.loc22_17: %.1 = struct_literal () // CHECK:STDOUT: %.loc22_12: = bind_alias , [template = ] // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] 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 97a8c1941e31..a7e974b069e2 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: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,11 +49,11 @@ alias b = C; // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc13: type = bind_alias a, %C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.var: ref C = var a -// CHECK:STDOUT: %a.loc21: ref C = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %C = var a +// CHECK:STDOUT: %a.loc21: ref %C = bind_name a, %a.var // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.var: ref C = var b -// CHECK:STDOUT: %b: ref C = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %C = var b +// CHECK:STDOUT: %b: ref %C = bind_name b, %b.var // CHECK:STDOUT: %C.ref.loc30: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = bind_alias , %C.decl [template = constants.%C] // CHECK:STDOUT: } @@ -65,13 +65,13 @@ alias b = C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc21_13.2: init C = class_init (), file.%a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc21_14: init C = converted %.loc21_13.1, %.loc21_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc21_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc21_13.2: init %C = class_init (), file.%a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc21_14: init %C = converted %.loc21_13.1, %.loc21_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%a.var, %.loc21_14 -// CHECK:STDOUT: %.loc23_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc23_13.2: init C = class_init (), file.%b.var [template = constants.%struct] -// CHECK:STDOUT: %.loc23_14: init C = converted %.loc23_13.1, %.loc23_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc23_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc23_13.2: init %C = class_init (), file.%b.var [template = constants.%struct] +// CHECK:STDOUT: %.loc23_14: init %C = converted %.loc23_13.1, %.loc23_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%b.var, %.loc23_14 // CHECK:STDOUT: return // 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 cd18e03ae1e0..68cbb84fd9eb 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon @@ -22,39 +22,39 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %.2: type = ptr_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: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init () = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init () = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// 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: assign %a.var, %.loc12_17 -// CHECK:STDOUT: %.loc13_11: () = tuple_literal () +// 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 () [template = constants.%.2] -// CHECK:STDOUT: %b.var: ref ()* = var b -// CHECK:STDOUT: %b: ref ()* = bind_name b, %b.var -// CHECK:STDOUT: %a.ref: ref () = name_ref a, %a -// CHECK:STDOUT: %.loc13_16: ()* = addr_of %a.ref +// 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: assign %b.var, %.loc13_16 -// CHECK:STDOUT: %b.ref: ref ()* = name_ref b, %b -// CHECK:STDOUT: %.loc17_14: ()* = bind_value %b.ref -// CHECK:STDOUT: %.loc17_13: ref () = deref %.loc17_14 +// 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: %c: = bind_alias c, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon index e3de0d7a71fd..e7a647d7b7cc 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon @@ -21,7 +21,7 @@ alias A(T:! type) = T*; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,7 +31,7 @@ alias A(T:! type) = T*; // CHECK:STDOUT: %T.loc18_9.1: type = param T // CHECK:STDOUT: %T.loc18_9.2: type = bind_symbolic_name T 0, %T.loc18_9.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_9.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc18: type = ptr_type T [symbolic = constants.%.1] +// CHECK:STDOUT: %.loc18: type = ptr_type %T [symbolic = constants.%.1] // CHECK:STDOUT: %A: = bind_alias A, [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/import.carbon b/toolchain/check/testdata/alias/no_prelude/import.carbon index a5746f1f80e2..006209c19cd3 100644 --- a/toolchain/check/testdata/alias/no_prelude/import.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import.carbon @@ -73,7 +73,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = ptr_type C [template] +// CHECK:STDOUT: %.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -86,9 +86,9 @@ var c: () = a_alias_alias; // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c_alias: type = bind_alias c_alias, %C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref C* = var a -// CHECK:STDOUT: %a: ref C* = bind_name a, %a.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [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: class @C { @@ -101,7 +101,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = ptr_type C [template] +// CHECK:STDOUT: %.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,9 +119,9 @@ var c: () = a_alias_alias; // CHECK:STDOUT: %c_alias.ref.loc6: type = name_ref c_alias, %import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c_alias_alias: type = bind_alias c_alias_alias, %import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c_alias.ref.loc8: type = name_ref c_alias, %import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.2] -// CHECK:STDOUT: %b.var: ref C* = var b -// CHECK:STDOUT: %b: ref C* = bind_name b, %b.var +// CHECK:STDOUT: %.loc8: type = ptr_type %C [template = constants.%.2] +// CHECK:STDOUT: %b.var: ref %.2 = var b +// CHECK:STDOUT: %b: ref %.2 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -134,7 +134,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = ptr_type C [template] +// CHECK:STDOUT: %.2: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -147,9 +147,9 @@ var c: () = a_alias_alias; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+14, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+7, unloaded // CHECK:STDOUT: %c_alias_alias.ref: type = name_ref c_alias_alias, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc6: type = ptr_type C [template = constants.%.2] -// CHECK:STDOUT: %c.var: ref C* = var c -// CHECK:STDOUT: %c: ref C* = bind_name c, %c.var +// CHECK:STDOUT: %.loc6: type = ptr_type %C [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: class @C { @@ -161,7 +161,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -169,19 +169,19 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .a_alias = %a_alias // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %a.ref: ref () = name_ref a, %a -// CHECK:STDOUT: %a_alias: ref () = bind_alias a_alias, %a +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_14.1: () = tuple_literal () -// CHECK:STDOUT: %.loc4_14.2: init () = tuple_init () to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_15: init () = converted %.loc4_14.1, %.loc4_14.2 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc4_15 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -190,7 +190,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -201,20 +201,20 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+5, unloaded -// CHECK:STDOUT: %import_ref.2: ref () = import_ref ir1, inst+12, loaded -// CHECK:STDOUT: %a_alias.ref: ref () = name_ref a_alias, %import_ref.2 -// CHECK:STDOUT: %a_alias_alias: ref () = bind_alias a_alias_alias, %import_ref.2 -// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal () +// CHECK:STDOUT: %import_ref.2: ref %.1 = import_ref ir1, inst+12, loaded +// CHECK:STDOUT: %a_alias.ref: ref %.1 = name_ref a_alias, %import_ref.2 +// CHECK:STDOUT: %a_alias_alias: ref %.1 = bind_alias a_alias_alias, %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 () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %.1 = var b +// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_alias.ref: ref () = name_ref a_alias, file.%import_ref.2 -// CHECK:STDOUT: %.loc8_13: init () = tuple_init () to file.%b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_20: init () = converted %a_alias.ref, %.loc8_13 [template = constants.%tuple] +// CHECK:STDOUT: %a_alias.ref: ref %.1 = name_ref a_alias, file.%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: assign file.%b.var, %.loc8_20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -223,7 +223,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -232,19 +232,19 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .b = %import_ref.2 // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: ref () = import_ref ir1, inst+5, loaded [template = ] +// CHECK:STDOUT: %import_ref.1: ref %.1 = import_ref ir1, inst+5, loaded [template = ] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+9, unloaded -// CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () +// 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: %c.var: ref () = var c -// CHECK:STDOUT: %c: ref () = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %.1 = var c +// CHECK:STDOUT: %c: ref %.1 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_alias_alias.ref: ref () = name_ref a_alias_alias, file.%import_ref.1 [template = ] -// CHECK:STDOUT: %.loc12_13: init () = tuple_init () to file.%c.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_26: init () = converted %a_alias_alias.ref, %.loc12_13 [template = constants.%tuple] +// CHECK:STDOUT: %a_alias_alias.ref: ref %.1 = name_ref a_alias_alias, file.%import_ref.1 [template = ] +// CHECK:STDOUT: %.loc12_13: init %.1 = tuple_init () to file.%c.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc12_26: init %.1 = converted %a_alias_alias.ref, %.loc12_13 [template = constants.%tuple] // CHECK:STDOUT: assign file.%c.var, %.loc12_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 1eb1c2152d4f..d8f0998156de 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_access.carbon @@ -97,7 +97,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: {} = struct_literal () +// CHECK:STDOUT: %.loc8: %.1 = struct_literal () // CHECK:STDOUT: assign file.%inst.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -121,7 +121,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: {} = struct_literal () +// CHECK:STDOUT: %.loc10: %.1 = struct_literal () // CHECK:STDOUT: assign file.%inst.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -146,7 +146,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: {} = struct_literal () +// CHECK:STDOUT: %.loc9: %.1 = struct_literal () // CHECK:STDOUT: assign file.%inst.var, // CHECK:STDOUT: return // 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 85e6ecec2f5f..f7e1fbf1bece 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_order.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_order.carbon @@ -35,8 +35,8 @@ var a_val: a = {.v = b_val.v}; // 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, () [template] -// CHECK:STDOUT: %.3: type = struct_type {.v: ()} [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.v: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,9 +59,9 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4_19.1: () = tuple_literal () +// 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: = field_decl v, element0 [template] +// CHECK:STDOUT: %.loc4_16: %.2 = field_decl v, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -73,11 +73,11 @@ var a_val: a = {.v = b_val.v}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.v: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] -// CHECK:STDOUT: %.4: type = unbound_element_type C, () [template] +// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, %.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -97,20 +97,20 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+14, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4: type = import_ref ir1, inst+16, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.5: type = import_ref ir1, inst+18, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+7, loaded [template = imports.%.1] +// CHECK:STDOUT: %import_ref.6: %.4 = import_ref ir1, inst+7, loaded [template = imports.%.1] // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %d.ref: type = name_ref d, %import_ref.5 [template = constants.%C] -// CHECK:STDOUT: %d_val.var: ref C = var d_val -// CHECK:STDOUT: %d_val: ref C = bind_name d_val, %d_val.var +// CHECK:STDOUT: %d_val.var: ref %C = var d_val +// CHECK:STDOUT: %d_val: ref %C = bind_name d_val, %d_val.var // CHECK:STDOUT: %c.ref: type = name_ref c, %import_ref.4 [template = constants.%C] -// 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: %c_val.var: ref %C = var c_val +// CHECK:STDOUT: %c_val: ref %C = bind_name c_val, %c_val.var // CHECK:STDOUT: %b.ref: type = name_ref b, %import_ref.3 [template = constants.%C] -// 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: %b_val.var: ref %C = var b_val +// CHECK:STDOUT: %b_val: ref %C = bind_name b_val, %b_val.var // CHECK:STDOUT: %a.ref: type = name_ref a, %import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %a_val.var: ref C = var a_val -// CHECK:STDOUT: %a_val: ref C = bind_name a_val, %a_val.var +// CHECK:STDOUT: %a_val.var: ref %C = var a_val +// CHECK:STDOUT: %a_val: ref %C = bind_name a_val, %a_val.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -121,43 +121,43 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_23.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_24.1: {.v: ()} = struct_literal (%.loc7_23.1) -// CHECK:STDOUT: %.loc7_24.2: ref () = class_element_access file.%d_val.var, element0 -// CHECK:STDOUT: %.loc7_23.2: init () = tuple_init () to %.loc7_24.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_24.3: init () = converted %.loc7_23.1, %.loc7_23.2 [template = constants.%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: %.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_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: = name_ref v, file.%import_ref.6 [template = imports.%.1] -// CHECK:STDOUT: %.loc8_27.1: ref () = class_element_access %d_val.ref, element0 -// CHECK:STDOUT: %.loc8_29.1: {.v: ()} = struct_literal (%.loc8_27.1) -// CHECK:STDOUT: %.loc8_29.2: ref () = class_element_access file.%c_val.var, element0 -// CHECK:STDOUT: %.loc8_27.2: init () = tuple_init () to %.loc8_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_29.3: init () = converted %.loc8_27.1, %.loc8_27.2 [template = constants.%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: %d_val.ref: ref %C = name_ref d_val, file.%d_val +// CHECK:STDOUT: %v.ref.loc8: %.4 = name_ref v, file.%import_ref.6 [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: %.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: = name_ref v, file.%import_ref.6 [template = imports.%.1] -// CHECK:STDOUT: %.loc9_27.1: ref () = class_element_access %c_val.ref, element0 -// CHECK:STDOUT: %.loc9_29.1: {.v: ()} = struct_literal (%.loc9_27.1) -// CHECK:STDOUT: %.loc9_29.2: ref () = class_element_access file.%b_val.var, element0 -// CHECK:STDOUT: %.loc9_27.2: init () = tuple_init () to %.loc9_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc9_29.3: init () = converted %.loc9_27.1, %.loc9_27.2 [template = constants.%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: %c_val.ref: ref %C = name_ref c_val, file.%c_val +// CHECK:STDOUT: %v.ref.loc9: %.4 = name_ref v, file.%import_ref.6 [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: %.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: = name_ref v, file.%import_ref.6 [template = imports.%.1] -// CHECK:STDOUT: %.loc10_27.1: ref () = class_element_access %b_val.ref, element0 -// CHECK:STDOUT: %.loc10_29.1: {.v: ()} = struct_literal (%.loc10_27.1) -// CHECK:STDOUT: %.loc10_29.2: ref () = class_element_access file.%a_val.var, element0 -// CHECK:STDOUT: %.loc10_27.2: init () = tuple_init () to %.loc10_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc10_29.3: init () = converted %.loc10_27.1, %.loc10_27.2 [template = constants.%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: %b_val.ref: ref %C = name_ref b_val, file.%b_val +// CHECK:STDOUT: %v.ref.loc10: %.4 = name_ref v, file.%import_ref.6 [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: %.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 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon index a97bde41e3ac..246238b723fc 100644 --- a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon @@ -24,13 +24,13 @@ fn F() -> NS.a { // 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, () [template] -// CHECK:STDOUT: %.3: type = struct_type {.v: ()} [template] -// CHECK:STDOUT: %.4: type = ptr_type {.v: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.v: %.1} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,43 +47,43 @@ fn F() -> NS.a { // CHECK:STDOUT: %a: type = bind_alias a, %C.decl [template = constants.%C] // CHECK:STDOUT: %NS.ref.loc16: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %a.ref.loc16: type = name_ref a, %a [template = constants.%C] -// CHECK:STDOUT: %.loc16_22.1: () = tuple_literal () -// CHECK:STDOUT: %.loc16_23.1: {.v: ()} = struct_literal (%.loc16_22.1) -// CHECK:STDOUT: %.loc16_23.2: ref C = temporary_storage -// CHECK:STDOUT: %.loc16_23.3: ref () = class_element_access %.loc16_23.2, element0 -// CHECK:STDOUT: %.loc16_22.2: init () = tuple_init () to %.loc16_23.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_23.4: init () = converted %.loc16_22.1, %.loc16_22.2 [template = constants.%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 -// CHECK:STDOUT: %.loc16_24.2: C = bind_value %.loc16_24.1 -// CHECK:STDOUT: %b: C = bind_name b, %.loc16_24.2 -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %.loc16_22.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc16_23.1: %.3 = 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.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 +// CHECK:STDOUT: %.loc16_24.2: %C = bind_value %.loc16_24.1 +// CHECK:STDOUT: %b: %C = bind_name b, %.loc16_24.2 +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %NS.ref.loc18: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %a.ref.loc18: type = name_ref a, %a [template = constants.%C] -// CHECK:STDOUT: @F.%return: ref C = var +// CHECK:STDOUT: @F.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11_19.1: () = tuple_literal () +// 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: = field_decl v, element0 [template] +// CHECK:STDOUT: %.loc11_16: %.2 = field_decl v, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .v = %.loc11_16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %return: C { +// CHECK:STDOUT: fn @F() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_17.1: () = tuple_literal () -// CHECK:STDOUT: %.loc19_18.1: {.v: ()} = struct_literal (%.loc19_17.1) -// CHECK:STDOUT: %.loc19_18.2: ref () = class_element_access %return, element0 -// CHECK:STDOUT: %.loc19_17.2: init () = tuple_init () to %.loc19_18.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_18.3: init () = converted %.loc19_17.1, %.loc19_17.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/local.carbon b/toolchain/check/testdata/alias/no_prelude/local.carbon index a54421aa35c3..dadb761339e7 100644 --- a/toolchain/check/testdata/alias/no_prelude/local.carbon +++ b/toolchain/check/testdata/alias/no_prelude/local.carbon @@ -19,36 +19,36 @@ fn F() -> () { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %.loc11_12.1: () = tuple_literal () +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// 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: @F.%return: ref () = var +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> () { +// CHECK:STDOUT: fn @F() -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init () = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init () = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// 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: assign %a.var, %.loc12_17 -// CHECK:STDOUT: %a.ref: ref () = name_ref a, %a -// CHECK:STDOUT: %b: ref () = bind_alias b, %a -// CHECK:STDOUT: %b.ref: ref () = name_ref b, %b -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc14: () = converted %b.ref, %tuple [template = constants.%tuple] +// 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: 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 4c22e95936e3..937b53e2079c 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -19,18 +19,18 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.5: type = array_type %.4, (i32, i32, i32) [template] -// CHECK:STDOUT: %.6: type = ptr_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.7: type = ptr_type [(i32, i32, i32); 2] [template] -// CHECK:STDOUT: %.8: type = tuple_type ((i32, i32, i32), (i32, i32, i32)) [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_literal 0 [template] // CHECK:STDOUT: %.10: i32 = int_literal 1 [template] // CHECK:STDOUT: } @@ -42,14 +42,14 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11_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: (type, type, type) = 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: %.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.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] @@ -57,24 +57,24 @@ fn G() { // 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: @F.%return: ref (i32, i32, i32) = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> (i32, i32, i32); +// CHECK:STDOUT: fn @F() -> %.3; // 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: (type, type, type) = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22) +// 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_literal 2 [template = constants.%.4] // 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] @@ -83,24 +83,24 @@ fn G() { // 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, (i32, i32, i32) [template = constants.%.5] -// CHECK:STDOUT: %v.var: ref [(i32, i32, i32); 2] = var v -// CHECK:STDOUT: %v: ref [(i32, i32, i32); 2] = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14_34: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_42.3: ref (i32, i32, i32) = splice_block %.loc14_42.2 { +// 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: %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_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc14_42.2: ref (i32, i32, i32) = array_index %v.var, %.loc14_42.1 +// CHECK:STDOUT: %.loc14_42.2: ref %.3 = array_index %v.var, %.loc14_42.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.call.loc14_35: init (i32, i32, i32) = call %F.ref.loc14_34() to %.loc14_42.3 -// CHECK:STDOUT: %F.ref.loc14_39: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_42.6: ref (i32, i32, i32) = splice_block %.loc14_42.5 { +// CHECK:STDOUT: %F.call.loc14_35: init %.3 = 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_literal 1 [template = constants.%.10] -// CHECK:STDOUT: %.loc14_42.5: ref (i32, i32, i32) = array_index %v.var, %.loc14_42.4 +// CHECK:STDOUT: %.loc14_42.5: ref %.3 = array_index %v.var, %.loc14_42.4 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.call.loc14_40: init (i32, i32, i32) = call %F.ref.loc14_39() to %.loc14_42.6 -// CHECK:STDOUT: %.loc14_42.7: ((i32, i32, i32), (i32, i32, i32)) = tuple_literal (%F.call.loc14_35, %F.call.loc14_40) -// CHECK:STDOUT: %.loc14_42.8: init [(i32, i32, i32); 2] = array_init (%F.call.loc14_35, %F.call.loc14_40) to %v.var -// CHECK:STDOUT: %.loc14_43: init [(i32, i32, i32); 2] = converted %.loc14_42.7, %.loc14_42.8 +// 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: 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 48764806482e..2a6d059205ef 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -19,20 +19,20 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [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 (i32, i32, i32) [template] -// CHECK:STDOUT: %tuple: (i32, i32, i32) = tuple_value (%.5, %.6, %.2) [template] +// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %tuple: %.7 = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,11 +41,11 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -55,12 +55,12 @@ fn G() { // 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 [i32; 3] = var a -// CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_22: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_25: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc13_28: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_29.1: (i32, i32, i32) = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28) +// CHECK:STDOUT: %.loc13_29.1: %.7 = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28) // CHECK:STDOUT: %.loc13_29.2: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -70,13 +70,13 @@ fn G() { // CHECK:STDOUT: %.loc13_29.8: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_30: init [i32; 3] = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array] +// 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: 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: (type, type, type) = 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: %.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.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] @@ -84,20 +84,20 @@ fn G() { // 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 (i32, i32, i32) = var b -// CHECK:STDOUT: %b: ref (i32, i32, i32) = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %.7 = var b +// CHECK:STDOUT: %b: ref %.7 = bind_name b, %b.var // CHECK:STDOUT: %.loc14_29: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc14_32: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc14_35: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_36.1: (i32, i32, i32) = tuple_literal (%.loc14_29, %.loc14_32, %.loc14_35) +// CHECK:STDOUT: %.loc14_36.1: %.7 = 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.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.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 (i32, i32, i32) = tuple_init (%.loc14_36.3, %.loc14_36.5, %.loc14_36.7) to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_37: init (i32, i32, i32) = converted %.loc14_36.1, %.loc14_36.8 [template = constants.%tuple] +// 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: 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 4d4eb65c9c83..0d97197dec84 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -19,18 +19,18 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] -// CHECK:STDOUT: %.7: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,27 +40,27 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_16.1: (type,) = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc11_16.1: %.2 = 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: @F.%return: ref (i32,) = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> (i32,) { +// CHECK:STDOUT: fn @F() -> %.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_28: i32 = int_literal 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_30: (i32,) = tuple_literal (%.loc11_28) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc11_28) [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_31: (i32,) = converted %.loc11_30, %tuple [template = constants.%tuple] +// 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: return %.loc11_31 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,19 +71,19 @@ fn Run() { // 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 [i32; 1] = var t -// CHECK:STDOUT: %t: ref [i32; 1] = bind_name t, %t.var -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init (i32,) = call %F.ref() -// CHECK:STDOUT: %.loc14_22.1: ref (i32,) = temporary_storage -// CHECK:STDOUT: %.loc14_22.2: ref (i32,) = temporary %.loc14_22.1, %F.call +// CHECK:STDOUT: %t.var: ref %.6 = var t +// CHECK:STDOUT: %t: ref %.6 = 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: %.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_literal 0 [template = constants.%.4] // 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 [i32; 1] = array_init (%.loc14_22.7) to %t.var -// CHECK:STDOUT: %.loc14_24: init [i32; 1] = converted %F.call, %.loc14_22.8 +// 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: 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 b249a8131b40..f546bf927305 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -16,16 +16,16 @@ var b: [i32; 3] = a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: i32 = int_literal 3 [template] -// CHECK:STDOUT: %tuple: (i32, i32, i32) = tuple_value (%.5, %.6, %.7) [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 [i32; 3] [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] // CHECK:STDOUT: %.10: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,13 +36,13 @@ var b: [i32; 3] = a; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_22.1: (type, type, type) = 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: %.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.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] @@ -50,16 +50,16 @@ var b: [i32; 3] = a; // 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 (i32, i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 3 [template = constants.%.7] // 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 [i32; 3] = var b -// CHECK:STDOUT: %b: ref [i32; 3] = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %.8 = var b +// CHECK:STDOUT: %b: ref %.8 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -69,17 +69,17 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc11_27: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_30: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_33: i32 = int_literal 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_34.1: (i32, i32, i32) = tuple_literal (%.loc11_27, %.loc11_30, %.loc11_33) +// CHECK:STDOUT: %.loc11_34.1: %.3 = 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.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.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 (i32, i32, i32) = tuple_init (%.loc11_34.3, %.loc11_34.5, %.loc11_34.7) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_35: init (i32, i32, i32) = converted %.loc11_34.1, %.loc11_34.8 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_35 -// CHECK:STDOUT: %a.ref: ref (i32, i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = 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_literal 0 [template = constants.%.10] @@ -95,8 +95,8 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc12_19.13: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc12_19.5, %.loc12_19.10, %.loc12_19.15) to file.%b.var -// CHECK:STDOUT: %.loc12_20: init [i32; 3] = converted %a.ref, %.loc12_19.16 +// 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: 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 702772913469..2667ff5321e1 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -17,31 +17,31 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: type = tuple_type (i32) [template] // CHECK:STDOUT: %.6: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array.1: [i32; 1] = tuple_value (%.2) [template] +// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.2) [template] // CHECK:STDOUT: %.7: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %.9: type = array_type %.8, f64 [template] -// CHECK:STDOUT: %.10: type = ptr_type [f64; 2] [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: [f64; 2] = tuple_value (%.11, %.12) [template] +// CHECK:STDOUT: %array.2: %.9 = tuple_value (%.11, %.12) [template] // CHECK:STDOUT: %.14: i32 = int_literal 5 [template] -// CHECK:STDOUT: %.15: type = array_type %.14, () [template] -// CHECK:STDOUT: %.16: type = ptr_type [(); 5] [template] -// CHECK:STDOUT: %.17: type = tuple_type ((), (), (), (), ()) [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [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_literal 3 [template] // CHECK:STDOUT: %.19: i32 = int_literal 4 [template] -// CHECK:STDOUT: %array.3: [(); 5] = tuple_value (%tuple, %tuple, %tuple, %tuple, %tuple) [template] +// CHECK:STDOUT: %array.3: %.15 = tuple_value (%tuple, %tuple, %tuple, %tuple, %tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,29 +52,29 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = var a -// CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: %.loc12_9.1: i32 = int_literal 64 [template = constants.%.7] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 2 [template = constants.%.8] // 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 [f64; 2] = var b -// CHECK:STDOUT: %b: ref [f64; 2] = bind_name b, %b.var -// CHECK:STDOUT: %.loc13_10.1: () = tuple_literal () +// 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_literal 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, () [template = constants.%.15] -// CHECK:STDOUT: %c.var: ref [(); 5] = var c -// CHECK:STDOUT: %c: ref [(); 5] = bind_name c, %c.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -84,53 +84,53 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_22.1: (i32,) = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_22.1: %.5 = tuple_literal (%.loc11_20) // CHECK:STDOUT: %.loc11_22.2: i32 = int_literal 0 [template = constants.%.6] // 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 [i32; 1] = array_init (%.loc11_22.4) to file.%a.var [template = constants.%array.1] -// CHECK:STDOUT: %.loc11_23: init [i32; 1] = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%array.1] +// 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: 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: (f64, f64) = tuple_literal (%.loc12_20, %.loc12_26) +// CHECK:STDOUT: %.loc12_30.1: %.13 = tuple_literal (%.loc12_20, %.loc12_26) // CHECK:STDOUT: %.loc12_30.2: i32 = int_literal 0 [template = constants.%.6] // 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_literal 1 [template = constants.%.2] // 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 [f64; 2] = array_init (%.loc12_30.4, %.loc12_30.7) to file.%b.var [template = constants.%array.2] -// CHECK:STDOUT: %.loc12_31: init [f64; 2] = converted %.loc12_30.1, %.loc12_30.8 [template = constants.%array.2] +// 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: assign file.%b.var, %.loc12_31 -// CHECK:STDOUT: %.loc13_20.1: () = tuple_literal () -// CHECK:STDOUT: %.loc13_24.1: () = tuple_literal () -// CHECK:STDOUT: %.loc13_28.1: () = tuple_literal () -// CHECK:STDOUT: %.loc13_32.1: () = tuple_literal () -// CHECK:STDOUT: %.loc13_36.1: () = tuple_literal () -// CHECK:STDOUT: %.loc13_38.1: ((), (), (), (), ()) = tuple_literal (%.loc13_20.1, %.loc13_24.1, %.loc13_28.1, %.loc13_32.1, %.loc13_36.1) +// 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_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_38.3: ref () = array_index file.%c.var, %.loc13_38.2 -// CHECK:STDOUT: %.loc13_20.2: init () = tuple_init () to %.loc13_38.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_38.4: init () = converted %.loc13_20.1, %.loc13_20.2 [template = constants.%tuple] +// 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_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_38.6: ref () = array_index file.%c.var, %.loc13_38.5 -// CHECK:STDOUT: %.loc13_24.2: init () = tuple_init () to %.loc13_38.6 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_38.7: init () = converted %.loc13_24.1, %.loc13_24.2 [template = constants.%tuple] +// 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_literal 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc13_38.9: ref () = array_index file.%c.var, %.loc13_38.8 -// CHECK:STDOUT: %.loc13_28.2: init () = tuple_init () to %.loc13_38.9 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_38.10: init () = converted %.loc13_28.1, %.loc13_28.2 [template = constants.%tuple] +// 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_literal 3 [template = constants.%.18] -// CHECK:STDOUT: %.loc13_38.12: ref () = array_index file.%c.var, %.loc13_38.11 -// CHECK:STDOUT: %.loc13_32.2: init () = tuple_init () to %.loc13_38.12 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_38.13: init () = converted %.loc13_32.1, %.loc13_32.2 [template = constants.%tuple] +// 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_literal 4 [template = constants.%.19] -// CHECK:STDOUT: %.loc13_38.15: ref () = array_index file.%c.var, %.loc13_38.14 -// CHECK:STDOUT: %.loc13_36.2: init () = tuple_init () to %.loc13_38.15 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_38.16: init () = converted %.loc13_36.1, %.loc13_36.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_38.17: init [(); 5] = 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 [(); 5] = converted %.loc13_38.1, %.loc13_38.17 [template = constants.%array.3] +// 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: 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 4d165c6f519e..a092653d7a03 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -18,17 +18,17 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.2, %.3, %.4) [template] +// CHECK:STDOUT: %array: %.5 = tuple_value (%.2, %.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,10 +38,10 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: .a = %a.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] @@ -57,27 +57,27 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_32.loc11_27, %.loc11_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc13_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_21: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_18, %.loc13_21) [template = constants.%.4] // 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 [i32; 3] = var a -// CHECK:STDOUT: %a.loc13: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.5 = var a +// CHECK:STDOUT: %a.loc13: ref %.5 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_14: i32 = int_literal 3 [template = constants.%.4] // 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 [i32; 3] [template = constants.%.6] -// CHECK:STDOUT: %a.ref: ref [i32; 3] = name_ref a, %a.loc13 -// CHECK:STDOUT: %.loc14_20: [i32; 3]* = addr_of %a.ref -// CHECK:STDOUT: %b.loc14: [i32; 3]* = bind_name b, %.loc14_20 +// CHECK:STDOUT: %.loc14_16: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, %a.loc13 +// CHECK:STDOUT: %.loc14_20: %.6 = addr_of %a.ref +// CHECK:STDOUT: %b.loc14: %.6 = bind_name b, %.loc14_20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -89,7 +89,7 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: %.loc13_28: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_31: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc13_34: i32 = int_literal 3 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_35.1: (i32, i32, i32) = tuple_literal (%.loc13_28, %.loc13_31, %.loc13_34) +// CHECK:STDOUT: %.loc13_35.1: %.7 = tuple_literal (%.loc13_28, %.loc13_31, %.loc13_34) // CHECK:STDOUT: %.loc13_35.2: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -99,8 +99,8 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: %.loc13_35.8: i32 = int_literal 2 [template = constants.%.3] // 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 [i32; 3] = array_init (%.loc13_35.4, %.loc13_35.7, %.loc13_35.10) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_36: init [i32; 3] = converted %.loc13_35.1, %.loc13_35.11 [template = constants.%array] +// 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: assign file.%a.var, %.loc13_36 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index f72bd5b57efd..17ce3ce3d551 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -20,9 +20,9 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: } @@ -34,9 +34,9 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // 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] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_14, %.loc11_14.1 [template = i32] @@ -47,9 +47,9 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11_22, %.loc11_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc16_21: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc16_21) [template = constants.%.3] // CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 43f564d33108..8cb40824887d 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -31,7 +31,7 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,7 +42,7 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_32, %.loc18_9.1 [template = i32] diff --git a/toolchain/check/testdata/array/fail_incomplete_element.carbon b/toolchain/check/testdata/array/fail_incomplete_element.carbon index 0bdf9f74f41c..37b5113bad90 100644 --- a/toolchain/check/testdata/array/fail_incomplete_element.carbon +++ b/toolchain/check/testdata/array/fail_incomplete_element.carbon @@ -25,8 +25,8 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.2: type = array_type %.1, Incomplete [template] -// CHECK:STDOUT: %.3: type = ptr_type Incomplete [template] +// CHECK:STDOUT: %.2: type = array_type %.1, %Incomplete [template] +// CHECK:STDOUT: %.3: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -41,13 +41,13 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} // CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc19_21: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc19_22: type = array_type %.loc19_21, Incomplete [template = constants.%.2] +// CHECK:STDOUT: %.loc19_22: type = array_type %.loc19_21, %Incomplete [template = constants.%.2] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc21: type = ptr_type Incomplete [template = constants.%.3] -// CHECK:STDOUT: %p.var: ref Incomplete* = var p -// CHECK:STDOUT: %p: ref Incomplete* = bind_name p, %p.var +// CHECK:STDOUT: %.loc21: type = ptr_type %Incomplete [template = constants.%.3] +// CHECK:STDOUT: %p.var: ref %.3 = var p +// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index 861e94bb95e1..987213198ef3 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -18,10 +18,10 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: i32 = int_literal 3 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] @@ -33,14 +33,14 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_14: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = var a -// CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -50,7 +50,7 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: %.loc14_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_23: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc14_26: i32 = int_literal 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_27: (i32, i32, i32) = tuple_literal (%.loc14_20, %.loc14_23, %.loc14_26) +// CHECK:STDOUT: %.loc14_27: %.7 = 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 0b76220303d3..610528545749 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 @@ -19,17 +19,17 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: %.9: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.2) [template] +// CHECK:STDOUT: %struct: %.9 = struct_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,15 +39,15 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 3 [template = constants.%.2] // 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 [i32; 3] = var a -// CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -62,7 +62,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.loc11_20: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_27.1: (i32, i32, i32) = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) +// CHECK:STDOUT: %.loc11_27.1: %.7 = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) // CHECK:STDOUT: %.loc11_27.2: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -72,14 +72,14 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.loc11_27.8: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_28: init [i32; 3] = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array] +// 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: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref [i32; 3] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_26: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_27.1: {.index: i32} = struct_literal (%.loc15_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc15_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_27.2: {.index: i32} = converted %.loc15_27.1, %struct [template = constants.%struct] +// 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: %.loc15_34.1: ref i32 = array_index %a.ref, %.loc15_28 [template = ] // CHECK:STDOUT: %.loc15_34.2: i32 = bind_value %.loc15_34.1 diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 3c8886453e97..9a4d8a83d3b5 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -38,10 +38,10 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: type = ptr_type String [template] // CHECK:STDOUT: %.7: String = string_literal "Hello" [template] @@ -49,12 +49,12 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.9: type = tuple_type (i32, String, String) [template] // CHECK:STDOUT: %.10: i32 = int_literal 0 [template] // CHECK:STDOUT: %.11: type = tuple_type (type, type, type) [template] -// CHECK:STDOUT: %.12: type = tuple_type (i32, String*, String*) [template] -// CHECK:STDOUT: %.13: type = ptr_type (i32, String*, String*) [template] +// CHECK:STDOUT: %.12: type = tuple_type (i32, %.6, %.6) [template] +// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] // CHECK:STDOUT: %.14: i32 = int_literal 2 [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.16: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.17: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %.17: type = ptr_type %.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,58 +68,58 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_32.loc15, %.loc15_9.1 [template = i32] // CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref [i32; 3] = var a -// CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc17_29.1: (type, type, type) = tuple_literal (%int.make_type_32.loc17, String, String) +// CHECK:STDOUT: %.loc17_29.1: %.11 = tuple_literal (%int.make_type_32.loc17, String, String) // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_29.3: type = converted %int.make_type_32.loc17, %.loc17_29.2 [template = i32] // CHECK:STDOUT: %.loc17_29.4: type = converted %.loc17_29.1, constants.%.9 [template = constants.%.9] -// CHECK:STDOUT: %t1.var: ref (i32, String, String) = var t1 -// CHECK:STDOUT: %t1: ref (i32, String, String) = bind_name t1, %t1.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %t1.var: ref %.9 = var t1 +// CHECK:STDOUT: %t1: ref %.9 = bind_name t1, %t1.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc22_9.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_9.2: type = converted %int.make_type_32.loc22, %.loc22_9.1 [template = i32] // CHECK:STDOUT: %.loc22_15: type = array_type %.loc22_14, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.var: ref [i32; 3] = var b -// CHECK:STDOUT: %b: ref [i32; 3] = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %b.var: ref %.3 = var b +// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_14: i32 = int_literal 3 [template = constants.%.2] // 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: %c.var: ref [i32; 3] = var c -// CHECK:STDOUT: %c: ref [i32; 3] = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %c.var: ref %.3 = var c +// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc30_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc30_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc30_18.1: (type, type) = tuple_literal (%int.make_type_32.loc30_10, %int.make_type_32.loc30_15) +// CHECK:STDOUT: %.loc30_18.1: %.16 = tuple_literal (%int.make_type_32.loc30_10, %int.make_type_32.loc30_15) // CHECK:STDOUT: %.loc30_18.2: type = value_of_initializer %int.make_type_32.loc30_10 [template = i32] // CHECK:STDOUT: %.loc30_18.3: type = converted %int.make_type_32.loc30_10, %.loc30_18.2 [template = i32] // CHECK:STDOUT: %.loc30_18.4: type = value_of_initializer %int.make_type_32.loc30_15 [template = i32] // CHECK:STDOUT: %.loc30_18.5: type = converted %int.make_type_32.loc30_15, %.loc30_18.4 [template = i32] // CHECK:STDOUT: %.loc30_18.6: type = converted %.loc30_18.1, constants.%.15 [template = constants.%.15] -// CHECK:STDOUT: %t2.var: ref (i32, i32) = var t2 -// CHECK:STDOUT: %t2: ref (i32, i32) = bind_name t2, %t2.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %t2.var: ref %.15 = var t2 +// CHECK:STDOUT: %t2: ref %.15 = bind_name t2, %t2.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_14: i32 = int_literal 3 [template = constants.%.2] // 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: %d.var: ref [i32; 3] = var d -// CHECK:STDOUT: %d: ref [i32; 3] = bind_name d, %d.var +// CHECK:STDOUT: %d.var: ref %.3 = var d +// CHECK:STDOUT: %d: ref %.3 = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -129,12 +129,12 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc15_20: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc15_23: String = string_literal "Hello" [template = constants.%.7] // CHECK:STDOUT: %.loc15_32: String = string_literal "World" [template = constants.%.8] -// CHECK:STDOUT: %.loc15_39.1: (i32, String, String) = tuple_literal (%.loc15_20, %.loc15_23, %.loc15_32) +// CHECK:STDOUT: %.loc15_39.1: %.9 = tuple_literal (%.loc15_20, %.loc15_23, %.loc15_32) // CHECK:STDOUT: %.loc15_39.2: i32 = int_literal 0 [template = constants.%.10] // CHECK:STDOUT: %.loc15_39.3: ref i32 = array_index file.%a.var, %.loc15_39.2 // CHECK:STDOUT: %.loc15_39.4: init i32 = initialize_from %.loc15_20 to %.loc15_39.3 [template = constants.%.5] // CHECK:STDOUT: assign file.%a.var, -// CHECK:STDOUT: %t1.ref: ref (i32, String, String) = name_ref t1, file.%t1 +// CHECK:STDOUT: %t1.ref: ref %.9 = name_ref t1, file.%t1 // CHECK:STDOUT: %.loc22_19.1: ref i32 = tuple_access %t1.ref, element0 // CHECK:STDOUT: %.loc22_19.2: i32 = bind_value %.loc22_19.1 // CHECK:STDOUT: %.loc22_19.3: i32 = int_literal 0 [template = constants.%.10] @@ -144,9 +144,9 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: %.loc28_20: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc28_23: i32 = int_literal 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc28_24: (i32, i32) = tuple_literal (%.loc28_20, %.loc28_23) +// CHECK:STDOUT: %.loc28_24: %.15 = tuple_literal (%.loc28_20, %.loc28_23) // CHECK:STDOUT: assign file.%c.var, -// CHECK:STDOUT: %t2.ref: ref (i32, i32) = name_ref t2, file.%t2 +// CHECK:STDOUT: %t2.ref: ref %.15 = name_ref t2, file.%t2 // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_undefined_bound.carbon b/toolchain/check/testdata/array/fail_undefined_bound.carbon index 6926d80d8cc6..e0e567d4be0e 100644 --- a/toolchain/check/testdata/array/fail_undefined_bound.carbon +++ b/toolchain/check/testdata/array/fail_undefined_bound.carbon @@ -18,7 +18,7 @@ var a: [i32; ]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 6ec84cd6f1eb..96578c2aa9c8 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -21,19 +21,19 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,17 +43,17 @@ fn G() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17: i32 = int_literal 3 [template = constants.%.2] // 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: %arr.loc11_6.1: [i32; 3] = param arr -// CHECK:STDOUT: @F.%arr: [i32; 3] = bind_name arr, %arr.loc11_6.1 +// CHECK:STDOUT: %arr.loc11_6.1: %.3 = param arr +// CHECK:STDOUT: @F.%arr: %.3 = bind_name arr, %arr.loc11_6.1 // 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] @@ -64,8 +64,8 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc11_32.2: type = converted %int.make_type_32.loc11_32, %.loc11_32.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_11.2: type = converted %int.make_type_32.loc15, %.loc15_11.1 [template = i32] @@ -75,11 +75,11 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%arr: [i32; 3], %i: i32) -> i32 { +// CHECK:STDOUT: fn @F(%arr: %.3, %i: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: [i32; 3] = name_ref arr, %arr +// CHECK:STDOUT: %arr.ref: %.3 = name_ref arr, %arr // CHECK:STDOUT: %i.ref: i32 = name_ref i, %i -// CHECK:STDOUT: %.loc12_15.1: ref [i32; 3] = value_as_ref %arr.ref +// CHECK:STDOUT: %.loc12_15.1: ref %.3 = 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 @@ -87,13 +87,13 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc16_13: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc16_16: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc16_19: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_20.1: (i32, i32, i32) = tuple_literal (%.loc16_13, %.loc16_16, %.loc16_19) +// CHECK:STDOUT: %.loc16_20.1: %.7 = tuple_literal (%.loc16_13, %.loc16_16, %.loc16_19) // CHECK:STDOUT: %.loc16_23: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_20.2: ref [i32; 3] = temporary_storage +// CHECK:STDOUT: %.loc16_20.2: ref %.3 = temporary_storage // CHECK:STDOUT: %.loc16_20.3: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -103,10 +103,10 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc16_20.9: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc16_20.5, %.loc16_20.8, %.loc16_20.11) to %.loc16_20.2 [template = constants.%array] -// CHECK:STDOUT: %.loc16_11.1: init [i32; 3] = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array] -// CHECK:STDOUT: %.loc16_11.2: ref [i32; 3] = temporary %.loc16_20.2, %.loc16_11.1 -// CHECK:STDOUT: %.loc16_11.3: [i32; 3] = bind_value %.loc16_11.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_11.1: init %.3 = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array] +// CHECK:STDOUT: %.loc16_11.2: ref %.3 = temporary %.loc16_20.2, %.loc16_11.1 +// CHECK:STDOUT: %.loc16_11.3: %.3 = bind_value %.loc16_11.2 // CHECK:STDOUT: %F.call: init i32 = call %F.ref(%.loc16_11.3, %.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/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index c26f3e362f12..5ecd8cb083aa 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -16,17 +16,17 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: %.9: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.6) [template] +// CHECK:STDOUT: %struct: %.9 = struct_value (%.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,15 +36,15 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 3 [template = constants.%.2] // 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 [i32; 3] = var a -// CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -59,7 +59,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc11_20: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_27.1: (i32, i32, i32) = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) +// CHECK:STDOUT: %.loc11_27.1: %.7 = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) // CHECK:STDOUT: %.loc11_27.2: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -69,14 +69,14 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc11_27.8: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_28: init [i32; 3] = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array] +// 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: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref [i32; 3] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc12_26: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_27.1: {.index: i32} = struct_literal (%.loc12_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc12_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_27.2: {.index: i32} = converted %.loc12_27.1, %struct [template = constants.%struct] +// 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: %.loc12_34.1: ref i32 = array_index %a.ref, %.loc12_28 // CHECK:STDOUT: %.loc12_34.2: i32 = bind_value %.loc12_34.1 diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 4213a6f04692..d93b1eeced4d 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -15,10 +15,10 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 9 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 9] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: i32 = int_literal 3 [template] @@ -29,7 +29,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %.12: i32 = int_literal 8 [template] // CHECK:STDOUT: %.13: type = tuple_type (i32, i32, i32, i32, i32, i32, i32, i32, i32) [template] // CHECK:STDOUT: %.14: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 9] = tuple_value (%.5, %.6, %.7, %.8, %.9, %.10, %.11, %.12, %.2) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.7, %.8, %.9, %.10, %.11, %.12, %.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,14 +38,14 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 9 [template = constants.%.2] // 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 [i32; 9] = var a -// CHECK:STDOUT: %a: ref [i32; 9] = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -61,7 +61,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %.loc11_38: i32 = int_literal 7 [template = constants.%.11] // CHECK:STDOUT: %.loc11_41: i32 = int_literal 8 [template = constants.%.12] // CHECK:STDOUT: %.loc11_44: i32 = int_literal 9 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_45.1: (i32, i32, i32, i32, i32, i32, i32, i32, i32) = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26, %.loc11_29, %.loc11_32, %.loc11_35, %.loc11_38, %.loc11_41, %.loc11_44) +// 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_literal 0 [template = constants.%.14] // 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] @@ -89,8 +89,8 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %.loc11_45.26: i32 = int_literal 8 [template = constants.%.12] // 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 [i32; 9] = 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 [i32; 9] = converted %.loc11_45.1, %.loc11_45.29 [template = constants.%array] +// 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: 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 f40d37963faa..2fd01ae3cf95 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -108,17 +108,17 @@ var b: B = {.x = 1} as B; // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %A, i32 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: A = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %A = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.7: type = ptr_type B [template] +// CHECK:STDOUT: %.7: type = ptr_type %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -131,47 +131,47 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %A.ref.loc17: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %a_ref.var: ref A = var a_ref -// CHECK:STDOUT: %a_ref: ref A = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %a_ref.var: ref %A = var a_ref +// CHECK:STDOUT: %a_ref: ref %A = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %A.ref.loc18: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %a_ref.ref.loc18: ref A = name_ref a_ref, %a_ref -// CHECK:STDOUT: %.loc18: A = bind_value %a_ref.ref.loc18 -// CHECK:STDOUT: %a_val: A = bind_name a_val, %.loc18 +// CHECK:STDOUT: %a_ref.ref.loc18: ref %A = name_ref a_ref, %a_ref +// CHECK:STDOUT: %.loc18: %A = bind_value %a_ref.ref.loc18 +// CHECK:STDOUT: %a_val: %A = bind_name a_val, %.loc18 // CHECK:STDOUT: %B.ref.loc21_12: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %a_val.ref: A = name_ref a_val, %a_val +// CHECK:STDOUT: %a_val.ref: %A = name_ref a_val, %a_val // CHECK:STDOUT: %B.ref.loc21_25: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21_22.1: B = as_compatible %a_val.ref -// CHECK:STDOUT: %.loc21_22.2: B = converted %a_val.ref, %.loc21_22.1 -// CHECK:STDOUT: %b_val: B = bind_name b_val, %.loc21_22.2 +// CHECK:STDOUT: %.loc21_22.1: %B = as_compatible %a_val.ref +// CHECK:STDOUT: %.loc21_22.2: %B = converted %a_val.ref, %.loc21_22.1 +// CHECK:STDOUT: %b_val: %B = bind_name b_val, %.loc21_22.2 // CHECK:STDOUT: %B.ref.loc22_12: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc22_13: type = ptr_type B [template = constants.%.7] -// CHECK:STDOUT: %a_ref.ref.loc22: ref A = name_ref a_ref, %a_ref +// CHECK:STDOUT: %.loc22_13: type = ptr_type %B [template = constants.%.7] +// CHECK:STDOUT: %a_ref.ref.loc22: ref %A = name_ref a_ref, %a_ref // CHECK:STDOUT: %B.ref.loc22_28: type = name_ref B, %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: B* = addr_of %.loc22_25.2 -// CHECK:STDOUT: %b_ptr: B* = bind_name b_ptr, %.loc22_17 +// 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: %.7 = addr_of %.loc22_25.2 +// CHECK:STDOUT: %b_ptr: %.7 = bind_name b_ptr, %.loc22_17 // 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 +// CHECK:STDOUT: %b_factory.var: ref %B = var b_factory +// CHECK:STDOUT: %b_factory: ref %B = bind_name b_factory, %b_factory.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = 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: = field_decl y, element1 [template] -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %.loc6_8: %.2 = field_decl y, element1 [template] +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %return.var: ref A = var +// CHECK:STDOUT: %return.var: ref %A = var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -183,7 +183,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // 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: adapt_decl %A // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -191,17 +191,17 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> @A.%return.var: A { +// CHECK:STDOUT: fn @Make() -> @A.%return.var: %A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc9_18: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_26: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_27.1: {.x: i32, .y: i32} = struct_literal (%.loc9_18, %.loc9_26) +// CHECK:STDOUT: %.loc9_27.1: %.3 = struct_literal (%.loc9_18, %.loc9_26) // CHECK:STDOUT: %.loc9_27.2: ref i32 = class_element_access @A.%return.var, element0 // 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 @A.%return.var, element1 // 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), @A.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc9_28: init A = converted %.loc9_27.1, %.loc9_27.6 [template = constants.%struct] +// CHECK:STDOUT: %.loc9_27.6: init %A = class_init (%.loc9_27.3, %.loc9_27.5), @A.%return.var [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 @A.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -209,21 +209,21 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_22: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc17_30: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_31.1: {.x: i32, .y: i32} = struct_literal (%.loc17_22, %.loc17_30) +// CHECK:STDOUT: %.loc17_31.1: %.3 = 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.%.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.%.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: %.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 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Make.ref: = name_ref Make, @A.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc24_5: ref B = splice_block file.%b_factory.var {} -// CHECK:STDOUT: %Make.call: init A = call %Make.ref() to %.loc24_5 +// 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 {} +// CHECK:STDOUT: %Make.call: init %A = call %Make.ref() to %.loc24_5 // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc24_29.1: init B = as_compatible %Make.call -// CHECK:STDOUT: %.loc24_29.2: init B = converted %Make.call, %.loc24_29.1 +// CHECK:STDOUT: %.loc24_29.1: init %B = as_compatible %Make.call +// CHECK:STDOUT: %.loc24_29.2: init %B = converted %Make.call, %.loc24_29.1 // CHECK:STDOUT: assign file.%b_factory.var, %.loc24_29.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -234,7 +234,7 @@ var b: B = {.x = 1} as B; // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,23 +245,23 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %A.ref.loc8_8: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc8_13: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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.loc8_26: type = name_ref A, %A.decl [template = constants.%A] -// 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: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9_8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9_8 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9_8, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %a.ref: A = name_ref a, %a -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.ref: %A = name_ref a, %a +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] @@ -291,7 +291,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %struct: {} = struct_value () [template] +// CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -308,18 +308,18 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %D.ref.loc9_8: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc9_13: {} = struct_literal () +// CHECK:STDOUT: %.loc9_13: %.1 = struct_literal () // CHECK:STDOUT: %D.ref.loc9_18: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc9_15.1: D = as_compatible %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc9_15.2: D = converted %.loc9_13, %.loc9_15.1 [template = constants.%struct] -// CHECK:STDOUT: %d: D = bind_name d, %.loc9_15.2 +// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc9_15.1: %D = as_compatible %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc9_15.2: %D = converted %.loc9_13, %.loc9_15.1 [template = constants.%struct] +// CHECK:STDOUT: %d: %D = bind_name d, %.loc9_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc4_18: {} = struct_literal () +// CHECK:STDOUT: %.loc4_18: %.1 = struct_literal () // CHECK:STDOUT: %.loc4_19: type = converted %.loc4_18, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: adapt_decl {} +// CHECK:STDOUT: adapt_decl %.1 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -327,7 +327,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // 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: adapt_decl %A // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -335,7 +335,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: adapt_decl B +// CHECK:STDOUT: adapt_decl %B // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -343,7 +343,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: adapt_decl C +// CHECK:STDOUT: adapt_decl %C // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -355,14 +355,14 @@ var b: B = {.x = 1} as B; // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [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: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .y: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: A = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %A = struct_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -374,41 +374,41 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %B.ref.loc13_14: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13_25: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_33: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_34.1: {.x: i32, .y: i32} = struct_literal (%.loc13_25, %.loc13_33) +// CHECK:STDOUT: %.loc13_34.1: %.3 = struct_literal (%.loc13_25, %.loc13_33) // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc13_34.2: ref A = temporary_storage +// 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.%.5] // 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.%.6] -// 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 +// 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 // CHECK:STDOUT: %B.ref.loc13_45: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc13_42.1: ref B = as_compatible %.loc13_36 -// 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: %.loc13_42.1: ref %B = as_compatible %.loc13_36 +// 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: %B.ref.loc24: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %b_init.var: ref B = var b_init -// CHECK:STDOUT: %b_init: ref B = bind_name b_init, %b_init.var +// CHECK:STDOUT: %b_init.var: ref %B = var b_init +// CHECK:STDOUT: %b_init: ref %B = bind_name b_init, %b_init.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = 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: = field_decl y, element1 [template] +// CHECK:STDOUT: %.loc6_8: %.2 = field_decl y, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -418,7 +418,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // 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: adapt_decl %A // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -430,20 +430,20 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc24_24: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc24_32: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_33.1: {.x: i32, .y: i32} = struct_literal (%.loc24_24, %.loc24_32) +// CHECK:STDOUT: %.loc24_33.1: %.3 = struct_literal (%.loc24_24, %.loc24_32) // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc24_33.2: ref A = temporary_storage +// 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.%.5] // 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.%.6] -// 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 +// 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 // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc24_41.1: ref B = as_compatible %.loc24_35 -// CHECK:STDOUT: %.loc24_41.2: ref B = converted %.loc24_35, %.loc24_41.1 -// CHECK:STDOUT: %.loc24_41.3: B = bind_value %.loc24_41.2 +// CHECK:STDOUT: %.loc24_41.1: ref %B = as_compatible %.loc24_35 +// CHECK:STDOUT: %.loc24_41.2: ref %B = converted %.loc24_35, %.loc24_41.1 +// CHECK:STDOUT: %.loc24_41.3: %B = bind_value %.loc24_41.2 // CHECK:STDOUT: assign file.%b_init.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -454,11 +454,11 @@ var b: B = {.x = 1} as B; // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [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: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = ptr_type {.x: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -471,18 +471,18 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %B.ref: type = name_ref B, %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: %b.var: ref %B = var b +// CHECK:STDOUT: %b: ref %B = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: 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_8: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -491,7 +491,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // 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: adapt_decl %A // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -502,7 +502,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_18: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_19: {.x: i32} = struct_literal (%.loc18_18) +// CHECK:STDOUT: %.loc18_19: %.3 = struct_literal (%.loc18_18) // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/as/as_type.carbon b/toolchain/check/testdata/as/as_type.carbon index 6b13e765a78f..610de94e68e5 100644 --- a/toolchain/check/testdata/as/as_type.carbon +++ b/toolchain/check/testdata/as/as_type.carbon @@ -15,7 +15,7 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: } @@ -25,11 +25,11 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_24: (type, type) = tuple_literal (%int.make_type_32.loc11_16, %int.make_type_32.loc11_21) +// CHECK:STDOUT: %.loc11_24: %.2 = 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] diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index eb5b09a981cd..b7d9f7f4bb33 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -17,9 +17,9 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -29,14 +29,14 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index 2bfa5dca2f3b..52318638d8de 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -18,10 +18,10 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -30,28 +30,28 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) +// CHECK:STDOUT: %.loc14_17.1: %.2 = 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: %.loc14_21: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_35.1: (type, type) = tuple_literal (%int.make_type_32.loc14_27, %int.make_type_32.loc14_32) +// CHECK:STDOUT: %.loc14_35.1: %.2 = tuple_literal (%int.make_type_32.loc14_27, %int.make_type_32.loc14_32) // CHECK:STDOUT: %.loc14_35.2: type = value_of_initializer %int.make_type_32.loc14_27 [template = i32] // CHECK:STDOUT: %.loc14_35.3: type = converted %int.make_type_32.loc14_27, %.loc14_35.2 [template = i32] // CHECK:STDOUT: %.loc14_35.4: type = value_of_initializer %int.make_type_32.loc14_32 [template = i32] // CHECK:STDOUT: %.loc14_35.5: type = converted %int.make_type_32.loc14_32, %.loc14_35.4 [template = i32] // CHECK:STDOUT: %.loc14_35.6: type = converted %.loc14_35.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %n: (i32, i32) = bind_name n, +// CHECK:STDOUT: %n: %.3 = bind_name n, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index 698416ad153f..9f33b9da4ad6 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -18,7 +18,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -28,7 +28,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_32, %.loc14_8.1 [template = i32] diff --git a/toolchain/check/testdata/as/identity.carbon b/toolchain/check/testdata/as/identity.carbon index 9c33fefc624b..cb60690b1169 100644 --- a/toolchain/check/testdata/as/identity.carbon +++ b/toolchain/check/testdata/as/identity.carbon @@ -35,15 +35,15 @@ fn Initializing() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Value.type: type = fn_type @Value [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Value: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = ptr_type X [template] +// CHECK:STDOUT: %Value: %Value.type = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %Reference: %Reference.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %Initializing.type: type = fn_type @Initializing [template] -// CHECK:STDOUT: %Initializing: = struct_value () [template] +// CHECK:STDOUT: %Initializing: %Initializing.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,22 +57,22 @@ fn Initializing() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %Value.decl: = fn_decl @Value [template = constants.%Value] { +// CHECK:STDOUT: %Value.decl: %Value.type = fn_decl @Value [template = constants.%Value] { // CHECK:STDOUT: %X.ref.loc17: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %n.loc17_10.1: X = param n -// CHECK:STDOUT: @Value.%n: X = bind_name n, %n.loc17_10.1 +// CHECK:STDOUT: %n.loc17_10.1: %X = param n +// CHECK:STDOUT: @Value.%n: %X = bind_name n, %n.loc17_10.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Reference.decl: = fn_decl @Reference [template = constants.%Reference] { +// CHECK:STDOUT: %Reference.decl: %Reference.type = fn_decl @Reference [template = constants.%Reference] { // CHECK:STDOUT: %X.ref.loc21: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc21: type = ptr_type X [template = constants.%.4] -// CHECK:STDOUT: %p.loc21_14.1: X* = param p -// CHECK:STDOUT: @Reference.%p: X* = bind_name p, %p.loc21_14.1 +// CHECK:STDOUT: %.loc21: type = ptr_type %X [template = constants.%.4] +// CHECK:STDOUT: %p.loc21_14.1: %.4 = param p +// CHECK:STDOUT: @Reference.%p: %.4 = bind_name p, %p.loc21_14.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %X.ref.loc25: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: @Make.%return: ref X = var +// CHECK:STDOUT: @Make.%return: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Initializing.decl: = fn_decl @Initializing [template = constants.%Initializing] {} +// CHECK:STDOUT: %Initializing.decl: %Initializing.type = fn_decl @Initializing [template = constants.%Initializing] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -80,37 +80,37 @@ fn Initializing() { // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Value(%n: X) { +// CHECK:STDOUT: fn @Value(%n: %X) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %X.ref.loc18_10: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %n.ref: X = name_ref n, %n +// CHECK:STDOUT: %n.ref: %X = name_ref n, %n // CHECK:STDOUT: %X.ref.loc18_19: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %m: X = bind_name m, %n.ref +// CHECK:STDOUT: %m: %X = bind_name m, %n.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Reference(%p: X*) { +// CHECK:STDOUT: fn @Reference(%p: %.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.%.4] -// CHECK:STDOUT: %p.ref: X* = name_ref p, %p -// CHECK:STDOUT: %.loc22_17: ref X = deref %p.ref +// 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: X* = addr_of %.loc22_17 -// CHECK:STDOUT: %q: X* = 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: -// CHECK:STDOUT: fn @Make() -> X; +// CHECK:STDOUT: fn @Make() -> %X; // CHECK:STDOUT: // CHECK:STDOUT: fn @Initializing() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %X.ref.loc28_10: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %x.var: ref X = var x -// CHECK:STDOUT: %x: ref X = bind_name x, %x.var -// CHECK:STDOUT: %Make.ref: = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc28: ref X = splice_block %x.var {} -// CHECK:STDOUT: %Make.call: init X = call %Make.ref() to %.loc28 +// CHECK:STDOUT: %x.var: ref %X = var x +// CHECK:STDOUT: %x: ref %X = bind_name x, %x.var +// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] +// CHECK:STDOUT: %.loc28: ref %X = splice_block %x.var {} +// CHECK:STDOUT: %Make.call: init %X = call %Make.ref() to %.loc28 // CHECK:STDOUT: %X.ref.loc28_25: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: assign %x.var, %Make.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/as/no_prelude/tuple.carbon b/toolchain/check/testdata/as/no_prelude/tuple.carbon index b25addb2503d..438a34b6f4e1 100644 --- a/toolchain/check/testdata/as/no_prelude/tuple.carbon +++ b/toolchain/check/testdata/as/no_prelude/tuple.carbon @@ -31,16 +31,16 @@ fn Var() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %Let.type: type = fn_type @Let [template] -// CHECK:STDOUT: %Let: = struct_value () [template] +// CHECK:STDOUT: %Let: %Let.type = struct_value () [template] // CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.4: type = tuple_type (X, X) [template] -// CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = tuple_type ({}*, {}*) [template] -// CHECK:STDOUT: %.7: type = ptr_type ({}*, {}*) [template] +// CHECK:STDOUT: %.4: type = tuple_type (%X, %X) [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.6: type = tuple_type (%.5, %.5) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] // CHECK:STDOUT: %Var.type: type = fn_type @Var [template] -// CHECK:STDOUT: %Var: = struct_value () [template] +// CHECK:STDOUT: %Var: %Var.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,12 +51,12 @@ fn Var() { // CHECK:STDOUT: .Var = %Var.decl // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %X.ref: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: @Make.%return: ref X = var +// CHECK:STDOUT: @Make.%return: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Let.decl: = fn_decl @Let [template = constants.%Let] {} -// CHECK:STDOUT: %Var.decl: = fn_decl @Var [template = constants.%Var] {} +// CHECK:STDOUT: %Let.decl: %Let.type = fn_decl @Let [template = constants.%Let] {} +// CHECK:STDOUT: %Var.decl: %Var.type = fn_decl @Var [template = constants.%Var] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -64,32 +64,32 @@ fn Var() { // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> X; +// CHECK:STDOUT: fn @Make() -> %X; // CHECK:STDOUT: // CHECK:STDOUT: fn @Let() { // 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: (type, type) = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14) +// CHECK:STDOUT: %.loc19_15.1: %.3 = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14) // CHECK:STDOUT: %.loc19_15.2: type = converted %.loc19_15.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %Make.ref.loc19_20: = 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: = 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: (X, X) = tuple_literal (%Make.call.loc19_24, %Make.call.loc19_32) +// 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: %.4 = 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: (type, type) = tuple_literal (%X.ref.loc19_40, %X.ref.loc19_43) +// CHECK:STDOUT: %.loc19_44.1: %.3 = tuple_literal (%X.ref.loc19_40, %X.ref.loc19_43) // CHECK:STDOUT: %.loc19_44.2: type = converted %.loc19_44.1, constants.%.4 [template = constants.%.4] -// 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: (X, X) = tuple_value (%.loc19_24.3, %.loc19_32.3) -// CHECK:STDOUT: %.loc19_45: (X, X) = converted %.loc19_34, %tuple -// CHECK:STDOUT: %a: (X, X) = bind_name a, %.loc19_45 +// 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: %.4 = tuple_value (%.loc19_24.3, %.loc19_32.3) +// CHECK:STDOUT: %.loc19_45: %.4 = converted %.loc19_34, %tuple +// CHECK:STDOUT: %a: %.4 = bind_name a, %.loc19_45 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -97,23 +97,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: (type, type) = tuple_literal (%X.ref.loc24_11, %X.ref.loc24_14) +// CHECK:STDOUT: %.loc24_15.1: %.3 = tuple_literal (%X.ref.loc24_11, %X.ref.loc24_14) // CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %b.var: ref (X, X) = var b -// CHECK:STDOUT: %b: ref (X, X) = bind_name b, %b.var -// CHECK:STDOUT: %Make.ref.loc24_20: = 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: = 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: (X, X) = tuple_literal (%Make.call.loc24_24, %Make.call.loc24_32) +// CHECK:STDOUT: %b.var: ref %.4 = var b +// CHECK:STDOUT: %b: ref %.4 = 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: %.4 = 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: (type, type) = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43) +// CHECK:STDOUT: %.loc24_44.1: %.3 = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43) // CHECK:STDOUT: %.loc24_44.2: type = converted %.loc24_44.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %.loc24_34.4: init (X, X) = tuple_init (%Make.call.loc24_24, %Make.call.loc24_32) to %b.var -// CHECK:STDOUT: %.loc24_45: init (X, X) = converted %.loc24_34.3, %.loc24_34.4 +// CHECK:STDOUT: %.loc24_34.4: init %.4 = tuple_init (%Make.call.loc24_24, %Make.call.loc24_32) to %b.var +// CHECK:STDOUT: %.loc24_45: init %.4 = 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/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 47700b1f70a1..68ece9160ec1 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -18,11 +18,11 @@ var test_type: type = i32; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [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] @@ -36,14 +36,14 @@ var test_type: type = i32; // CHECK:STDOUT: .test_type = %test_type // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_32 [template = 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: i32 = int_literal 64 [template = constants.%.3] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // 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] @@ -53,7 +53,7 @@ var test_type: type = i32; // CHECK:STDOUT: %test_str: String = bind_name test_str, %.loc13 // CHECK:STDOUT: %test_type.var: ref type = var test_type // CHECK:STDOUT: %test_type: ref type = bind_name test_type, %test_type.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "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 29eb69a67df0..02ba5db437d5 100644 --- a/toolchain/check/testdata/basics/fail_bad_run.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run.carbon @@ -22,7 +22,7 @@ fn Run() -> String {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type String [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,7 +32,7 @@ fn Run() -> String {} // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: @Run.%return: ref String = var // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index e02193cc1b20..d0beb7589dc1 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -18,9 +18,9 @@ fn Run(n: i32) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,8 +29,8 @@ fn Run(n: i32) {} // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // 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] diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 23ae22213f8c..b327841a8812 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -42,10 +42,10 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,29 +53,29 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %a: i32 = bind_name a, -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_32.loc21, %.loc21_8.1 [template = i32] // CHECK:STDOUT: %b: i32 = bind_name b, -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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: %c: i32 = bind_name c, // CHECK:STDOUT: %.loc33_8.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // 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: %d: f64 = bind_name d, // CHECK:STDOUT: %.loc38_8.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // 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 585777a8916c..d0c3ee878538 100644 --- a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon +++ b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon @@ -19,7 +19,7 @@ var y: i32 = x.b; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,13 +29,13 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] diff --git a/toolchain/check/testdata/basics/multifile.carbon b/toolchain/check/testdata/basics/multifile.carbon index 5e9b84a807d8..f1734e3dfaa7 100644 --- a/toolchain/check/testdata/basics/multifile.carbon +++ b/toolchain/check/testdata/basics/multifile.carbon @@ -23,7 +23,7 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,7 +32,7 @@ fn B() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -45,7 +45,7 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,7 +54,7 @@ fn B() {} // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() { 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 28eb8a0a7ff0..77e0d4ea114d 100644 --- a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon +++ b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon @@ -20,14 +20,14 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { 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 5cea3c2895e8..b122bbc982a8 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 @@ -68,14 +68,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -129,14 +129,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() { 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 fc909b3e208a..f47b95345925 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 @@ -146,46 +146,46 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type ((), ()) [template] +// CHECK:STDOUT: %.2: type = tuple_type (%.1, %.1) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type ((), ()) [template] -// CHECK:STDOUT: %tuple.1: () = tuple_value () [template] -// CHECK:STDOUT: %tuple.2: ((), ()) = tuple_value (%tuple.1, %tuple.1) [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %.loc15_12.1: () = tuple_literal () +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { +// 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: %n.loc15_8.1: () = param n -// CHECK:STDOUT: @Foo.%n: () = bind_name n, %n.loc15_8.1 -// CHECK:STDOUT: %.loc15_20: () = tuple_literal () -// CHECK:STDOUT: %.loc15_24: () = tuple_literal () -// CHECK:STDOUT: %.loc15_25.1: ((), ()) = tuple_literal (%.loc15_20, %.loc15_24) +// CHECK:STDOUT: %n.loc15_8.1: %.1 = param n +// CHECK:STDOUT: @Foo.%n: %.1 = bind_name n, %n.loc15_8.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: @Foo.%return: ref ((), ()) = var +// CHECK:STDOUT: @Foo.%return: ref %.2 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%n: ()) -> %return: ((), ()) { +// CHECK:STDOUT: fn @Foo(%n: %.1) -> %return: %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: () = name_ref n, %n -// CHECK:STDOUT: %.loc16_15.1: () = tuple_literal () -// CHECK:STDOUT: %.loc16_16.1: ((), ()) = tuple_literal (%n.ref, %.loc16_15.1) -// CHECK:STDOUT: %.loc16_16.2: ref () = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_11: init () = tuple_init () to %.loc16_16.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.3: init () = converted %n.ref, %.loc16_11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.4: ref () = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_15.2: init () = tuple_init () to %.loc16_16.4 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.5: init () = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.6: init ((), ()) = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc16_17: init ((), ()) = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple.2] +// 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: 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 52fa2380195c..ff1b5f315ca7 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon @@ -29,11 +29,11 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,50 +42,50 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { -// CHECK:STDOUT: %.loc15_10.1: () = tuple_literal () +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { +// 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: %n.loc15_6.1: () = param n -// CHECK:STDOUT: @A.%n: () = bind_name n, %n.loc15_6.1 -// CHECK:STDOUT: %.loc15_17.1: () = tuple_literal () +// CHECK:STDOUT: %n.loc15_6.1: %.1 = param n +// CHECK:STDOUT: @A.%n: %.1 = bind_name n, %n.loc15_6.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: @A.%return: ref () = var +// CHECK:STDOUT: @A.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %.loc19_12.1: () = tuple_literal () +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { +// 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: %n.loc19_6.1: () = param n -// CHECK:STDOUT: @B.%n: () = bind_name n, %n.loc19_6.1 -// CHECK:STDOUT: %.loc19_19.1: () = tuple_literal () +// CHECK:STDOUT: %n.loc19_6.1: %.1 = param n +// CHECK:STDOUT: @B.%n: %.1 = bind_name n, %n.loc19_6.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: @B.%return: ref () = var +// CHECK:STDOUT: @B.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { -// CHECK:STDOUT: %.loc23_13.1: () = tuple_literal () +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { +// 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: %if.loc23_6.1: () = param r#if -// CHECK:STDOUT: @C.%if: () = bind_name r#if, %if.loc23_6.1 -// CHECK:STDOUT: %.loc23_20.1: () = tuple_literal () +// CHECK:STDOUT: %if.loc23_6.1: %.1 = param r#if +// CHECK:STDOUT: @C.%if: %.1 = bind_name r#if, %if.loc23_6.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: @C.%return: ref () = var +// CHECK:STDOUT: @C.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @A(%n: ()) -> () { +// CHECK:STDOUT: fn @A(%n: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: () = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.1 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%n: ()) -> () { +// CHECK:STDOUT: fn @B(%n: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: () = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.1 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%if: ()) -> () { +// CHECK:STDOUT: fn @C(%if: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %if.ref: () = name_ref r#if, %if +// CHECK:STDOUT: %if.ref: %.1 = 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 58d8d3fab44b..f48e2efcfec0 100644 --- a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon @@ -20,46 +20,46 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type ((), ()) [template] +// CHECK:STDOUT: %.2: type = tuple_type (%.1, %.1) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type ((), ()) [template] -// CHECK:STDOUT: %tuple.1: () = tuple_value () [template] -// CHECK:STDOUT: %tuple.2: ((), ()) = tuple_value (%tuple.1, %tuple.1) [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { -// CHECK:STDOUT: %.loc15_12.1: () = tuple_literal () +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { +// 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: %n.loc15_8.1: () = param n -// CHECK:STDOUT: @Foo.%n: () = bind_name n, %n.loc15_8.1 -// CHECK:STDOUT: %.loc15_20: () = tuple_literal () -// CHECK:STDOUT: %.loc15_24: () = tuple_literal () -// CHECK:STDOUT: %.loc15_25.1: ((), ()) = tuple_literal (%.loc15_20, %.loc15_24) +// CHECK:STDOUT: %n.loc15_8.1: %.1 = param n +// CHECK:STDOUT: @Foo.%n: %.1 = bind_name n, %n.loc15_8.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: @Foo.%return: ref ((), ()) = var +// CHECK:STDOUT: @Foo.%return: ref %.2 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%n: ()) -> %return: ((), ()) { +// CHECK:STDOUT: fn @Foo(%n: %.1) -> %return: %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: () = name_ref n, %n -// CHECK:STDOUT: %.loc16_15.1: () = tuple_literal () -// CHECK:STDOUT: %.loc16_16.1: ((), ()) = tuple_literal (%n.ref, %.loc16_15.1) -// CHECK:STDOUT: %.loc16_16.2: ref () = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_11: init () = tuple_init () to %.loc16_16.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.3: init () = converted %n.ref, %.loc16_11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.4: ref () = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_15.2: init () = tuple_init () to %.loc16_16.4 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.5: init () = converted %.loc16_15.1, %.loc16_15.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc16_16.6: init ((), ()) = tuple_init (%.loc16_16.3, %.loc16_16.5) to %return [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc16_17: init ((), ()) = converted %.loc16_16.1, %.loc16_16.6 [template = constants.%tuple.2] +// 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: 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 ddc3d6be7111..e30776e99dfa 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -34,12 +34,12 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 6] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 8 [template] // CHECK:STDOUT: %.6: i32 = int_literal 9 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2147483647 [template] @@ -50,12 +50,12 @@ fn F() { // CHECK:STDOUT: %.12: i32 = int_literal 3 [template] // CHECK:STDOUT: %.13: i32 = int_literal 4 [template] // CHECK:STDOUT: %.14: i32 = int_literal 5 [template] -// CHECK:STDOUT: %array.1: [i32; 6] = tuple_value (%.5, %.6, %.5, %.5, %.7, %.7) [template] +// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.5, %.6, %.5, %.5, %.7, %.7) [template] // CHECK:STDOUT: %.15: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.16: type = array_type %.2, f64 [template] -// CHECK:STDOUT: %.17: type = ptr_type [f64; 6] [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] @@ -63,7 +63,7 @@ fn F() { // 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: [f64; 6] = tuple_value (%.18, %.19, %.20, %.21, %.22, %.23) [template] +// CHECK:STDOUT: %array.2: %.16 = tuple_value (%.18, %.19, %.20, %.21, %.22, %.23) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,9 +72,9 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -84,15 +84,15 @@ fn F() { // 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 [i32; 6] = var ints -// CHECK:STDOUT: %ints: ref [i32; 6] = bind_name ints, %ints.var +// CHECK:STDOUT: %ints.var: ref %.3 = var ints +// CHECK:STDOUT: %ints: ref %.3 = bind_name ints, %ints.var // CHECK:STDOUT: %.loc15: i32 = int_literal 8 [template = constants.%.5] // CHECK:STDOUT: %.loc16: i32 = int_literal 9 [template = constants.%.6] // CHECK:STDOUT: %.loc17: i32 = int_literal 8 [template = constants.%.5] // CHECK:STDOUT: %.loc18: i32 = int_literal 8 [template = constants.%.5] // CHECK:STDOUT: %.loc19: i32 = int_literal 2147483647 [template = constants.%.7] // CHECK:STDOUT: %.loc20: i32 = int_literal 2147483647 [template = constants.%.7] -// CHECK:STDOUT: %.loc21_3.1: (i32, i32, i32, i32, i32, i32) = tuple_literal (%.loc15, %.loc16, %.loc17, %.loc18, %.loc19, %.loc20) +// CHECK:STDOUT: %.loc21_3.1: %.8 = tuple_literal (%.loc15, %.loc16, %.loc17, %.loc18, %.loc19, %.loc20) // CHECK:STDOUT: %.loc21_3.2: i32 = int_literal 0 [template = constants.%.9] // 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] @@ -111,8 +111,8 @@ fn F() { // CHECK:STDOUT: %.loc21_3.17: i32 = int_literal 5 [template = constants.%.14] // 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 [i32; 6] = 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 [i32; 6] = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] +// 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: assign %ints.var, %.loc21_4 // CHECK:STDOUT: %.loc22_16.1: i32 = int_literal 64 [template = constants.%.15] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc22_16.1) [template = f64] @@ -120,15 +120,15 @@ fn F() { // 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 [f64; 6] = var floats -// CHECK:STDOUT: %floats: ref [f64; 6] = bind_name floats, %floats.var +// 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: (f64, f64, f64, f64, f64, f64) = tuple_literal (%.loc23, %.loc24, %.loc25, %.loc26, %.loc27, %.loc28) +// CHECK:STDOUT: %.loc29_3.1: %.24 = tuple_literal (%.loc23, %.loc24, %.loc25, %.loc26, %.loc27, %.loc28) // CHECK:STDOUT: %.loc29_3.2: i32 = int_literal 0 [template = constants.%.9] // 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] @@ -147,8 +147,8 @@ fn F() { // CHECK:STDOUT: %.loc29_3.17: i32 = int_literal 5 [template = constants.%.14] // 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 [f64; 6] = 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 [f64; 6] = converted %.loc29_3.1, %.loc29_3.20 [template = constants.%array.2] +// 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: 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 e644a30cf679..01832bc70b07 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -16,7 +16,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -28,13 +28,13 @@ var b: i32 = ((2)); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] diff --git a/toolchain/check/testdata/basics/run.carbon b/toolchain/check/testdata/basics/run.carbon index 220ece3e86ea..96043cc92c74 100644 --- a/toolchain/check/testdata/basics/run.carbon +++ b/toolchain/check/testdata/basics/run.carbon @@ -15,7 +15,7 @@ fn Run() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -24,7 +24,7 @@ fn Run() {} // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index 9a32c9df08a6..e02d9d7d6d0b 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -15,9 +15,9 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -27,8 +27,8 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32, %.loc11_13.1 [template = i32] diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index d66d69512b81..9e5af79768db 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -117,7 +117,7 @@ var test_f128: f128; // CHECK:STDOUT: %.1: i32 = int_literal 8 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 16 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] @@ -134,26 +134,26 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 8 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // 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 i8 = var test_i8 -// CHECK:STDOUT: %test_i8: ref i8 = bind_name test_i8, %test_i8.var +// 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: i32 = int_literal 16 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // 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 i16 = var test_i16 -// CHECK:STDOUT: %test_i16: ref i16 = bind_name test_i16, %test_i16.var +// 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: i32 = int_literal 64 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.3: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // 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 i64 = var test_i64 -// CHECK:STDOUT: %test_i64: ref i64 = bind_name test_i64, %test_i64.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%size: i32) -> type = "int.make_type_signed"; @@ -164,7 +164,7 @@ var test_f128: f128; // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 15 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] @@ -185,27 +185,27 @@ var test_f128: f128; // CHECK:STDOUT: %test_i0.var: ref = var test_i0 // CHECK:STDOUT: %test_i0: ref = bind_name test_i0, %test_i0.var // CHECK:STDOUT: %.loc12_14.1: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.3: type = converted %int.make_type_signed.loc12, %.loc12_14.2 [template = constants.%.3] -// CHECK:STDOUT: %test_i1.var: ref i1 = var test_i1 -// CHECK:STDOUT: %test_i1: ref i1 = bind_name test_i1, %test_i1.var +// CHECK:STDOUT: %test_i1.var: ref %.3 = var test_i1 +// CHECK:STDOUT: %test_i1: ref %.3 = bind_name test_i1, %test_i1.var // CHECK:STDOUT: %.loc17_15.1: i32 = int_literal 15 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.3: type = converted %int.make_type_signed.loc17, %.loc17_15.2 [template = constants.%.5] -// CHECK:STDOUT: %test_i15.var: ref i15 = var test_i15 -// CHECK:STDOUT: %test_i15: ref i15 = bind_name test_i15, %test_i15.var +// CHECK:STDOUT: %test_i15.var: ref %.5 = var test_i15 +// CHECK:STDOUT: %test_i15: ref %.5 = bind_name test_i15, %test_i15.var // CHECK:STDOUT: %.loc22_23.1: i32 = int_literal 1000000000 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.3: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_23.1) [template = ] // CHECK:STDOUT: %.loc22_23.2: type = value_of_initializer %int.make_type_signed.loc22 [template = ] // CHECK:STDOUT: %.loc22_23.3: type = converted %int.make_type_signed.loc22, %.loc22_23.2 [template = ] // CHECK:STDOUT: %test_i1000000000.var: ref = var test_i1000000000 // CHECK:STDOUT: %test_i1000000000: ref = bind_name test_i1000000000, %test_i1000000000.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.4: %Int.type = import_ref ir3, inst+13, loaded [template = constants.%Int] // CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int() [template = ] // CHECK:STDOUT: %.loc28_33.1: type = value_of_initializer %int.make_type_signed.loc28 [template = ] // CHECK:STDOUT: %.loc28_33.2: type = converted %int.make_type_signed.loc28, %.loc28_33.1 [template = ] @@ -221,7 +221,7 @@ var test_f128: f128; // CHECK:STDOUT: %.1: i32 = int_literal 8 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 16 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] @@ -238,26 +238,26 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 8 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.1: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // 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 u8 = var test_u8 -// CHECK:STDOUT: %test_u8: ref u8 = bind_name test_u8, %test_u8.var +// 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: i32 = int_literal 16 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.2: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // 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 u16 = var test_u16 -// CHECK:STDOUT: %test_u16: ref u16 = bind_name test_u16, %test_u16.var +// 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: i32 = int_literal 64 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.3: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // 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 u64 = var test_u64 -// CHECK:STDOUT: %test_u64: ref u64 = bind_name test_u64, %test_u64.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UInt(%size: i32) -> type = "int.make_type_unsigned"; @@ -268,7 +268,7 @@ var test_f128: f128; // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 15 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] @@ -289,27 +289,27 @@ var test_f128: f128; // CHECK:STDOUT: %test_u0.var: ref = var test_u0 // CHECK:STDOUT: %test_u0: ref = bind_name test_u0, %test_u0.var // CHECK:STDOUT: %.loc12_14.1: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.1: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // CHECK:STDOUT: %int.make_type_unsigned.loc12: init type = call constants.%UInt(%.loc12_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.2: type = value_of_initializer %int.make_type_unsigned.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.3: type = converted %int.make_type_unsigned.loc12, %.loc12_14.2 [template = constants.%.3] -// CHECK:STDOUT: %test_u1.var: ref u1 = var test_u1 -// CHECK:STDOUT: %test_u1: ref u1 = bind_name test_u1, %test_u1.var +// CHECK:STDOUT: %test_u1.var: ref %.3 = var test_u1 +// CHECK:STDOUT: %test_u1: ref %.3 = bind_name test_u1, %test_u1.var // CHECK:STDOUT: %.loc17_15.1: i32 = int_literal 15 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.2: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // CHECK:STDOUT: %int.make_type_unsigned.loc17: init type = call constants.%UInt(%.loc17_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.2: type = value_of_initializer %int.make_type_unsigned.loc17 [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.3: type = converted %int.make_type_unsigned.loc17, %.loc17_15.2 [template = constants.%.5] -// CHECK:STDOUT: %test_u15.var: ref u15 = var test_u15 -// CHECK:STDOUT: %test_u15: ref u15 = bind_name test_u15, %test_u15.var +// CHECK:STDOUT: %test_u15.var: ref %.5 = var test_u15 +// CHECK:STDOUT: %test_u15: ref %.5 = bind_name test_u15, %test_u15.var // CHECK:STDOUT: %.loc22_23.1: i32 = int_literal 1000000000 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.3: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // CHECK:STDOUT: %int.make_type_unsigned.loc22: init type = call constants.%UInt(%.loc22_23.1) [template = ] // CHECK:STDOUT: %.loc22_23.2: type = value_of_initializer %int.make_type_unsigned.loc22 [template = ] // CHECK:STDOUT: %.loc22_23.3: type = converted %int.make_type_unsigned.loc22, %.loc22_23.2 [template = ] // CHECK:STDOUT: %test_u1000000000.var: ref = var test_u1000000000 // CHECK:STDOUT: %test_u1000000000: ref = bind_name test_u1000000000, %test_u1000000000.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.4: %UInt.type = import_ref ir3, inst+22, loaded [template = constants.%UInt] // CHECK:STDOUT: %int.make_type_unsigned.loc28: init type = call constants.%UInt() [template = ] // CHECK:STDOUT: %.loc28_33.1: type = value_of_initializer %int.make_type_unsigned.loc28 [template = ] // CHECK:STDOUT: %.loc28_33.2: type = converted %int.make_type_unsigned.loc28, %.loc28_33.1 [template = ] diff --git a/toolchain/check/testdata/builtins/bool/make_type.carbon b/toolchain/check/testdata/builtins/bool/make_type.carbon index 789701e5ae69..10810d684cc8 100644 --- a/toolchain/check/testdata/builtins/bool/make_type.carbon +++ b/toolchain/check/testdata/builtins/bool/make_type.carbon @@ -27,7 +27,7 @@ var b: Bool() = false; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,7 +36,7 @@ var b: Bool() = false; // CHECK:STDOUT: .Bool = %Bool.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bool.decl: = fn_decl @Bool [template = constants.%Bool] { +// CHECK:STDOUT: %Bool.decl: %Bool.type = fn_decl @Bool [template = constants.%Bool] { // CHECK:STDOUT: @Bool.%return: ref type = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -48,7 +48,7 @@ var b: Bool() = false; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,9 +58,9 @@ var b: Bool() = false; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+3, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir1, inst+3, loaded [template = constants.%Bool] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bool.ref: = name_ref Bool, %import_ref [template = constants.%Bool] +// CHECK:STDOUT: %Bool.ref: %Bool.type = name_ref Bool, %import_ref [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type: init type = call %Bool.ref() [template = bool] // CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 06eed1348a54..22266754b2b6 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -56,11 +56,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [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] @@ -74,10 +74,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] @@ -96,10 +96,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Add.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] @@ -119,7 +119,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] @@ -133,7 +133,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%a.ref, %b.ref) @@ -144,7 +144,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] +// 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] @@ -158,23 +158,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,9 +189,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] @@ -204,11 +204,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] @@ -233,10 +233,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] @@ -254,10 +254,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.10: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] @@ -276,9 +276,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.13: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] @@ -291,11 +291,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.15: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] @@ -320,10 +320,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.19: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] @@ -357,7 +357,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -367,7 +367,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -379,7 +379,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index e27433be9b0d..aae4ee62d1e3 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -58,11 +58,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [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] @@ -80,10 +80,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .a = %a.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] @@ -102,10 +102,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Div.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] @@ -125,18 +125,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] // CHECK:STDOUT: %a.var: ref f64 = var a // CHECK:STDOUT: %a.loc8: ref f64 = bind_name a, %a.var // CHECK:STDOUT: %.loc9_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc9: init type = call constants.%Float(%.loc9_8.1) [template = f64] // CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %float.make_type.loc9 [template = f64] // CHECK:STDOUT: %.loc9_8.3: type = converted %float.make_type.loc9, %.loc9_8.2 [template = f64] -// CHECK:STDOUT: %Div.ref.loc9: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, %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] @@ -144,11 +144,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_27.2: f64 = converted %float.div.loc9, %.loc9_27.1 [template = constants.%.8] // CHECK:STDOUT: %b.loc9: f64 = bind_name b, %.loc9_27.2 // CHECK:STDOUT: %.loc10_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc10: init type = call constants.%Float(%.loc10_8.1) [template = f64] // CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %float.make_type.loc10 [template = f64] // CHECK:STDOUT: %.loc10_8.3: type = converted %float.make_type.loc10, %.loc10_8.2 [template = f64] -// CHECK:STDOUT: %Div.ref.loc10: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, %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] @@ -163,7 +163,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.div: init f64 = call %Div.ref(%a.ref, %b.ref) @@ -174,7 +174,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %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: init f64 = call %Div.ref(%.loc8_18, %.loc8_24) [template = constants.%.5] @@ -188,23 +188,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -219,9 +219,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] @@ -234,11 +234,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] @@ -263,10 +263,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] @@ -284,10 +284,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.10: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] @@ -306,9 +306,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.13: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] @@ -321,11 +321,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.15: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] @@ -350,10 +350,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.19: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] @@ -387,7 +387,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -397,7 +397,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -409,7 +409,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index 4287229659f6..8e3a357e2a51 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -39,23 +39,23 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] -// CHECK:STDOUT: %Eq: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,10 +68,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Eq.decl: = fn_decl @Eq [template = constants.%Eq] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Eq.decl: %Eq.type = fn_decl @Eq [template = constants.%Eq] { // CHECK:STDOUT: %.loc2_10.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%.loc2_10.1) [template = f64] // CHECK:STDOUT: %.loc2_10.2: type = value_of_initializer %float.make_type.loc2_10 [template = f64] @@ -91,18 +91,18 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc12_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] @@ -138,10 +138,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Eq(%a: f64, %b: f64) -> bool = "float.eq"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Eq.ref.loc8: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// 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.%.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] @@ -159,8 +159,8 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc8: // 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: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// 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.%.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] @@ -183,7 +183,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Eq.ref: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// CHECK:STDOUT: %Eq.ref: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.eq: init bool = call %Eq.ref(%a.ref, %b.ref) @@ -198,9 +198,9 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] -// CHECK:STDOUT: %WrongResult: = struct_value () [template] +// CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -209,10 +209,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: .WrongResult = %WrongResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %WrongResult.decl: = fn_decl @WrongResult [template = constants.%WrongResult] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %WrongResult.decl: %WrongResult.type = fn_decl @WrongResult [template = constants.%WrongResult] { // CHECK:STDOUT: %.loc7_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 5e81fb57dd2d..e0d50e9be149 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -34,19 +34,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] -// CHECK:STDOUT: %Greater: = struct_value () [template] +// CHECK:STDOUT: %Greater: %Greater.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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] @@ -54,7 +54,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // 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: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,10 +68,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Greater.decl: = fn_decl @Greater [template = constants.%Greater] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Greater.decl: %Greater.type = fn_decl @Greater [template = constants.%Greater] { // CHECK:STDOUT: %.loc2_15.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%.loc2_15.1) [template = f64] // CHECK:STDOUT: %.loc2_15.2: type = value_of_initializer %float.make_type.loc2_15 [template = f64] @@ -89,9 +89,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type.loc2, %.loc2_31.1 [template = bool] // CHECK:STDOUT: @Greater.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] @@ -106,18 +106,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] @@ -155,10 +155,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: f64) -> f64 = "float.negate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc9: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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.%.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] @@ -176,8 +176,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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.%.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] @@ -195,8 +195,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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.%.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] @@ -214,9 +214,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] -// CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc12: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.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] @@ -237,10 +237,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] // CHECK:STDOUT: %.loc13_23.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Greater.ref: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// CHECK:STDOUT: %Greater.ref: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.greater: init bool = call %Greater.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index d46375c7d51c..71bc45fb6e34 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -34,19 +34,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %GreaterEq.type: type = fn_type @GreaterEq [template] -// CHECK:STDOUT: %GreaterEq: = struct_value () [template] +// CHECK:STDOUT: %GreaterEq: %GreaterEq.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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] @@ -54,7 +54,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // 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: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,10 +68,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %GreaterEq.decl: = fn_decl @GreaterEq [template = constants.%GreaterEq] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %GreaterEq.decl: %GreaterEq.type = fn_decl @GreaterEq [template = constants.%GreaterEq] { // CHECK:STDOUT: %.loc2_17.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%.loc2_17.1) [template = f64] // CHECK:STDOUT: %.loc2_17.2: type = value_of_initializer %float.make_type.loc2_17 [template = f64] @@ -89,9 +89,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type.loc2, %.loc2_33.1 [template = bool] // CHECK:STDOUT: @GreaterEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] @@ -106,18 +106,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] @@ -155,10 +155,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: f64) -> f64 = "float.negate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc9: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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.%.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] @@ -176,8 +176,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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.%.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] @@ -195,8 +195,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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.%.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] @@ -214,9 +214,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] -// CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc12: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.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] @@ -237,10 +237,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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.%.9] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_38) [template = constants.%.10] // CHECK:STDOUT: %.loc13_25.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %GreaterEq.ref: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// CHECK:STDOUT: %GreaterEq.ref: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.greater_eq: init bool = call %GreaterEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index 65adea7f27ec..1bcb489f654c 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -34,19 +34,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] -// CHECK:STDOUT: %Less: = struct_value () [template] +// CHECK:STDOUT: %Less: %Less.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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] @@ -54,7 +54,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // 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: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,10 +68,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Less.decl: = fn_decl @Less [template = constants.%Less] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Less.decl: %Less.type = fn_decl @Less [template = constants.%Less] { // CHECK:STDOUT: %.loc2_12.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%.loc2_12.1) [template = f64] // CHECK:STDOUT: %.loc2_12.2: type = value_of_initializer %float.make_type.loc2_12 [template = f64] @@ -89,9 +89,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type.loc2, %.loc2_28.1 [template = bool] // CHECK:STDOUT: @Less.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] @@ -106,18 +106,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] @@ -155,10 +155,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: f64) -> f64 = "float.negate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc9: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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.%.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] @@ -176,8 +176,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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.%.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] @@ -195,8 +195,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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.%.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] @@ -214,9 +214,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] -// CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc12: = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.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] @@ -237,10 +237,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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.%.9] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.10] // CHECK:STDOUT: %.loc13_21.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Less.ref: = name_ref Less, file.%Less.decl [template = constants.%Less] +// CHECK:STDOUT: %Less.ref: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.less: init bool = call %Less.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index d373448ed2c2..c248dca5e75d 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -34,19 +34,19 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %LessEq.type: type = fn_type @LessEq [template] -// CHECK:STDOUT: %LessEq: = struct_value () [template] +// CHECK:STDOUT: %LessEq: %LessEq.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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] @@ -54,7 +54,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // 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: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,10 +68,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %LessEq.decl: = fn_decl @LessEq [template = constants.%LessEq] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %LessEq.decl: %LessEq.type = fn_decl @LessEq [template = constants.%LessEq] { // CHECK:STDOUT: %.loc2_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] @@ -89,9 +89,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type.loc2, %.loc2_30.1 [template = bool] // CHECK:STDOUT: @LessEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] @@ -106,18 +106,18 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] @@ -155,10 +155,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: f64) -> f64 = "float.negate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc9: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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.%.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] @@ -176,8 +176,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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.%.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] @@ -195,8 +195,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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.%.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] @@ -214,9 +214,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] -// CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc12: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.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] @@ -237,10 +237,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] // CHECK:STDOUT: %.loc13_23.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LessEq.ref: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// CHECK:STDOUT: %LessEq.ref: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.less_eq: init bool = call %LessEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 935a29a6314e..8a519ef22806 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -49,9 +49,9 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,8 +60,8 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: .Float = %Float.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Float.decl: = fn_decl @Float [template = constants.%Float] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Float.decl: %Float.type = fn_decl @Float [template = constants.%Float] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_32, %.loc4_16.1 [template = i32] @@ -80,13 +80,13 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %.3: f64 = float_literal 0 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] -// CHECK:STDOUT: %GetFloat: = struct_value () [template] +// CHECK:STDOUT: %GetFloat: %GetFloat.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,17 +96,17 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: .f = %f // CHECK:STDOUT: .GetFloat = %GetFloat.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir1, inst+14, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Float.ref: = name_ref Float, %import_ref.1 [template = constants.%Float] +// CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, %import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %.loc6_14: i32 = int_literal 64 [template = constants.%.2] // 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] // CHECK:STDOUT: %f.var: ref f64 = var f // CHECK:STDOUT: %f: ref f64 = bind_name f, %f.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %GetFloat.decl: = fn_decl @GetFloat [template = constants.%GetFloat] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %GetFloat.decl: %GetFloat.type = fn_decl @GetFloat [template = constants.%GetFloat] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_23.2: type = converted %int.make_type_32, %.loc8_23.1 [template = i32] @@ -122,7 +122,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @GetFloat(%dyn_size: i32) -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Float.ref: = name_ref Float, file.%import_ref.1 [template = constants.%Float] +// CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, file.%import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %dyn_size.ref: i32 = name_ref dyn_size, %dyn_size // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%dyn_size.ref) // CHECK:STDOUT: %.loc9_25.1: type = value_of_initializer %float.make_type @@ -142,10 +142,10 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 32 [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -157,22 +157,22 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: .dyn_size = %dyn_size // CHECK:STDOUT: .dyn = %dyn // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir1, inst+14, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Float.ref.loc10: = name_ref Float, %import_ref.1 [template = constants.%Float] +// CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, %import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 32 [template = constants.%.2] // 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 = ] // CHECK:STDOUT: %invalid_float.var: ref = var invalid_float // CHECK:STDOUT: %invalid_float: ref = bind_name invalid_float, %invalid_float.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_32, %.loc12_15.1 [template = i32] // CHECK:STDOUT: %dyn_size.var: ref i32 = var dyn_size // CHECK:STDOUT: %dyn_size: ref i32 = bind_name dyn_size, %dyn_size.var -// CHECK:STDOUT: %Float.ref.loc16: = name_ref Float, %import_ref.1 [template = constants.%Float] +// CHECK:STDOUT: %Float.ref.loc16: %Float.type = name_ref Float, %import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %dyn_size.ref: ref i32 = name_ref dyn_size, %dyn_size // CHECK:STDOUT: %.loc16_16: i32 = bind_value %dyn_size.ref // CHECK:STDOUT: %float.make_type.loc16: init type = call %Float.ref.loc16(%.loc16_16) diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index f014b47ee4bd..2fba7ab4d466 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -56,11 +56,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: = struct_value () [template] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [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] @@ -74,10 +74,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] @@ -96,10 +96,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Mul.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] @@ -119,7 +119,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] @@ -133,7 +133,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%a.ref, %b.ref) @@ -144,7 +144,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// 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] @@ -158,23 +158,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,9 +189,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] @@ -204,11 +204,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] @@ -233,10 +233,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] @@ -254,10 +254,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.10: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] @@ -276,9 +276,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.13: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] @@ -291,11 +291,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.15: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] @@ -320,10 +320,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.19: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] @@ -357,7 +357,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -367,7 +367,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -379,7 +379,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index fef69a1bdc83..ba60d316e9b2 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -77,11 +77,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [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: } @@ -93,9 +93,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc2_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] @@ -108,10 +108,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] // CHECK:STDOUT: @Negate.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] @@ -131,11 +131,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %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] @@ -149,7 +149,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc5_19.1: f64 = value_of_initializer %float.negate @@ -163,23 +163,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -194,18 +194,18 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_16.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_16.1) [template = f64] // CHECK:STDOUT: %.loc8_16.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_16.3: type = converted %float.make_type.loc8, %.loc8_16.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] @@ -224,9 +224,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc18_21.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18: init type = call constants.%Float(%.loc18_21.1) [template = f64] // CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %float.make_type.loc18 [template = f64] @@ -238,9 +238,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type.loc18, %.loc18_29.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc19_17.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%.loc19_17.1) [template = f64] // CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %float.make_type.loc19_17 [template = f64] @@ -253,9 +253,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc19_25.3: type = converted %float.make_type.loc19_25, %.loc19_25.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.9: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.10: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc21_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%.loc21_25.1) [template = f64] // CHECK:STDOUT: %.loc21_25.2: type = value_of_initializer %float.make_type.loc21_25 [template = f64] @@ -268,11 +268,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc21_33.3: type = converted %float.make_type.loc21_33, %.loc21_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.11: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.13: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc32_26.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%.loc32_26.1) [template = f64] // CHECK:STDOUT: %.loc32_26.2: type = value_of_initializer %float.make_type.loc32_26 [template = f64] @@ -297,10 +297,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc32_50.3: type = converted %float.make_type.loc32_50, %.loc32_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.17: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.15: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc43_32.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%.loc43_32.1) [template = f64] // CHECK:STDOUT: %.loc43_32.2: type = value_of_initializer %float.make_type.loc43_32 [template = f64] @@ -334,7 +334,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref() [template = ] // CHECK:STDOUT: %.loc29_19.1: f64 = value_of_initializer %TooFew.call [template = ] @@ -344,7 +344,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -356,7 +356,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 1ec6cd16f254..12aa70cfede4 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -39,23 +39,23 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] -// CHECK:STDOUT: %Neq: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,10 +68,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Neq.decl: = fn_decl @Neq [template = constants.%Neq] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Neq.decl: %Neq.type = fn_decl @Neq [template = constants.%Neq] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] @@ -91,18 +91,18 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc12_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] @@ -138,10 +138,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Neq(%a: f64, %b: f64) -> bool = "float.neq"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Neq.ref.loc8: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] +// 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.%.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] @@ -159,8 +159,8 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc8: // 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: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] +// 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.%.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] @@ -183,7 +183,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Neq.ref: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] +// CHECK:STDOUT: %Neq.ref: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.neq: init bool = call %Neq.ref(%a.ref, %b.ref) @@ -198,9 +198,9 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] -// CHECK:STDOUT: %WrongResult: = struct_value () [template] +// CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -209,10 +209,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: .WrongResult = %WrongResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %WrongResult.decl: = fn_decl @WrongResult [template = constants.%WrongResult] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %WrongResult.decl: %WrongResult.type = fn_decl @WrongResult [template = constants.%WrongResult] { // CHECK:STDOUT: %.loc7_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index ae876c8d59a4..3a7523d5e1ef 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -56,11 +56,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [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] @@ -74,10 +74,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] @@ -96,10 +96,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Sub.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] @@ -119,7 +119,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] @@ -133,7 +133,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%a.ref, %b.ref) @@ -144,7 +144,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// 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] @@ -158,23 +158,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,9 +189,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] @@ -204,11 +204,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] @@ -233,10 +233,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] @@ -254,10 +254,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.10: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] @@ -276,9 +276,9 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.13: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] @@ -291,11 +291,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.15: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] @@ -320,10 +320,10 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.19: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] @@ -357,7 +357,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -367,7 +367,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -379,7 +379,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index 3422f2fad451..bdbe2dc124a4 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -24,16 +24,16 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] -// CHECK:STDOUT: %And: = struct_value () [template] +// CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 10 [template] // CHECK:STDOUT: %.4: i32 = int_literal 8 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 8] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,10 +44,10 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %And.decl: = fn_decl @And [template = constants.%And] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [template = constants.%And] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -63,31 +63,31 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @And.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %And.ref: = name_ref And, %And.decl [template = constants.%And] +// CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24: i32 = int_literal 10 [template = constants.%.3] // CHECK:STDOUT: %int.and: init i32 = call %And.ref(%.loc4_20, %.loc4_24) [template = constants.%.4] // 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 [i32; 8] = var arr -// CHECK:STDOUT: %arr: ref [i32; 8] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 8 [template = constants.%.4] // 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 [i32; 8] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 8] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 8]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 8]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -111,7 +111,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %And.ref: = name_ref And, file.%And.decl [template = constants.%And] +// CHECK:STDOUT: %And.ref: %And.type = name_ref And, file.%And.decl [template = constants.%And] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.and: init i32 = call %And.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 8ca0e26980f4..296422246244 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -25,19 +25,19 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Complement.type: type = fn_type @Complement [template] -// CHECK:STDOUT: %Complement: = struct_value () [template] +// CHECK:STDOUT: %Complement: %Complement.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] -// CHECK:STDOUT: %And: = struct_value () [template] +// CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1193046 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1193047 [template] // CHECK:STDOUT: %.4: i32 = int_literal 16777215 [template] // CHECK:STDOUT: %.5: i32 = int_literal 15584169 [template] // CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] -// CHECK:STDOUT: %.7: type = ptr_type [i32; 15584169] [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,9 +49,9 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Complement.decl: = fn_decl @Complement [template = constants.%Complement] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Complement.decl: %Complement.type = fn_decl @Complement [template = constants.%Complement] { // CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] @@ -62,10 +62,10 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_32.loc2_26, %.loc2_26.1 [template = i32] // CHECK:STDOUT: @Complement.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %And.decl: = fn_decl @And [template = constants.%And] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [template = constants.%And] { // CHECK:STDOUT: %int.make_type_32.loc3_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_11.1: type = value_of_initializer %int.make_type_32.loc3_11 [template = i32] // CHECK:STDOUT: %.loc3_11.2: type = converted %int.make_type_32.loc3_11, %.loc3_11.1 [template = i32] @@ -81,10 +81,10 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %.loc3_27.2: type = converted %int.make_type_32.loc3_27, %.loc3_27.1 [template = i32] // CHECK:STDOUT: @And.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %And.ref: = name_ref And, %And.decl [template = constants.%And] -// CHECK:STDOUT: %Complement.ref: = name_ref Complement, %Complement.decl [template = constants.%Complement] +// 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_literal 1193046 [template = constants.%.2] // CHECK:STDOUT: %int.complement: init i32 = call %Complement.ref(%.loc5_31) [template = constants.%.3] // CHECK:STDOUT: %.loc5_42: i32 = int_literal 16777215 [template = constants.%.4] @@ -94,21 +94,21 @@ fn RuntimeCall(a: i32) -> i32 { // 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 [i32; 15584169] = var arr -// CHECK:STDOUT: %arr: ref [i32; 15584169] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.6 = var arr +// CHECK:STDOUT: %arr: ref %.6 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 15584169 [template = constants.%.5] // 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 [i32; 15584169] [template = constants.%.7] -// CHECK:STDOUT: %arr.ref: ref [i32; 15584169] = name_ref arr, %arr -// CHECK:STDOUT: %.loc6_31: [i32; 15584169]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 15584169]* = bind_name arr_p, %.loc6_31 -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc6_27: type = ptr_type %.6 [template = constants.%.7] +// CHECK:STDOUT: %arr.ref: ref %.6 = name_ref arr, %arr +// CHECK:STDOUT: %.loc6_31: %.7 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.7 = bind_name arr_p, %.loc6_31 +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc8_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_32.loc8_19 [template = i32] // CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_32.loc8_19, %.loc8_19.1 [template = i32] @@ -129,7 +129,7 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Complement.ref: = name_ref Complement, file.%Complement.decl [template = constants.%Complement] +// CHECK:STDOUT: %Complement.ref: %Complement.type = name_ref Complement, file.%Complement.decl [template = constants.%Complement] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %int.complement: init i32 = call %Complement.ref(%a.ref) // CHECK:STDOUT: %.loc9_23.1: i32 = value_of_initializer %int.complement diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 375e30b65f22..eaf033800d87 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -38,23 +38,23 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] -// CHECK:STDOUT: %Eq: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: bool = bool_literal true [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,10 +67,10 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Eq.decl: = fn_decl @Eq [template = constants.%Eq] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Eq.decl: %Eq.type = fn_decl @Eq [template = constants.%Eq] { // CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_32.loc2_10 [template = i32] // CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_32.loc2_10, %.loc2_10.1 [template = i32] @@ -88,18 +88,18 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] @@ -133,10 +133,10 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Eq(%a: i32, %b: i32) -> bool = "int.eq"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Eq.ref.loc8: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc8_22: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_22) [template = constants.%.5] @@ -154,8 +154,8 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc8: // 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: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_23: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.7] @@ -178,7 +178,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Eq.ref: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// CHECK:STDOUT: %Eq.ref: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.eq: init bool = call %Eq.ref(%a.ref, %b.ref) @@ -192,9 +192,9 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] -// CHECK:STDOUT: %WrongResult: = struct_value () [template] +// CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -203,10 +203,10 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: .WrongResult = %WrongResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %WrongResult.decl: = fn_decl @WrongResult [template = constants.%WrongResult] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %WrongResult.decl: %WrongResult.type = fn_decl @WrongResult [template = constants.%WrongResult] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index e0139b63238a..a7715ff1f2c5 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -33,19 +33,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] -// CHECK:STDOUT: %Greater: = struct_value () [template] +// CHECK:STDOUT: %Greater: %Greater.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: bool = bool_literal false [template] @@ -53,7 +53,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.8: bool = bool_literal true [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,10 +67,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Greater.decl: = fn_decl @Greater [template = constants.%Greater] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Greater.decl: %Greater.type = fn_decl @Greater [template = constants.%Greater] { // CHECK:STDOUT: %int.make_type_32.loc2_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %int.make_type_32.loc2_15 [template = i32] // CHECK:STDOUT: %.loc2_15.2: type = converted %int.make_type_32.loc2_15, %.loc2_15.1 [template = i32] @@ -86,9 +86,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type.loc2, %.loc2_31.1 [template = bool] // CHECK:STDOUT: @Greater.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] @@ -101,18 +101,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] @@ -148,10 +148,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: i32) -> i32 = "int.snegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc9: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_28: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_28) [template = constants.%.6] @@ -169,8 +169,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_28: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_28) [template = constants.%.6] @@ -188,8 +188,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27: i32 = int_literal 0 [template = constants.%.7] // CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.8] @@ -207,9 +207,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] -// CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc12: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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_literal 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_literal 0 [template = constants.%.7] @@ -230,10 +230,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// 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_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.9] // CHECK:STDOUT: %.loc13_23.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Greater.ref: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// CHECK:STDOUT: %Greater.ref: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.greater: init bool = call %Greater.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index 707f69518fe4..6525d7f7e679 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -33,19 +33,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %GreaterEq.type: type = fn_type @GreaterEq [template] -// CHECK:STDOUT: %GreaterEq: = struct_value () [template] +// CHECK:STDOUT: %GreaterEq: %GreaterEq.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: bool = bool_literal false [template] @@ -53,7 +53,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,10 +67,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %GreaterEq.decl: = fn_decl @GreaterEq [template = constants.%GreaterEq] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %GreaterEq.decl: %GreaterEq.type = fn_decl @GreaterEq [template = constants.%GreaterEq] { // CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_32.loc2_17 [template = i32] // CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_32.loc2_17, %.loc2_17.1 [template = i32] @@ -86,9 +86,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type.loc2, %.loc2_33.1 [template = bool] // CHECK:STDOUT: @GreaterEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] @@ -101,18 +101,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] @@ -148,10 +148,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: i32) -> i32 = "int.snegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc9: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_30: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_30) [template = constants.%.6] @@ -169,8 +169,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_29: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_29) [template = constants.%.7] @@ -188,8 +188,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_29: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_29) [template = constants.%.7] @@ -207,9 +207,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] -// CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc12: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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_literal 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_literal 0 [template = constants.%.8] @@ -230,10 +230,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// 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_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.9] // CHECK:STDOUT: %.loc13_25.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %GreaterEq.ref: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// CHECK:STDOUT: %GreaterEq.ref: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.greater_eq: init bool = call %GreaterEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index 716f5af47a4d..1effcee956c9 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -68,16 +68,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] -// CHECK:STDOUT: %LeftShift: = struct_value () [template] +// CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 20 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 20] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -88,10 +88,10 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %LeftShift.decl: = fn_decl @LeftShift [template = constants.%LeftShift] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %LeftShift.decl: %LeftShift.type = fn_decl @LeftShift [template = constants.%LeftShift] { // CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_32.loc2_17 [template = i32] // CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_32.loc2_17, %.loc2_17.1 [template = i32] @@ -107,31 +107,31 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc2_33.2: type = converted %int.make_type_32.loc2_33, %.loc2_33.1 [template = i32] // CHECK:STDOUT: @LeftShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %LeftShift.ref: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc4_26: i32 = int_literal 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_29: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.left_shift: init i32 = call %LeftShift.ref(%.loc4_26, %.loc4_29) [template = constants.%.4] // 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 [i32; 20] = var arr -// CHECK:STDOUT: %arr: ref [i32; 20] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 20 [template = constants.%.4] // 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 [i32; 20] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 20] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_25: [i32; 20]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 20]* = bind_name arr_p, %.loc5_25 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_21: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_25: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_25 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -155,7 +155,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LeftShift.ref: = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.left_shift: init i32 = call %LeftShift.ref(%a.ref, %b.ref) @@ -169,11 +169,11 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] -// CHECK:STDOUT: %LeftShift: = struct_value () [template] +// CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 31 [template] // CHECK:STDOUT: %.4: i32 = int_literal -2147483648 [template] @@ -191,10 +191,10 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %LeftShift.decl: = fn_decl @LeftShift [template = constants.%LeftShift] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %LeftShift.decl: %LeftShift.type = fn_decl @LeftShift [template = constants.%LeftShift] { // CHECK:STDOUT: %int.make_type_32.loc4_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4_17 [template = i32] // CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4_17, %.loc4_17.1 [template = i32] @@ -210,9 +210,9 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc4_33.2: type = converted %int.make_type_32.loc4_33, %.loc4_33.1 [template = i32] // CHECK:STDOUT: @LeftShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5_14 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5_14, %.loc5_14.1 [template = i32] @@ -223,90 +223,90 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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: %LeftShift.ref.loc8: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc8: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc8_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_32: i32 = int_literal 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: %size_1: i32 = bind_name size_1, %.loc8_35.2 -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.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: %LeftShift.ref.loc13: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc13: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc13_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_32: i32 = int_literal 32 [template = constants.%.5] // 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: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_32.loc18, %.loc18_13.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc18: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc18: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc18_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_32: i32 = int_literal 33 [template = constants.%.6] // 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: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_32.loc21, %.loc21_17.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc21: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc21: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc21_33: i32 = int_literal 1000 [template = constants.%.7] // CHECK:STDOUT: %.loc21_39: i32 = int_literal 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: %overflow_1: i32 = bind_name overflow_1, %.loc21_42.2 -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_17.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_17.2: type = converted %int.make_type_32.loc26, %.loc26_17.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc26: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc26: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc26_33: i32 = int_literal 1000 [template = constants.%.7] // CHECK:STDOUT: %.loc26_39: i32 = int_literal 32 [template = constants.%.5] // 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: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_20.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_20.2: type = converted %int.make_type_32.loc29, %.loc29_20.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc29: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc29: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc29_36: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc29_39: i32 = int_literal 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: %no_overflow_1: i32 = bind_name no_overflow_1, %.loc29_42.2 -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_20.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_20.2: type = converted %int.make_type_32.loc34, %.loc34_20.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc34: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc34: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc34_36: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc34_39: i32 = int_literal 32 [template = constants.%.5] // 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: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_15.1: type = value_of_initializer %int.make_type_32.loc40 [template = i32] // CHECK:STDOUT: %.loc40_15.2: type = converted %int.make_type_32.loc40, %.loc40_15.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc40: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc40: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc40_31: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc40_41: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc40_41) [template = constants.%.9] // CHECK:STDOUT: %.loc40_30.1: i32 = value_of_initializer %int.snegate [template = constants.%.9] diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 03624e1ccd7f..14ebf543e40c 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -33,19 +33,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] -// CHECK:STDOUT: %Less: = struct_value () [template] +// CHECK:STDOUT: %Less: %Less.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: bool = bool_literal true [template] @@ -53,7 +53,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,10 +67,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Less.decl: = fn_decl @Less [template = constants.%Less] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Less.decl: %Less.type = fn_decl @Less [template = constants.%Less] { // CHECK:STDOUT: %int.make_type_32.loc2_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %int.make_type_32.loc2_12 [template = i32] // CHECK:STDOUT: %.loc2_12.2: type = converted %int.make_type_32.loc2_12, %.loc2_12.1 [template = i32] @@ -86,9 +86,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type.loc2, %.loc2_28.1 [template = bool] // CHECK:STDOUT: @Less.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] @@ -101,18 +101,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] @@ -148,10 +148,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: i32) -> i32 = "int.snegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc9: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_24: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_24) [template = constants.%.6] @@ -169,8 +169,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_25: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_25) [template = constants.%.7] @@ -188,8 +188,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_25: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_25) [template = constants.%.7] @@ -207,9 +207,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] -// CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc12: = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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_literal 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_literal 0 [template = constants.%.8] @@ -230,10 +230,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref Less, file.%Less.decl [template = constants.%Less] +// 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_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_32: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_32) [template = constants.%.9] // CHECK:STDOUT: %.loc13_21.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Less.ref: = name_ref Less, file.%Less.decl [template = constants.%Less] +// CHECK:STDOUT: %Less.ref: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.less: init bool = call %Less.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 4ebeb7833eff..4a0eaed0bc3a 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -33,19 +33,19 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %LessEq.type: type = fn_type @LessEq [template] -// CHECK:STDOUT: %LessEq: = struct_value () [template] +// CHECK:STDOUT: %LessEq: %LessEq.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: bool = bool_literal true [template] @@ -53,7 +53,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.8: bool = bool_literal false [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,10 +67,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %LessEq.decl: = fn_decl @LessEq [template = constants.%LessEq] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %LessEq.decl: %LessEq.type = fn_decl @LessEq [template = constants.%LessEq] { // CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] @@ -86,9 +86,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type.loc2, %.loc2_30.1 [template = bool] // CHECK:STDOUT: @LessEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] @@ -101,18 +101,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] @@ -148,10 +148,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a: i32) -> i32 = "int.snegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc9: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_26: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_26) [template = constants.%.6] @@ -169,8 +169,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: // 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: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_26) [template = constants.%.6] @@ -188,8 +188,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc10: // 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: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27: i32 = int_literal 0 [template = constants.%.7] // CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.8] @@ -207,9 +207,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] -// CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc12: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// 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_literal 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_literal 0 [template = constants.%.7] @@ -230,10 +230,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12: // 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: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// 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_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.9] // CHECK:STDOUT: %.loc13_23.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LessEq.ref: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// CHECK:STDOUT: %LessEq.ref: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.less_eq: init bool = call %LessEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/make_type_32.carbon b/toolchain/check/testdata/builtins/int/make_type_32.carbon index fe0555932d78..f9ccb915adc1 100644 --- a/toolchain/check/testdata/builtins/int/make_type_32.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_32.carbon @@ -27,7 +27,7 @@ var i: Int() = 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,7 +36,7 @@ var i: Int() = 0; // CHECK:STDOUT: .Int = %Int.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.decl: = fn_decl @Int [template = constants.%Int] { +// CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [template = constants.%Int] { // CHECK:STDOUT: @Int.%return: ref type = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -48,7 +48,7 @@ var i: Int() = 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,9 +58,9 @@ var i: Int() = 0; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .i = %i // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+3, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref: %Int.type = import_ref ir1, inst+3, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref [template = constants.%Int] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, %import_ref [template = constants.%Int] // CHECK:STDOUT: %int.make_type_32: init type = call %Int.ref() [template = i32] // CHECK:STDOUT: %.loc6_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc6_12.2: type = converted %int.make_type_32, %.loc6_12.1 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index 704621e1bdd7..03a78bd8934a 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -74,9 +74,9 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,8 +85,8 @@ var m: Int(1000000000); // CHECK:STDOUT: .Int = %Int.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Int.decl: = fn_decl @Int [template = constants.%Int] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [template = constants.%Int] { // 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] @@ -105,21 +105,21 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %.3: type = int_type signed, %.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 13 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %.6: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] -// CHECK:STDOUT: %Symbolic: = struct_value () [template] +// CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -130,80 +130,80 @@ var m: Int(1000000000); // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .Symbolic = %Symbolic.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %Int.type = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %Int.ref.loc6_9: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc6_13: i32 = int_literal 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: %n.loc6_6.1: i64 = param n -// CHECK:STDOUT: @F.%n: i64 = bind_name n, %n.loc6_6.1 -// CHECK:STDOUT: %Int.ref.loc6_21: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %n.loc6_6.1: %.3 = param n +// CHECK:STDOUT: @F.%n: %.3 = bind_name n, %n.loc6_6.1 +// CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc6_25: i32 = int_literal 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: @F.%return: ref i64 = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %Int.ref.loc10_9: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc10_13: i32 = int_literal 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: %n.loc10_6.1: i13 = param n -// CHECK:STDOUT: @G.%n: i13 = bind_name n, %n.loc10_6.1 -// CHECK:STDOUT: %Int.ref.loc10_21: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %n.loc10_6.1: %.5 = param n +// CHECK:STDOUT: @G.%n: %.5 = bind_name n, %n.loc10_6.1 +// CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc10_25: i32 = int_literal 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: @G.%return: ref i13 = var +// CHECK:STDOUT: @G.%return: ref %.5 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Symbolic.decl: = fn_decl @Symbolic [template = constants.%Symbolic] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Symbolic.decl: %Symbolic.type = fn_decl @Symbolic [template = constants.%Symbolic] { // 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: %N.loc14_13.1: i32 = param N // CHECK:STDOUT: @Symbolic.%N: i32 = bind_symbolic_name N 0, %N.loc14_13.1 [symbolic = constants.%N] -// CHECK:STDOUT: %Int.ref.loc14_25: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %Int.ref.loc14_25: %Int.type = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_29: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_signed.loc14_28: init type = call %Int.ref.loc14_25(%N.ref.loc14_29) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_30.1: type = value_of_initializer %int.make_type_signed.loc14_28 [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_30.2: type = converted %int.make_type_signed.loc14_28, %.loc14_30.1 [symbolic = constants.%.6] -// CHECK:STDOUT: %x.loc14_22.1: Core.Int(N) = param x -// CHECK:STDOUT: @Symbolic.%x: Core.Int(N) = bind_name x, %x.loc14_22.1 -// CHECK:STDOUT: %Int.ref.loc14_36: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %x.loc14_22.1: %.6 = param x +// CHECK:STDOUT: @Symbolic.%x: %.6 = bind_name x, %x.loc14_22.1 +// CHECK:STDOUT: %Int.ref.loc14_36: %Int.type = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_40: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_36(%N.ref.loc14_40) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_41.2: type = converted %int.make_type_signed.loc14_39, %.loc14_41.1 [symbolic = constants.%.6] -// CHECK:STDOUT: @Symbolic.%return: ref Core.Int(N) = var +// CHECK:STDOUT: @Symbolic.%return: ref %.6 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%n: i32) -> type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n: i64) -> i64 { +// CHECK:STDOUT: fn @F(%n: %.3) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: i64 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.3 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n: i13) -> i13 { +// CHECK:STDOUT: fn @G(%n: %.5) -> %.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: i13 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.5 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Symbolic(%N: i32, %x: Core.Int(N)) -> Core.Int(N) { +// CHECK:STDOUT: fn @Symbolic(%N: i32, %x: %.6) -> %.6 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: Core.Int(N) = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.6 = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -212,7 +212,7 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -222,9 +222,9 @@ var m: Int(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref: %Int.type = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref [template = constants.%Int] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, %import_ref [template = constants.%Int] // CHECK:STDOUT: %.loc10_12: i32 = int_literal 0 [template = constants.%.2] // 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 = ] @@ -240,11 +240,11 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: } @@ -256,11 +256,11 @@ var m: Int(1000000000); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: .n = %n.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %Int.type = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] @@ -271,8 +271,8 @@ var m: Int(1000000000); // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, %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_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_19) [template = constants.%.3] // CHECK:STDOUT: %.loc12_11.1: i32 = value_of_initializer %int.snegate [template = constants.%.3] @@ -295,7 +295,7 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int: = struct_value () [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,9 +305,9 @@ var m: Int(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .m = %m // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref: %Int.type = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref [template = constants.%Int] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, %import_ref [template = constants.%Int] // CHECK:STDOUT: %.loc9_12: i32 = int_literal 1000000000 [template = constants.%.2] // 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 = ] diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 4765037144a1..a304d6672fc0 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -74,9 +74,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,8 +85,8 @@ var m: UInt(1000000000); // CHECK:STDOUT: .UInt = %UInt.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %UInt.decl: = fn_decl @UInt [template = constants.%UInt] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %UInt.decl: %UInt.type = fn_decl @UInt [template = constants.%UInt] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_12.2: type = converted %int.make_type_32, %.loc4_12.1 [template = i32] @@ -105,21 +105,21 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 13 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %.6: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] -// CHECK:STDOUT: %Symbolic: = struct_value () [template] +// CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -130,80 +130,80 @@ var m: UInt(1000000000); // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .Symbolic = %Symbolic.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.1: %UInt.type = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %UInt.ref.loc6_9: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_14: i32 = int_literal 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: %n.loc6_6.1: u64 = param n -// CHECK:STDOUT: @F.%n: u64 = bind_name n, %n.loc6_6.1 -// CHECK:STDOUT: %UInt.ref.loc6_22: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %n.loc6_6.1: %.3 = param n +// CHECK:STDOUT: @F.%n: %.3 = bind_name n, %n.loc6_6.1 +// CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_27: i32 = int_literal 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: @F.%return: ref u64 = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %UInt.ref.loc10_9: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_14: i32 = int_literal 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: %n.loc10_6.1: u13 = param n -// CHECK:STDOUT: @G.%n: u13 = bind_name n, %n.loc10_6.1 -// CHECK:STDOUT: %UInt.ref.loc10_22: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %n.loc10_6.1: %.5 = param n +// CHECK:STDOUT: @G.%n: %.5 = bind_name n, %n.loc10_6.1 +// CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_27: i32 = int_literal 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: @G.%return: ref u13 = var +// CHECK:STDOUT: @G.%return: ref %.5 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Symbolic.decl: = fn_decl @Symbolic [template = constants.%Symbolic] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Symbolic.decl: %Symbolic.type = fn_decl @Symbolic [template = constants.%Symbolic] { // 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: %N.loc14_13.1: i32 = param N // CHECK:STDOUT: @Symbolic.%N: i32 = bind_symbolic_name N 0, %N.loc14_13.1 [symbolic = constants.%N] -// CHECK:STDOUT: %UInt.ref.loc14_25: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %UInt.ref.loc14_25: %UInt.type = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_30: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_unsigned.loc14_29: init type = call %UInt.ref.loc14_25(%N.ref.loc14_30) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_31.1: type = value_of_initializer %int.make_type_unsigned.loc14_29 [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_31.2: type = converted %int.make_type_unsigned.loc14_29, %.loc14_31.1 [symbolic = constants.%.6] -// CHECK:STDOUT: %x.loc14_22.1: Core.UInt(N) = param x -// CHECK:STDOUT: @Symbolic.%x: Core.UInt(N) = bind_name x, %x.loc14_22.1 -// CHECK:STDOUT: %UInt.ref.loc14_37: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %x.loc14_22.1: %.6 = param x +// CHECK:STDOUT: @Symbolic.%x: %.6 = bind_name x, %x.loc14_22.1 +// CHECK:STDOUT: %UInt.ref.loc14_37: %UInt.type = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_42: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_unsigned.loc14_41: init type = call %UInt.ref.loc14_37(%N.ref.loc14_42) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_43.1: type = value_of_initializer %int.make_type_unsigned.loc14_41 [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_43.2: type = converted %int.make_type_unsigned.loc14_41, %.loc14_43.1 [symbolic = constants.%.6] -// CHECK:STDOUT: @Symbolic.%return: ref Core.UInt(N) = var +// CHECK:STDOUT: @Symbolic.%return: ref %.6 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UInt(%n: i32) -> type = "int.make_type_unsigned"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n: u64) -> u64 { +// CHECK:STDOUT: fn @F(%n: %.3) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: u64 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.3 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n: u13) -> u13 { +// CHECK:STDOUT: fn @G(%n: %.5) -> %.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: u13 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %.5 = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Symbolic(%N: i32, %x: Core.UInt(N)) -> Core.UInt(N) { +// CHECK:STDOUT: fn @Symbolic(%N: i32, %x: %.6) -> %.6 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: Core.UInt(N) = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.6 = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -212,7 +212,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -222,9 +222,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref: %UInt.type = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %UInt.ref: = name_ref UInt, %import_ref [template = constants.%UInt] +// CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, %import_ref [template = constants.%UInt] // CHECK:STDOUT: %.loc10_13: i32 = int_literal 0 [template = constants.%.2] // 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 = ] @@ -240,11 +240,11 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: } @@ -256,11 +256,11 @@ var m: UInt(1000000000); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: .n = %n.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref.1: %UInt.type = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] @@ -271,8 +271,8 @@ var m: UInt(1000000000); // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %UInt.ref: = name_ref UInt, %import_ref.1 [template = constants.%UInt] -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, %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_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_20) [template = constants.%.3] // CHECK:STDOUT: %.loc12_12.1: i32 = value_of_initializer %int.snegate [template = constants.%.3] @@ -295,7 +295,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %UInt: = struct_value () [template] +// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,9 +305,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .m = %m // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref: %UInt.type = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %UInt.ref: = name_ref UInt, %import_ref [template = constants.%UInt] +// CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, %import_ref [template = constants.%UInt] // CHECK:STDOUT: %.loc9_13: i32 = int_literal 1000000000 [template = constants.%.2] // 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 = ] diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index 910807d64722..96d33219db83 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -29,23 +29,23 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] -// CHECK:STDOUT: %Neq: = struct_value () [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: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: bool = bool_literal false [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: bool = bool_literal true [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -58,10 +58,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Neq.decl: = fn_decl @Neq [template = constants.%Neq] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Neq.decl: %Neq.type = fn_decl @Neq [template = constants.%Neq] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -79,18 +79,18 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: True = param true_ -// CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: False = param false_ -// CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] @@ -124,10 +124,10 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Neq(%a: i32, %b: i32) -> bool = "int.neq"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%true_: True, %false_: False) { +// CHECK:STDOUT: fn @F(%true_: %True, %false_: %False) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %false_.ref: False = name_ref false_, %false_ -// CHECK:STDOUT: %Neq.ref.loc8: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc8_24: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21, %.loc8_24) [template = constants.%.5] @@ -145,8 +145,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc8: // 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: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_23: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.7] @@ -169,7 +169,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Neq.ref: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] +// CHECK:STDOUT: %Neq.ref: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.neq: init bool = call %Neq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 6edd8a6677ae..a2b0d5f58ea7 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -24,16 +24,16 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] -// CHECK:STDOUT: %Or: = struct_value () [template] +// CHECK:STDOUT: %Or: %Or.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 10 [template] // CHECK:STDOUT: %.4: i32 = int_literal 14 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 14] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,10 +44,10 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Or.decl: = fn_decl @Or [template = constants.%Or] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Or.decl: %Or.type = fn_decl @Or [template = constants.%Or] { // CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_32.loc2_10 [template = i32] // CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_32.loc2_10, %.loc2_10.1 [template = i32] @@ -63,31 +63,31 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_32.loc2_26, %.loc2_26.1 [template = i32] // CHECK:STDOUT: @Or.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Or.ref: = name_ref Or, %Or.decl [template = constants.%Or] +// CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, %Or.decl [template = constants.%Or] // CHECK:STDOUT: %.loc4_19: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 10 [template = constants.%.3] // CHECK:STDOUT: %int.or: init i32 = call %Or.ref(%.loc4_19, %.loc4_23) [template = constants.%.4] // 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 [i32; 14] = var arr -// CHECK:STDOUT: %arr: ref [i32; 14] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 14 [template = constants.%.4] // 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 [i32; 14] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 14] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_25: [i32; 14]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 14]* = bind_name arr_p, %.loc5_25 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_21: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_25: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_25 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -111,7 +111,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Or.ref: = name_ref Or, file.%Or.decl [template = constants.%Or] +// CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, file.%Or.decl [template = constants.%Or] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.or: init i32 = call %Or.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 704289c7aff3..6f50ffae4f9e 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -69,16 +69,16 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] -// CHECK:STDOUT: %RightShift: = struct_value () [template] +// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 22 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 5 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 5] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,10 +89,10 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RightShift.decl: = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RightShift.decl: %RightShift.type = fn_decl @RightShift [template = constants.%RightShift] { // CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] @@ -108,31 +108,31 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc2_34.2: type = converted %int.make_type_32.loc2_34, %.loc2_34.1 [template = i32] // CHECK:STDOUT: @RightShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %RightShift.ref: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc4_27: i32 = int_literal 22 [template = constants.%.2] // CHECK:STDOUT: %.loc4_31: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.right_shift: init i32 = call %RightShift.ref(%.loc4_27, %.loc4_31) [template = constants.%.4] // 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 [i32; 5] = var arr -// CHECK:STDOUT: %arr: ref [i32; 5] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 5 [template = constants.%.4] // 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 [i32; 5] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 5] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 5]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 5]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -156,7 +156,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RightShift.ref: = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.right_shift: init i32 = call %RightShift.ref(%a.ref, %b.ref) @@ -170,22 +170,22 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] -// CHECK:STDOUT: %RightShift: = struct_value () [template] +// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %.6: i32 = int_literal 10 [template] // CHECK:STDOUT: %.7: i32 = int_literal -10 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %.9: i32 = int_literal -3 [template] // CHECK:STDOUT: %.10: i32 = int_literal 3 [template] // CHECK:STDOUT: %.11: type = array_type %.10, i32 [template] -// CHECK:STDOUT: %.12: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -197,10 +197,10 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .arr2 = %arr2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RightShift.decl: = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RightShift.decl: %RightShift.type = fn_decl @RightShift [template = constants.%RightShift] { // CHECK:STDOUT: %int.make_type_32.loc6_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_32.loc6_18 [template = i32] // CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_32.loc6_18, %.loc6_18.1 [template = i32] @@ -216,9 +216,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_32.loc6_34, %.loc6_34.1 [template = i32] // CHECK:STDOUT: @RightShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc7_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer %int.make_type_32.loc7_14 [template = i32] // CHECK:STDOUT: %.loc7_14.2: type = converted %int.make_type_32.loc7_14, %.loc7_14.1 [template = i32] @@ -229,11 +229,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc7_22.2: type = converted %int.make_type_32.loc7_22, %.loc7_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc10_17: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %RightShift.ref.loc10: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %Negate.ref.loc10_35: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// 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_literal 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_literal 1 [template = constants.%.2] @@ -246,23 +246,23 @@ let negative: i32 = RightShift(1, Negate(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 [i32; 1] = var arr1 -// CHECK:STDOUT: %arr1: ref [i32; 1] = bind_name arr1, %arr1.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr1.var: ref %.4 = var arr1 +// CHECK:STDOUT: %arr1: ref %.4 = bind_name arr1, %arr1.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] [template = constants.%.5] -// CHECK:STDOUT: %arr1.ref: ref [i32; 1] = name_ref arr1, %arr1 -// CHECK:STDOUT: %.loc11_25: [i32; 1]* = addr_of %arr1.ref -// CHECK:STDOUT: %arr1_p: [i32; 1]* = bind_name arr1_p, %.loc11_25 -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc11_21: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %arr1.ref: ref %.4 = name_ref arr1, %arr1 +// CHECK:STDOUT: %.loc11_25: %.5 = addr_of %arr1.ref +// CHECK:STDOUT: %arr1_p: %.5 = bind_name arr1_p, %.loc11_25 +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc14_17: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %RightShift.ref.loc14: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %Negate.ref.loc14_35: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// 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_literal 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_literal 2 [template = constants.%.8] @@ -275,18 +275,18 @@ let negative: i32 = RightShift(1, Negate(1)); // 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 [i32; 3] = var arr2 -// CHECK:STDOUT: %arr2: ref [i32; 3] = bind_name arr2, %arr2.var -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr2.var: ref %.11 = var arr2 +// CHECK:STDOUT: %arr2: ref %.11 = bind_name arr2, %arr2.var +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19: i32 = int_literal 3 [template = constants.%.10] // 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 [i32; 3] [template = constants.%.12] -// CHECK:STDOUT: %arr2.ref: ref [i32; 3] = name_ref arr2, %arr2 -// CHECK:STDOUT: %.loc15_25: [i32; 3]* = addr_of %arr2.ref -// CHECK:STDOUT: %arr2_p: [i32; 3]* = bind_name arr2_p, %.loc15_25 +// CHECK:STDOUT: %.loc15_21: type = ptr_type %.11 [template = constants.%.12] +// CHECK:STDOUT: %arr2.ref: ref %.11 = name_ref arr2, %arr2 +// CHECK:STDOUT: %.loc15_25: %.12 = addr_of %arr2.ref +// CHECK:STDOUT: %arr2_p: %.12 = bind_name arr2_p, %.loc15_25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -300,11 +300,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] -// CHECK:STDOUT: %RightShift: = struct_value () [template] +// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 31 [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] @@ -320,10 +320,10 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RightShift.decl: = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RightShift.decl: %RightShift.type = fn_decl @RightShift [template = constants.%RightShift] { // CHECK:STDOUT: %int.make_type_32.loc4_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_18.1: type = value_of_initializer %int.make_type_32.loc4_18 [template = i32] // CHECK:STDOUT: %.loc4_18.2: type = converted %int.make_type_32.loc4_18, %.loc4_18.1 [template = i32] @@ -339,9 +339,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc4_34.2: type = converted %int.make_type_32.loc4_34, %.loc4_34.1 [template = i32] // CHECK:STDOUT: @RightShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5_14 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5_14, %.loc5_14.1 [template = i32] @@ -352,46 +352,46 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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: %RightShift.ref.loc8: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc8: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc8_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_33: i32 = int_literal 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: %size_1: i32 = bind_name size_1, %.loc8_36.2 -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.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: %RightShift.ref.loc13: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc13: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc13_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_33: i32 = int_literal 32 [template = constants.%.5] // 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: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_32.loc18, %.loc18_13.1 [template = i32] -// CHECK:STDOUT: %RightShift.ref.loc18: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc18: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc18_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_33: i32 = int_literal 33 [template = constants.%.6] // 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: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_15.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] // CHECK:STDOUT: %.loc24_15.2: type = converted %int.make_type_32.loc24, %.loc24_15.1 [template = i32] -// CHECK:STDOUT: %RightShift.ref.loc24: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc24: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc24_32: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc24_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc24_42) [template = constants.%.7] // CHECK:STDOUT: %.loc24_31.1: i32 = value_of_initializer %int.snegate [template = constants.%.7] diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 7828ec8ddcc1..115fe80b921c 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -94,16 +94,16 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,10 +114,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -133,31 +133,31 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 3] = var arr -// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 3 [template = constants.%.4] // 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 [i32; 3] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 3] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 3]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 3]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -181,7 +181,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%a.ref, %b.ref) @@ -195,26 +195,26 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -233,9 +233,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_32.loc8_14 [template = i32] // CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_32.loc8_14, %.loc8_14.1 [template = i32] @@ -246,11 +246,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_32.loc8_22, %.loc8_22.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] @@ -271,10 +271,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_32.loc13_39, %.loc13_39.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18_21, %.loc18_21.1 [template = i32] @@ -290,10 +290,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type.loc18, %.loc18_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] @@ -309,33 +309,33 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_32.loc19_33, %.loc19_33.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %.loc25: i32 = int_literal 1 [template = constants.%.2] // 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: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc30_35: i32 = int_literal 3 [template = constants.%.4] // 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: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc35_45: i32 = int_literal 2 [template = constants.%.3] // 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: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.16: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] +// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc44_37: i32 = int_literal 3 [template = constants.%.4] @@ -345,9 +345,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc44_39: type = array_type %int.sadd, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.17: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] @@ -358,11 +358,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_32.loc46_33, %.loc46_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.21: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.22: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.19: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.22: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %int.make_type_32.loc50_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_26.1: type = value_of_initializer %int.make_type_32.loc50_26 [template = i32] // CHECK:STDOUT: %.loc50_26.2: type = converted %int.make_type_32.loc50_26, %.loc50_26.1 [template = i32] @@ -383,10 +383,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc50_50.2: type = converted %int.make_type_32.loc50_50, %.loc50_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.23: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.24: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.25: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.23: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.24: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.25: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc54_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_32.1: type = value_of_initializer %int.make_type_32.loc54_32 [template = i32] // CHECK:STDOUT: %.loc54_32.2: type = converted %int.make_type_32.loc54_32, %.loc54_32.1 [template = i32] @@ -418,7 +418,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc47_19.1: i32 = value_of_initializer %TooFew.call @@ -428,7 +428,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -440,7 +440,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) @@ -454,9 +454,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -469,10 +469,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -488,22 +488,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %Add.ref.loc6: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc6: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc6_30: i32 = int_literal 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: %a.loc6: i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc10: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc10: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc10_30: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.sadd.loc10: init i32 = call %Add.ref.loc10(%.loc10_18, %.loc10_30) [template = constants.%.5] diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index 0ef225e41e82..4ab40b2ecaba 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -62,16 +62,16 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -82,10 +82,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -101,31 +101,31 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Div.ref: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sdiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 1] = var arr -// CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // 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 [i32; 1] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -149,7 +149,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.sdiv: init i32 = call %Div.ref(%a.ref, %b.ref) @@ -163,13 +163,13 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -185,10 +185,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -204,10 +204,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] @@ -223,9 +223,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] @@ -236,15 +236,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc9: = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.3] @@ -255,13 +255,13 @@ let b: i32 = Div(0, 0); // 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: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] -// CHECK:STDOUT: %Div.ref.loc12: = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 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_literal 1 [template = constants.%.4] @@ -275,20 +275,20 @@ let b: i32 = Div(0, 0); // 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: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_8.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_8.2: type = converted %int.make_type_32.loc19, %.loc19_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc19: = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc19: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc19_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc19: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc19: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc19_22: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc19_29: i32 = int_literal 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc19_21.1: i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.3] // CHECK:STDOUT: %.loc19_21.2: i32 = converted %int.snegate.loc19_28, %.loc19_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc19: init i32 = call %Sub.ref.loc19(%.loc19_21.2, %.loc19_43) [template = constants.%.6] -// CHECK:STDOUT: %Negate.ref.loc19_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc19_54: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.6] @@ -314,9 +314,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -327,10 +327,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Div = %Div.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -346,22 +346,22 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc10: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_21: i32 = int_literal 0 [template = constants.%.3] // 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.loc10: i32 = bind_name a, %.loc10_23.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %Div.ref.loc15: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc15_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.sdiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_18, %.loc15_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 73d88eba3eb1..e1a85305f9d3 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -65,16 +65,16 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 2] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,10 +85,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -104,31 +104,31 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Mod.ref: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 3 [template = constants.%.3] // CHECK:STDOUT: %int.smod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 2] = var arr -// CHECK:STDOUT: %arr: ref [i32; 2] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 2 [template = constants.%.4] // 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 [i32; 2] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 2] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 2]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 2]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -152,7 +152,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.smod: init i32 = call %Mod.ref(%a.ref, %b.ref) @@ -166,13 +166,13 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -189,10 +189,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -208,10 +208,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] @@ -227,9 +227,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] @@ -240,15 +240,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc9: = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.3] @@ -259,13 +259,13 @@ let b: i32 = Mod(0, 0); // 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: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] -// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 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_literal 1 [template = constants.%.4] @@ -279,20 +279,20 @@ let b: i32 = Mod(0, 0); // 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: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_8.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_8.2: type = converted %int.make_type_32.loc20, %.loc20_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc20: = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc20: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc20_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc20: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc20: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc20_22: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc20_29: i32 = int_literal 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc20_21.1: i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.3] // CHECK:STDOUT: %.loc20_21.2: i32 = converted %int.snegate.loc20_28, %.loc20_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc20: init i32 = call %Sub.ref.loc20(%.loc20_21.2, %.loc20_43) [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc20_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc20_54: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.7] @@ -318,9 +318,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -331,10 +331,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Mod = %Mod.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -350,22 +350,22 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc12_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_21: i32 = int_literal 0 [template = constants.%.3] // 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.loc12: i32 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %Mod.ref.loc17: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc17_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.smod.loc17: init i32 = call %Mod.ref.loc17(%.loc17_18, %.loc17_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 0e1c99d0a9bc..47e61f628d4c 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -36,16 +36,16 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: = struct_value () [template] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 6 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 6] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,10 +56,10 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -75,31 +75,31 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Mul.ref: = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.smul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 6] = var arr -// CHECK:STDOUT: %arr: ref [i32; 6] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 6 [template = constants.%.4] // 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 [i32; 6] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 6] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 6]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 6]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -123,7 +123,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.smul: init i32 = call %Mul.ref(%a.ref, %b.ref) @@ -137,9 +137,9 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: = struct_value () [template] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 32767 [template] // CHECK:STDOUT: %.3: i32 = int_literal 65536 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2147418112 [template] @@ -153,10 +153,10 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .Mul = %Mul.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -172,22 +172,22 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %Mul.ref.loc6: = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 32767 [template = constants.%.2] // CHECK:STDOUT: %.loc6_26: i32 = int_literal 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: %a.loc6: i32 = bind_name a, %.loc6_34.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Mul.ref.loc10: = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc10: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 32768 [template = constants.%.5] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 65536 [template = constants.%.3] // CHECK:STDOUT: %int.smul.loc10: init i32 = call %Mul.ref.loc10(%.loc10_18, %.loc10_26) [template = constants.%.6] diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 43eba86d71d6..11e00ff3af7d 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -121,17 +121,17 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 123 [template] // CHECK:STDOUT: %.3: i32 = int_literal -123 [template] // CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type [i32; 123] [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -142,9 +142,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] @@ -155,10 +155,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_32.loc2_22, %.loc2_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc4_16: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc4_23: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// 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_literal 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_22.1: i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.3] @@ -167,32 +167,32 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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 [i32; 123] = var arr -// CHECK:STDOUT: %arr: ref [i32; 123] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 123 [template = constants.%.2] // 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 [i32; 123] [template = constants.%.5] -// CHECK:STDOUT: %arr.ref: ref [i32; 123] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_26: [i32; 123]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 123]* = bind_name arr_p, %.loc5_26 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_22: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_26: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5_26 +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc7: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc7: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc7_21: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %int.snegate.loc7: init i32 = call %Negate.ref.loc7(%.loc7_21) [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.snegate.loc7, %.loc7_23.1 [template = constants.%.7] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc7_23.2 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] @@ -216,7 +216,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc10_19.1: i32 = value_of_initializer %int.snegate @@ -229,25 +229,25 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -266,17 +266,17 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_32.loc8, %.loc8_16.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] @@ -292,9 +292,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18, %.loc18_21.1 [template = i32] @@ -305,9 +305,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type.loc18, %.loc18_29.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] @@ -318,30 +318,30 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // 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: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35: i32 = int_literal 1 [template = constants.%.2] // 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: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] +// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.snegate: init i32 = call %JustRight.ref() [template = ] @@ -350,9 +350,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc44_36: type = array_type %int.snegate, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] @@ -363,11 +363,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_32.loc46_33, %.loc46_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.16: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.17: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_32.loc57_26 [template = i32] // CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_32.loc57_26, %.loc57_26.1 [template = i32] @@ -388,10 +388,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_32.loc57_50, %.loc57_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.19: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_32.loc68_32 [template = i32] // CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_32.loc68_32, %.loc68_32.1 [template = i32] @@ -423,7 +423,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() [template = ] // CHECK:STDOUT: %.loc54_19.1: i32 = value_of_initializer %TooFew.call [template = ] @@ -433,7 +433,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -445,7 +445,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] @@ -459,11 +459,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -477,9 +477,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4_14 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4_14, %.loc4_14.1 [template = i32] @@ -490,10 +490,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_32.loc4_22, %.loc4_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] @@ -509,12 +509,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc8_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc8_21: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_28: i32 = int_literal 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_20.1: i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.3] @@ -523,13 +523,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // 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: %a.loc8: i32 = bind_name a, %.loc8_40.2 -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_32.loc14, %.loc14_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc14_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc14_25: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc14_25: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc14_32: i32 = int_literal 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_literal 1 [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 4300fb7099c3..8c8b0a17dc4d 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -37,16 +37,16 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,10 +57,10 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -76,31 +76,31 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 1] = var arr -// CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // 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 [i32; 1] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -124,7 +124,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%a.ref, %b.ref) @@ -138,9 +138,9 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal -2147483647 [template] @@ -155,10 +155,10 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -174,23 +174,23 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %Sub.ref.loc6: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_21: i32 = int_literal 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: %a.loc6: i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc7_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc7_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc7_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc7_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.4] @@ -201,12 +201,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // 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: %b.loc7: i32 = bind_name b, %.loc7_40.2 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] -// CHECK:STDOUT: %Sub.ref.loc11_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc11_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc11_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc11_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc11_21: init i32 = call %Sub.ref.loc11_18(%.loc11_22, %.loc11_25) [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 5048ad667e12..3165007cd096 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -91,16 +91,16 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,10 +111,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -130,31 +130,31 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.uadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 3] = var arr -// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 3 [template = constants.%.4] // 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 [i32; 3] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 3] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 3]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 3]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -178,7 +178,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.uadd: init i32 = call %Add.ref(%a.ref, %b.ref) @@ -192,26 +192,26 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -230,9 +230,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_32.loc8_14 [template = i32] // CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_32.loc8_14, %.loc8_14.1 [template = i32] @@ -243,11 +243,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_32.loc8_22, %.loc8_22.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] @@ -268,10 +268,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_32.loc13_39, %.loc13_39.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18_21, %.loc18_21.1 [template = i32] @@ -287,10 +287,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type.loc18, %.loc18_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] @@ -306,33 +306,33 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_32.loc19_33, %.loc19_33.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %.loc25: i32 = int_literal 1 [template = constants.%.2] // 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: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc30_35: i32 = int_literal 3 [template = constants.%.4] // 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: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc35_45: i32 = int_literal 2 [template = constants.%.3] // 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: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.16: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] +// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc43_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc43_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc43_37: i32 = int_literal 3 [template = constants.%.4] @@ -342,9 +342,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc43_39: type = array_type %int.uadd, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.17: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc45_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_25.1: type = value_of_initializer %int.make_type_32.loc45_25 [template = i32] // CHECK:STDOUT: %.loc45_25.2: type = converted %int.make_type_32.loc45_25, %.loc45_25.1 [template = i32] @@ -355,11 +355,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc45_33.2: type = converted %int.make_type_32.loc45_33, %.loc45_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.21: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.22: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.19: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.22: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %int.make_type_32.loc49_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_26.1: type = value_of_initializer %int.make_type_32.loc49_26 [template = i32] // CHECK:STDOUT: %.loc49_26.2: type = converted %int.make_type_32.loc49_26, %.loc49_26.1 [template = i32] @@ -380,10 +380,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc49_50.2: type = converted %int.make_type_32.loc49_50, %.loc49_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.23: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.24: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.25: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.23: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.24: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.25: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc53_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_32.1: type = value_of_initializer %int.make_type_32.loc53_32 [template = i32] // CHECK:STDOUT: %.loc53_32.2: type = converted %int.make_type_32.loc53_32, %.loc53_32.1 [template = i32] @@ -415,7 +415,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc46_19.1: i32 = value_of_initializer %TooFew.call @@ -425,7 +425,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -437,7 +437,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) @@ -451,9 +451,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -466,10 +466,10 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -485,22 +485,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc7: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc7: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc7_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc7_30: i32 = int_literal 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: %a.loc7: i32 = bind_name a, %.loc7_32.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc8: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc8: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc8_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc8_30: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.uadd.loc8: init i32 = call %Add.ref.loc8(%.loc8_18, %.loc8_30) [template = constants.%.5] diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index 72bf77ace848..8225ac40e124 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -58,16 +58,16 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -78,10 +78,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -97,31 +97,31 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Div.ref: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.udiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 1] = var arr -// CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // 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 [i32; 1] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -145,7 +145,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.udiv: init i32 = call %Div.ref(%a.ref, %b.ref) @@ -159,13 +159,13 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -182,10 +182,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -201,10 +201,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] @@ -220,9 +220,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] @@ -233,15 +233,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc9: = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.3] @@ -252,13 +252,13 @@ let b: i32 = Div(0, 0); // 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: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] -// CHECK:STDOUT: %Div.ref.loc12: = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 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_literal 1 [template = constants.%.4] @@ -272,20 +272,20 @@ let b: i32 = Div(0, 0); // 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: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] -// CHECK:STDOUT: %Div.ref.loc15: = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc15: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc15_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_29: i32 = int_literal 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.unegate.loc15_28, %.loc15_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_21.2, %.loc15_43) [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc15_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_54: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.7] @@ -311,9 +311,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -324,10 +324,10 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Div = %Div.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -343,22 +343,22 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc10: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_21: i32 = int_literal 0 [template = constants.%.3] // 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.loc10: i32 = bind_name a, %.loc10_23.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %Div.ref.loc15: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc15_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.udiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_18, %.loc15_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 978a8f445c5d..005f30311073 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -60,16 +60,16 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 2] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -80,10 +80,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -99,31 +99,31 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Mod.ref: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 3 [template = constants.%.3] // CHECK:STDOUT: %int.umod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 2] = var arr -// CHECK:STDOUT: %arr: ref [i32; 2] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 2 [template = constants.%.4] // 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 [i32; 2] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 2] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 2]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 2]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -147,7 +147,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.umod: init i32 = call %Mod.ref(%a.ref, %b.ref) @@ -161,13 +161,13 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -184,10 +184,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -203,10 +203,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] @@ -222,9 +222,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] @@ -235,15 +235,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc9: = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.3] @@ -254,13 +254,13 @@ let b: i32 = Mod(0, 0); // 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: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] -// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 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_literal 1 [template = constants.%.4] @@ -274,20 +274,20 @@ let b: i32 = Mod(0, 0); // 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: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] -// CHECK:STDOUT: %Mod.ref.loc15: = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc15: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc15_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc15: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_29: i32 = int_literal 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.unegate.loc15_28, %.loc15_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_21.2, %.loc15_43) [template = constants.%.6] -// CHECK:STDOUT: %Negate.ref.loc15_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_54: i32 = int_literal 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_17.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.6] @@ -313,9 +313,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -326,10 +326,10 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Mod = %Mod.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -345,22 +345,22 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc12_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_21: i32 = int_literal 0 [template = constants.%.3] // 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.loc12: i32 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %Mod.ref.loc17: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc17_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.umod.loc17: init i32 = call %Mod.ref.loc17(%.loc17_18, %.loc17_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index ed177072c31b..646ca71663e7 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -33,16 +33,16 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: = struct_value () [template] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 6 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 6] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,10 +53,10 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -72,31 +72,31 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Mul.ref: = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.umul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 6] = var arr -// CHECK:STDOUT: %arr: ref [i32; 6] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 6 [template = constants.%.4] // 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 [i32; 6] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 6] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 6]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 6]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -120,7 +120,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.umul: init i32 = call %Mul.ref(%a.ref, %b.ref) @@ -134,9 +134,9 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: = struct_value () [template] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 32767 [template] // CHECK:STDOUT: %.3: i32 = int_literal 65536 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2147418112 [template] @@ -150,10 +150,10 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .Mul = %Mul.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -169,22 +169,22 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %Mul.ref.loc6: = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 32767 [template = constants.%.2] // CHECK:STDOUT: %.loc6_26: i32 = int_literal 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: %a.loc6: i32 = bind_name a, %.loc6_34.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Mul.ref.loc7: = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc7: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc7_18: i32 = int_literal 32768 [template = constants.%.5] // CHECK:STDOUT: %.loc7_26: i32 = int_literal 65536 [template = constants.%.3] // CHECK:STDOUT: %int.umul.loc7: init i32 = call %Mul.ref.loc7(%.loc7_18, %.loc7_26) [template = constants.%.6] diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 85e77800c636..7b974938c611 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -117,17 +117,17 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 123 [template] // CHECK:STDOUT: %.3: i32 = int_literal -123 [template] // CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type [i32; 123] [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -138,9 +138,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] @@ -151,10 +151,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_32.loc2_22, %.loc2_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc4_16: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc4_23: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// 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_literal 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_22.1: i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.3] @@ -163,32 +163,32 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 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 [i32; 123] = var arr -// CHECK:STDOUT: %arr: ref [i32; 123] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.4 = var arr +// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 123 [template = constants.%.2] // 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 [i32; 123] [template = constants.%.5] -// CHECK:STDOUT: %arr.ref: ref [i32; 123] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_26: [i32; 123]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 123]* = bind_name arr_p, %.loc5_26 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_22: type = ptr_type %.4 [template = constants.%.5] +// CHECK:STDOUT: %arr.ref: ref %.4 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_26: %.5 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.5 = bind_name arr_p, %.loc5_26 +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc7: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc7: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc7_21: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %int.unegate.loc7: init i32 = call %Negate.ref.loc7(%.loc7_21) [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.unegate.loc7 [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.unegate.loc7, %.loc7_23.1 [template = constants.%.7] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc7_23.2 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] @@ -212,7 +212,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %int.unegate: init i32 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc10_19.1: i32 = value_of_initializer %int.unegate @@ -225,25 +225,25 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] -// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany: %RuntimeCallTooMany.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: %RuntimeCallBadReturnType.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -262,17 +262,17 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_32.loc8, %.loc8_16.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] @@ -288,9 +288,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: %BadReturnType.type = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18, %.loc18_21.1 [template = i32] @@ -301,9 +301,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type.loc18, %.loc18_29.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: %JustRight.type = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] @@ -314,30 +314,30 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // 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: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35: i32 = int_literal 1 [template = constants.%.2] // 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: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] +// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.unegate: init i32 = call %JustRight.ref() [template = ] @@ -346,9 +346,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc44_36: type = array_type %int.unegate, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] @@ -359,11 +359,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_32.loc46_33, %.loc46_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.16: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.17: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: %RuntimeCallTooMany.type = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_32.loc57_26 [template = i32] // CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_32.loc57_26, %.loc57_26.1 [template = i32] @@ -384,10 +384,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_32.loc57_50, %.loc57_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %import_ref.19: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: %RuntimeCallBadReturnType.type = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_32.loc68_32 [template = i32] // CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_32.loc68_32, %.loc68_32.1 [template = i32] @@ -419,7 +419,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] +// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() [template = ] // CHECK:STDOUT: %.loc54_19.1: i32 = value_of_initializer %TooFew.call [template = ] @@ -429,7 +429,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] +// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -441,7 +441,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] +// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] @@ -455,11 +455,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -473,9 +473,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4_14 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4_14, %.loc4_14.1 [template = i32] @@ -486,10 +486,10 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_32.loc4_22, %.loc4_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] @@ -505,12 +505,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc8_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc8_21: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_28: i32 = int_literal 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_20.1: i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.3] @@ -519,13 +519,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // 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: %a.loc8: i32 = bind_name a, %.loc8_40.2 -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] -// CHECK:STDOUT: %Negate.ref.loc11_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc11_25: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc11_25: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc11_32: i32 = int_literal 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_literal 1 [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 36f44841e9df..d237a99dbd2c 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -34,16 +34,16 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,10 +54,10 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -73,31 +73,31 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] // 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 [i32; 1] = var arr -// CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // 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 [i32; 1] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -121,7 +121,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%a.ref, %b.ref) @@ -135,9 +135,9 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal -2147483647 [template] @@ -152,10 +152,10 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] @@ -171,23 +171,23 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %Sub.ref.loc6: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_21: i32 = int_literal 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: %a.loc6: i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc7_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc7_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc7_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc7_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.4] @@ -198,12 +198,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // 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: %b.loc7: i32 = bind_name b, %.loc7_40.2 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc8_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc8_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc8_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc8_21: init i32 = call %Sub.ref.loc8_18(%.loc8_22, %.loc8_25) [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index a1b95c6e63b3..49aed6dd4ebe 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -24,16 +24,16 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Xor.type: type = fn_type @Xor [template] -// CHECK:STDOUT: %Xor: = struct_value () [template] +// CHECK:STDOUT: %Xor: %Xor.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 10 [template] // CHECK:STDOUT: %.4: i32 = int_literal 6 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 6] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,10 +44,10 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Xor.decl: = fn_decl @Xor [template = constants.%Xor] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Xor.decl: %Xor.type = fn_decl @Xor [template = constants.%Xor] { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] @@ -63,31 +63,31 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Xor.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Xor.ref: = name_ref Xor, %Xor.decl [template = constants.%Xor] +// CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, %Xor.decl [template = constants.%Xor] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24: i32 = int_literal 10 [template = constants.%.3] // CHECK:STDOUT: %int.xor: init i32 = call %Xor.ref(%.loc4_20, %.loc4_24) [template = constants.%.4] // 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 [i32; 6] = var arr -// CHECK:STDOUT: %arr: ref [i32; 6] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 6 [template = constants.%.4] // 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 [i32; 6] [template = constants.%.6] -// CHECK:STDOUT: %arr.ref: ref [i32; 6] = name_ref arr, %arr -// CHECK:STDOUT: %.loc5_24: [i32; 6]* = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: [i32; 6]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %arr.ref: ref %.5 = name_ref arr, %arr +// CHECK:STDOUT: %.loc5_24: %.6 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.6 = bind_name arr_p, %.loc5_24 +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] @@ -111,7 +111,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Xor.ref: = name_ref Xor, file.%Xor.decl [template = constants.%Xor] +// CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, file.%Xor.decl [template = constants.%Xor] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.xor: init i32 = call %Xor.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/class/adapt.carbon b/toolchain/check/testdata/class/adapt.carbon index aacad83d1f71..566eec46db9e 100644 --- a/toolchain/check/testdata/class/adapt.carbon +++ b/toolchain/check/testdata/class/adapt.carbon @@ -51,11 +51,11 @@ fn F(a: AdaptNotExtend) { // 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: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type SomeClass, i32 [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: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -68,23 +68,23 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %StructAdapter.decl: type = class_decl @StructAdapter [template = constants.%StructAdapter] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // 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: = field_decl a, element0 [template] +// 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass @@ -94,7 +94,7 @@ fn F(a: AdaptNotExtend) { // 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: adapt_decl %SomeClass // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -108,7 +108,7 @@ fn F(a: AdaptNotExtend) { // 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 {.a: i32, .b: i32} +// CHECK:STDOUT: adapt_decl %.3 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter @@ -122,12 +122,12 @@ fn F(a: AdaptNotExtend) { // 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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %AdaptNotExtend: type = class_type @AdaptNotExtend [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -140,15 +140,15 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Adapted.decl: type = class_decl @Adapted [template = constants.%Adapted] {} // CHECK:STDOUT: %AdaptNotExtend.decl: type = class_decl @AdaptNotExtend [template = constants.%AdaptNotExtend] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %AdaptNotExtend.ref: type = name_ref AdaptNotExtend, %AdaptNotExtend.decl [template = constants.%AdaptNotExtend] -// CHECK:STDOUT: %a.loc12_6.1: AdaptNotExtend = param a -// CHECK:STDOUT: @F.2.%a: AdaptNotExtend = bind_name a, %a.loc12_6.1 +// CHECK:STDOUT: %a.loc12_6.1: %AdaptNotExtend = param a +// CHECK:STDOUT: @F.2.%a: %AdaptNotExtend = bind_name a, %a.loc12_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Adapted { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapted @@ -157,7 +157,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // 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: adapt_decl %Adapted // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptNotExtend @@ -165,9 +165,9 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%a: AdaptNotExtend) { +// CHECK:STDOUT: fn @F.2(%a: %AdaptNotExtend) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: AdaptNotExtend = name_ref a, %a +// CHECK:STDOUT: %a.ref: %AdaptNotExtend = name_ref a, %a // CHECK:STDOUT: %F.ref: = name_ref F, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index a09f1e33742e..ac45f044f3ba 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -32,29 +32,29 @@ fn Access(d: Derived) -> (i32, i32) { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [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: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = ptr_type {.b: i32} [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: %.4: type = ptr_type %.3 [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: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: {.b: i32}*, .d: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.base: {.b: i32}*, .d: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.base: Base, .d: i32} [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4, .d: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] // CHECK:STDOUT: %.11: i32 = int_literal 4 [template] // CHECK:STDOUT: %.12: i32 = int_literal 7 [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: {.b: i32}, .d: i32} [template] -// CHECK:STDOUT: %struct.1: Base = struct_value (%.11) [template] -// CHECK:STDOUT: %struct.2: Derived = struct_value (%struct.1, %.12) [template] +// CHECK:STDOUT: %.13: type = struct_type {.base: %.3, .d: i32} [template] +// CHECK:STDOUT: %struct.1: %Base = struct_value (%.11) [template] +// CHECK:STDOUT: %struct.2: %Derived = struct_value (%struct.1, %.12) [template] // CHECK:STDOUT: %.14: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] -// CHECK:STDOUT: %Access: = struct_value () [template] -// CHECK:STDOUT: %.16: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %Access: %Access.type = struct_value () [template] +// CHECK:STDOUT: %.16: type = ptr_type %.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,28 +67,28 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Derived.ref.loc21: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: @Make.%return: ref Derived = var +// CHECK:STDOUT: @Make.%return: ref %Derived = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Access.decl: = fn_decl @Access [template = constants.%Access] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc25_11.1: Derived = param d -// CHECK:STDOUT: @Access.%d: Derived = bind_name d, %d.loc25_11.1 +// CHECK:STDOUT: %d.loc25_11.1: %Derived = param d +// CHECK:STDOUT: @Access.%d: %Derived = bind_name d, %d.loc25_11.1 // 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: (type, type) = tuple_literal (%int.make_type_32.loc25_27, %int.make_type_32.loc25_32) +// CHECK:STDOUT: %.loc25_35.1: %.14 = 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.%.15 [template = constants.%.15] -// CHECK:STDOUT: @Access.%return: ref (i32, i32) = var +// CHECK:STDOUT: @Access.%return: ref %.15 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -96,7 +96,7 @@ 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: = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl b, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -105,11 +105,11 @@ 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: = 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: = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc18_8: %.6 = field_decl d, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -120,44 +120,44 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> %return: Derived { +// CHECK:STDOUT: fn @Make() -> %return: %Derived { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc22_25: i32 = int_literal 4 [template = constants.%.11] -// CHECK:STDOUT: %.loc22_26.1: {.b: i32} = struct_literal (%.loc22_25) +// CHECK:STDOUT: %.loc22_26.1: %.3 = struct_literal (%.loc22_25) // CHECK:STDOUT: %.loc22_34: i32 = int_literal 7 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_35.1: {.base: {.b: i32}, .d: i32} = struct_literal (%.loc22_26.1, %.loc22_34) -// CHECK:STDOUT: %.loc22_35.2: ref Base = class_element_access %return, element0 +// CHECK:STDOUT: %.loc22_35.1: %.13 = 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.%.11] -// 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_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.%.12] -// 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: %.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: Derived) -> %return: (i32, i32) { +// CHECK:STDOUT: fn @Access(%d: %Derived) -> %return: %.15 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %d.ref.loc26_11: Derived = name_ref d, %d -// CHECK:STDOUT: %d.ref.loc26_12: = name_ref d, @Derived.%.loc18_8 [template = @Derived.%.loc18_8] +// CHECK:STDOUT: %d.ref.loc26_11: %Derived = name_ref d, %d +// 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: = 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: = name_ref b, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %d.ref.loc26_16: %Derived = name_ref d, %d +// 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: %.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: (i32, i32) = tuple_literal (%.loc26_12.2, %.loc26_22.2) +// CHECK:STDOUT: %.loc26_24.1: %.15 = 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 (i32, i32) = tuple_init (%.loc26_24.3, %.loc26_24.5) to %return -// CHECK:STDOUT: %.loc26_25: init (i32, i32) = converted %.loc26_24.1, %.loc26_24.6 +// CHECK:STDOUT: %.loc26_24.6: init %.15 = tuple_init (%.loc26_24.3, %.loc26_24.5) to %return +// CHECK:STDOUT: %.loc26_25: init %.15 = 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 f7ead5a5dd2c..2f1e46c87e5a 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -31,21 +31,21 @@ fn Access(p: Derived*) -> i32* { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [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: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32, .c: i32} [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: type = ptr_type Derived [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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: type = ptr_type %Derived [template] // CHECK:STDOUT: %.9: type = ptr_type i32 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] -// CHECK:STDOUT: %Access: = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.11: type = ptr_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.12: type = ptr_type {.base: Base, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %Access: %Access.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.4, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] +// CHECK:STDOUT: %.12: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,23 +57,23 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Access.decl: = fn_decl @Access [template = constants.%Access] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc24_21: type = ptr_type Derived [template = constants.%.8] -// CHECK:STDOUT: %p.loc24_11.1: Derived* = param p -// CHECK:STDOUT: @Access.%p: Derived* = bind_name p, %p.loc24_11.1 +// CHECK:STDOUT: %.loc24_21: type = ptr_type %Derived [template = constants.%.8] +// CHECK:STDOUT: %p.loc24_11.1: %.8 = param p +// CHECK:STDOUT: @Access.%p: %.8 = bind_name p, %p.loc24_11.1 // 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.%.9] -// CHECK:STDOUT: @Access.%return: ref i32* = var +// CHECK:STDOUT: @Access.%return: ref %.9 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,15 +81,15 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = 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: = field_decl c, element2 [template] +// CHECK:STDOUT: %.loc14_8: %.2 = field_decl c, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -100,15 +100,15 @@ 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: = 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: = 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: = field_decl e, element2 [template] +// CHECK:STDOUT: %.loc21_8: %.6 = field_decl e, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -120,15 +120,15 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Access(%p: Derived*) -> i32* { +// CHECK:STDOUT: fn @Access(%p: %.8) -> %.9 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p -// CHECK:STDOUT: %.loc25_12: ref Derived = deref %p.ref -// CHECK:STDOUT: %c.ref: = 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: %p.ref: %.8 = 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: %.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: i32* = addr_of %.loc25_15.3 +// CHECK:STDOUT: %.loc25_10: %.9 = 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 6f30b6cb3503..ec287767f1ab 100644 --- a/toolchain/check/testdata/class/base_function_unqualified.carbon +++ b/toolchain/check/testdata/class/base_function_unqualified.carbon @@ -29,16 +29,16 @@ fn Derived.H() { // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type Derived, Base [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: Base} [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,11 +50,11 @@ fn Derived.H() { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -63,9 +63,9 @@ 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: = base_decl Base, element0 [template] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// 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: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -79,15 +79,15 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index d802088b1ee7..000db38bc1f9 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -32,22 +32,22 @@ fn Call(p: Derived*) { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type Base [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.a: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %Derived: type = class_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: 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: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] -// CHECK:STDOUT: %Call: = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: {.a: i32}*} [template] -// CHECK:STDOUT: %.11: type = ptr_type {.base: Base} [template] +// CHECK:STDOUT: %Call: %Call.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.5} [template] +// CHECK:STDOUT: %.11: type = ptr_type %.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,20 +59,20 @@ fn Call(p: Derived*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Base.ref: type = name_ref Base, %Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc17_26: type = ptr_type Base [template = constants.%.3] -// CHECK:STDOUT: %self.loc17_16.1: Base* = param self -// CHECK:STDOUT: @F.%self: Base* = bind_name self, %self.loc17_16.1 -// CHECK:STDOUT: @F.%.loc17: Base* = addr_pattern @F.%self +// CHECK:STDOUT: %.loc17_26: type = ptr_type %Base [template = constants.%.3] +// CHECK:STDOUT: %self.loc17_16.1: %.3 = param self +// CHECK:STDOUT: @F.%self: %.3 = bind_name self, %self.loc17_16.1 +// CHECK:STDOUT: @F.%.loc17: %.3 = addr_pattern @F.%self // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { +// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc25: type = ptr_type Derived [template = constants.%.9] -// CHECK:STDOUT: %p.loc25_9.1: Derived* = param p -// CHECK:STDOUT: @Call.%p: Derived* = bind_name p, %p.loc25_9.1 +// CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.9] +// CHECK:STDOUT: %p.loc25_9.1: %.9 = param p +// CHECK:STDOUT: @Call.%p: %.9 = bind_name p, %p.loc25_9.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,13 +80,13 @@ 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: = field_decl a, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %.loc14_23: type = ptr_type Base [template = constants.%.3] -// CHECK:STDOUT: %self.loc14_13.1: Base* = param self -// CHECK:STDOUT: %self.loc14_13.3: Base* = bind_name self, %self.loc14_13.1 -// CHECK:STDOUT: %.loc14_8: Base* = addr_pattern %self.loc14_13.3 +// CHECK:STDOUT: %.loc14_23: type = ptr_type %Base [template = constants.%.3] +// CHECK:STDOUT: %self.loc14_13.1: %.3 = param self +// CHECK:STDOUT: %self.loc14_13.3: %.3 = bind_name self, %self.loc14_13.1 +// CHECK:STDOUT: %.loc14_8: %.3 = addr_pattern %self.loc14_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -97,7 +97,7 @@ 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: = base_decl Base, element0 [template] +// CHECK:STDOUT: %.loc22: %.7 = base_decl %Base, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -107,29 +107,29 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self: Base*]() { +// CHECK:STDOUT: fn @F[addr %self: %.3]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Base* = name_ref self, %self -// CHECK:STDOUT: %.loc18_4: ref Base = deref %self.ref -// CHECK:STDOUT: %a.ref: = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %self.ref: %.3 = name_ref self, %self +// 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: %.loc18_10: ref i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %.loc18_15: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: assign %.loc18_10, %.loc18_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p: Derived*) { +// CHECK:STDOUT: fn @Call(%p: %.9) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p -// CHECK:STDOUT: %.loc26_4.1: ref Derived = deref %p.ref -// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F] +// CHECK:STDOUT: %p.ref: %.9 = 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: Derived* = addr_of %.loc26_4.1 -// CHECK:STDOUT: %.loc26_9.1: ref Derived = deref %.loc26_4.2 -// CHECK:STDOUT: %.loc26_9.2: ref Base = class_element_access %.loc26_9.1, element0 -// CHECK:STDOUT: %.loc26_9.3: Base* = addr_of %.loc26_9.2 -// CHECK:STDOUT: %.loc26_9.4: Base* = converted %.loc26_4.2, %.loc26_9.3 -// CHECK:STDOUT: %F.call: init () = call %.loc26_7(%.loc26_9.4) +// CHECK:STDOUT: %.loc26_4.2: %.9 = addr_of %.loc26_4.1 +// CHECK:STDOUT: %.loc26_9.1: ref %Derived = deref %.loc26_4.2 +// CHECK:STDOUT: %.loc26_9.2: ref %Base = class_element_access %.loc26_9.1, element0 +// CHECK:STDOUT: %.loc26_9.3: %.3 = addr_of %.loc26_9.2 +// CHECK:STDOUT: %.loc26_9.4: %.3 = converted %.loc26_4.2, %.loc26_9.3 +// CHECK:STDOUT: %F.call: init %.1 = call %.loc26_7(%.loc26_9.4) // 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 01d02a9050e3..d4503efe3687 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -45,30 +45,30 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %F.1: = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type Derived, Base [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [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: = struct_value () [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: = struct_value () [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: Base} [template] +// CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %Base} [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] -// CHECK:STDOUT: %Call: = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: {}*} [template] -// CHECK:STDOUT: %.7: type = ptr_type {.base: Base} [template] -// CHECK:STDOUT: %.8: type = ptr_type Derived [template] +// CHECK:STDOUT: %Call: %Call.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %.3} [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %.8: type = ptr_type %Derived [template] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [template] -// CHECK:STDOUT: %CallIndirect: = struct_value () [template] +// CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [template] // CHECK:STDOUT: %PassDerivedToBase.type: type = fn_type @PassDerivedToBase [template] -// CHECK:STDOUT: %PassDerivedToBase: = struct_value () [template] +// CHECK:STDOUT: %PassDerivedToBase: %PassDerivedToBase.type = struct_value () [template] // CHECK:STDOUT: %PassDerivedToBaseIndirect.type: type = fn_type @PassDerivedToBaseIndirect [template] -// CHECK:STDOUT: %PassDerivedToBaseIndirect: = struct_value () [template] +// CHECK:STDOUT: %PassDerivedToBaseIndirect: %PassDerivedToBaseIndirect.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,46 +84,46 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Derived.decl.loc11: type = class_decl @Derived [template = constants.%Derived] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl.loc18: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %a.loc25_9.1: Derived = param a -// CHECK:STDOUT: @Call.%a: Derived = bind_name a, %a.loc25_9.1 +// CHECK:STDOUT: %a.loc25_9.1: %Derived = param a +// CHECK:STDOUT: @Call.%a: %Derived = bind_name a, %a.loc25_9.1 // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_24.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_24.2: type = converted %int.make_type_32.loc25, %.loc25_24.1 [template = i32] // CHECK:STDOUT: @Call.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallIndirect.decl: = fn_decl @CallIndirect [template = constants.%CallIndirect] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [template = constants.%CallIndirect] { // CHECK:STDOUT: %Derived.ref.loc29: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc29_27: type = ptr_type Derived [template = constants.%.8] -// CHECK:STDOUT: %p.loc29_17.1: Derived* = param p -// CHECK:STDOUT: @CallIndirect.%p: Derived* = bind_name p, %p.loc29_17.1 +// CHECK:STDOUT: %.loc29_27: type = ptr_type %Derived [template = constants.%.8] +// CHECK:STDOUT: %p.loc29_17.1: %.8 = param p +// CHECK:STDOUT: @CallIndirect.%p: %.8 = bind_name p, %p.loc29_17.1 // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_33.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_33.2: type = converted %int.make_type_32.loc29, %.loc29_33.1 [template = i32] // CHECK:STDOUT: @CallIndirect.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %PassDerivedToBase.decl: = fn_decl @PassDerivedToBase [template = constants.%PassDerivedToBase] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %PassDerivedToBase.decl: %PassDerivedToBase.type = fn_decl @PassDerivedToBase [template = constants.%PassDerivedToBase] { // CHECK:STDOUT: %Derived.ref.loc33: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %a.loc33_22.1: Derived = param a -// CHECK:STDOUT: @PassDerivedToBase.%a: Derived = bind_name a, %a.loc33_22.1 +// CHECK:STDOUT: %a.loc33_22.1: %Derived = param a +// CHECK:STDOUT: @PassDerivedToBase.%a: %Derived = bind_name a, %a.loc33_22.1 // CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_37.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_37.2: type = converted %int.make_type_32.loc33, %.loc33_37.1 [template = i32] // CHECK:STDOUT: @PassDerivedToBase.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: = fn_decl @PassDerivedToBaseIndirect [template = constants.%PassDerivedToBaseIndirect] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: %PassDerivedToBaseIndirect.type = fn_decl @PassDerivedToBaseIndirect [template = constants.%PassDerivedToBaseIndirect] { // CHECK:STDOUT: %Derived.ref.loc37: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %.loc37_40: type = ptr_type Derived [template = constants.%.8] -// CHECK:STDOUT: %p.loc37_30.1: Derived* = param p -// CHECK:STDOUT: @PassDerivedToBaseIndirect.%p: Derived* = bind_name p, %p.loc37_30.1 +// CHECK:STDOUT: %.loc37_40: type = ptr_type %Derived [template = constants.%.8] +// CHECK:STDOUT: %p.loc37_30.1: %.8 = param p +// CHECK:STDOUT: @PassDerivedToBaseIndirect.%p: %.8 = bind_name p, %p.loc37_30.1 // CHECK:STDOUT: %int.make_type_32.loc37: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc37_46.1: type = value_of_initializer %int.make_type_32.loc37 [template = i32] // CHECK:STDOUT: %.loc37_46.2: type = converted %int.make_type_32.loc37, %.loc37_46.1 [template = i32] @@ -133,16 +133,16 @@ 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: = base_decl Base, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// 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.ref.loc21: type = name_ref Self, constants.%Derived [template = constants.%Derived] -// CHECK:STDOUT: %self.loc21_8.1: Derived = param self -// CHECK:STDOUT: %self.loc21_8.2: Derived = bind_name self, %self.loc21_8.1 +// CHECK:STDOUT: %self.loc21_8.1: %Derived = param self +// CHECK:STDOUT: %self.loc21_8.2: %Derived = bind_name self, %self.loc21_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] { +// CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %Self.ref.loc22: type = name_ref Self, constants.%Derived [template = constants.%Derived] -// CHECK:STDOUT: %self.loc22_8.1: Derived = param self -// CHECK:STDOUT: %self.loc22_8.2: Derived = bind_name self, %self.loc22_8.1 +// CHECK:STDOUT: %self.loc22_8.1: %Derived = param self +// CHECK:STDOUT: %self.loc22_8.2: %Derived = bind_name self, %self.loc22_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -154,19 +154,19 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %self.loc14_8.1: Base = param self -// CHECK:STDOUT: %self.loc14_8.2: Base = bind_name self, %self.loc14_8.1 +// CHECK:STDOUT: %self.loc14_8.1: %Base = param self +// CHECK:STDOUT: %self.loc14_8.2: %Base = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_32.loc14, %.loc14_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc14: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] { +// CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %self.loc15_8.1: Derived = param self -// CHECK:STDOUT: %self.loc15_8.2: Derived = bind_name self, %self.loc15_8.1 +// CHECK:STDOUT: %self.loc15_8.1: %Derived = param self +// CHECK:STDOUT: %self.loc15_8.2: %Derived = bind_name self, %self.loc15_8.1 // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_28.2: type = converted %int.make_type_32.loc15, %.loc15_28.1 [template = i32] @@ -181,50 +181,50 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[@Base.%self.loc14_8.2: Base]() -> i32; +// CHECK:STDOUT: fn @F.1[@Base.%self.loc14_8.2: %Base]() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G.1[@Base.%self.loc15_8.2: Derived]() -> i32; +// CHECK:STDOUT: fn @G.1[@Base.%self.loc15_8.2: %Derived]() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[@Derived.%self.loc21_8.2: Derived](); +// CHECK:STDOUT: fn @F.2[@Derived.%self.loc21_8.2: %Derived](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G.2[@Derived.%self.loc22_8.2: Derived](); +// CHECK:STDOUT: fn @G.2[@Derived.%self.loc22_8.2: %Derived](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%a: Derived) -> i32 { +// CHECK:STDOUT: fn @Call(%a: %Derived) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: Derived = name_ref a, %a +// CHECK:STDOUT: %a.ref: %Derived = name_ref a, %a // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @Base.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc26_11: = bound_method %a.ref, %F.ref -// CHECK:STDOUT: %.loc26_20.1: ref Base = class_element_access %a.ref, element0 -// CHECK:STDOUT: %.loc26_20.2: ref Base = converted %a.ref, %.loc26_20.1 -// CHECK:STDOUT: %.loc26_20.3: Base = bind_value %.loc26_20.2 +// CHECK:STDOUT: %.loc26_20.1: ref %Base = class_element_access %a.ref, element0 +// CHECK:STDOUT: %.loc26_20.2: ref %Base = converted %a.ref, %.loc26_20.1 +// CHECK:STDOUT: %.loc26_20.3: %Base = bind_value %.loc26_20.2 // CHECK:STDOUT: %F.call: init i32 = call %.loc26_11(%.loc26_20.3) // CHECK:STDOUT: %.loc26_22.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc26_22.2: i32 = converted %F.call, %.loc26_22.1 // CHECK:STDOUT: return %.loc26_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallIndirect(%p: Derived*) -> i32 { +// CHECK:STDOUT: fn @CallIndirect(%p: %.8) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F.1] -// CHECK:STDOUT: %.loc30_11.1: ref Derived = deref %p.ref +// 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 // CHECK:STDOUT: %.loc30_11.2: = bound_method %.loc30_11.1, %F.ref -// CHECK:STDOUT: %.loc30_21.1: ref Base = class_element_access %.loc30_11.1, element0 -// CHECK:STDOUT: %.loc30_21.2: ref Base = converted %.loc30_11.1, %.loc30_21.1 -// CHECK:STDOUT: %.loc30_21.3: Base = bind_value %.loc30_21.2 +// CHECK:STDOUT: %.loc30_21.1: ref %Base = class_element_access %.loc30_11.1, element0 +// CHECK:STDOUT: %.loc30_21.2: ref %Base = converted %.loc30_11.1, %.loc30_21.1 +// CHECK:STDOUT: %.loc30_21.3: %Base = bind_value %.loc30_21.2 // CHECK:STDOUT: %F.call: init i32 = call %.loc30_11.2(%.loc30_21.3) // CHECK:STDOUT: %.loc30_23.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc30_23.2: i32 = converted %F.call, %.loc30_23.1 // CHECK:STDOUT: return %.loc30_23.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @PassDerivedToBase(%a: Derived) -> i32 { +// CHECK:STDOUT: fn @PassDerivedToBase(%a: %Derived) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: Derived = name_ref a, %a +// CHECK:STDOUT: %a.ref: %Derived = name_ref a, %a // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %G.ref: = name_ref G, @Base.%G.decl [template = constants.%G.1] +// CHECK:STDOUT: %G.ref: %G.type.1 = name_ref G, @Base.%G.decl [template = constants.%G.1] // CHECK:STDOUT: %.loc34_11: = bound_method %a.ref, %G.ref // CHECK:STDOUT: %G.call: init i32 = call %.loc34_11(%a.ref) // CHECK:STDOUT: %.loc34_22.1: i32 = value_of_initializer %G.call @@ -232,14 +232,14 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: return %.loc34_22.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p: Derived*) -> i32 { +// CHECK:STDOUT: fn @PassDerivedToBaseIndirect(%p: %.8) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %G.ref: = name_ref G, @Base.%G.decl [template = constants.%G.1] -// CHECK:STDOUT: %.loc38_11.1: ref Derived = deref %p.ref +// 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 // CHECK:STDOUT: %.loc38_11.2: = bound_method %.loc38_11.1, %G.ref -// CHECK:STDOUT: %.loc38_11.3: Derived = bind_value %.loc38_11.1 +// CHECK:STDOUT: %.loc38_11.3: %Derived = bind_value %.loc38_11.1 // CHECK:STDOUT: %G.call: init i32 = call %.loc38_11.2(%.loc38_11.3) // CHECK:STDOUT: %.loc38_23.1: i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc38_23.2: i32 = converted %G.call, %.loc38_23.1 diff --git a/toolchain/check/testdata/class/base_method_shadow.carbon b/toolchain/check/testdata/class/base_method_shadow.carbon index ef5327784173..d436817c3a39 100644 --- a/toolchain/check/testdata/class/base_method_shadow.carbon +++ b/toolchain/check/testdata/class/base_method_shadow.carbon @@ -37,33 +37,33 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = ptr_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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] -// CHECK:STDOUT: %.5: type = unbound_element_type B, A [template] -// CHECK:STDOUT: %.6: type = ptr_type B [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [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: = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: A} [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %A} [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: {}*} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.base: A} [template] -// CHECK:STDOUT: %.10: type = unbound_element_type C, B [template] -// CHECK:STDOUT: %.11: type = ptr_type C [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.10: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.11: type = ptr_type %C [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %F.3: = struct_value () [template] -// CHECK:STDOUT: %.12: type = struct_type {.base: B} [template] +// CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] +// CHECK:STDOUT: %.12: type = struct_type {.base: %B} [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.13: type = unbound_element_type D, B [template] -// CHECK:STDOUT: %.14: type = ptr_type D [template] +// CHECK:STDOUT: %.13: type = unbound_element_type %D, %B [template] +// CHECK:STDOUT: %.14: type = ptr_type %D [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] -// CHECK:STDOUT: %Call: = struct_value () [template] -// CHECK:STDOUT: %.15: type = struct_type {.base: {.base: A}*} [template] -// CHECK:STDOUT: %.16: type = ptr_type {.base: B} [template] +// CHECK:STDOUT: %Call: %Call.type = struct_value () [template] +// CHECK:STDOUT: %.15: type = struct_type {.base: %.9} [template] +// CHECK:STDOUT: %.16: type = ptr_type %.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -80,33 +80,33 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { +// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc29_13: type = ptr_type A [template = constants.%.1] -// CHECK:STDOUT: %a.loc29_9.1: A* = param a -// CHECK:STDOUT: @Call.%a: A* = bind_name a, %a.loc29_9.1 +// CHECK:STDOUT: %.loc29_13: type = ptr_type %A [template = constants.%.1] +// CHECK:STDOUT: %a.loc29_9.1: %.1 = param a +// CHECK:STDOUT: @Call.%a: %.1 = bind_name a, %a.loc29_9.1 // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc29_20: type = ptr_type B [template = constants.%.6] -// CHECK:STDOUT: %b.loc29_16.1: B* = param b -// CHECK:STDOUT: @Call.%b: B* = bind_name b, %b.loc29_16.1 +// CHECK:STDOUT: %.loc29_20: type = ptr_type %B [template = constants.%.6] +// CHECK:STDOUT: %b.loc29_16.1: %.6 = param b +// CHECK:STDOUT: @Call.%b: %.6 = bind_name b, %b.loc29_16.1 // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc29_27: type = ptr_type C [template = constants.%.11] -// CHECK:STDOUT: %c.loc29_23.1: C* = param c -// CHECK:STDOUT: @Call.%c: C* = bind_name c, %c.loc29_23.1 +// CHECK:STDOUT: %.loc29_27: type = ptr_type %C [template = constants.%.11] +// CHECK:STDOUT: %c.loc29_23.1: %.11 = param c +// CHECK:STDOUT: @Call.%c: %.11 = bind_name c, %c.loc29_23.1 // CHECK:STDOUT: %D.ref: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc29_34: type = ptr_type D [template = constants.%.14] -// CHECK:STDOUT: %d.loc29_30.1: D* = param d -// CHECK:STDOUT: @Call.%d: D* = bind_name d, %d.loc29_30.1 +// CHECK:STDOUT: %.loc29_34: type = ptr_type %D [template = constants.%.14] +// CHECK:STDOUT: %d.loc29_30.1: %.14 = param d +// CHECK:STDOUT: @Call.%d: %.14 = bind_name d, %d.loc29_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [template = constants.%A] -// CHECK:STDOUT: %.loc12_23: type = ptr_type A [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: A* = param self -// CHECK:STDOUT: %self.loc12_13.3: A* = bind_name self, %self.loc12_13.1 -// CHECK:STDOUT: %.loc12_8: A* = addr_pattern %self.loc12_13.3 +// CHECK:STDOUT: %.loc12_23: type = ptr_type %A [template = constants.%.1] +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 +// CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -116,13 +116,13 @@ 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: = base_decl A, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// 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.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %.loc17_23: type = ptr_type B [template = constants.%.6] -// CHECK:STDOUT: %self.loc17_13.1: B* = param self -// CHECK:STDOUT: %self.loc17_13.3: B* = bind_name self, %self.loc17_13.1 -// CHECK:STDOUT: %.loc17_8: B* = addr_pattern %self.loc17_13.3 +// CHECK:STDOUT: %.loc17_23: type = ptr_type %B [template = constants.%.6] +// CHECK:STDOUT: %self.loc17_13.1: %.6 = param self +// CHECK:STDOUT: %self.loc17_13.3: %.6 = bind_name self, %self.loc17_13.1 +// CHECK:STDOUT: %.loc17_8: %.6 = addr_pattern %self.loc17_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -134,13 +134,13 @@ 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: = base_decl B, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] { +// CHECK:STDOUT: %.loc21: %.10 = base_decl %B, element0 [template] +// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc22_23: type = ptr_type C [template = constants.%.11] -// CHECK:STDOUT: %self.loc22_13.1: C* = param self -// CHECK:STDOUT: %self.loc22_13.3: C* = bind_name self, %self.loc22_13.1 -// CHECK:STDOUT: %.loc22_8: C* = addr_pattern %self.loc22_13.3 +// CHECK:STDOUT: %.loc22_23: type = ptr_type %C [template = constants.%.11] +// CHECK:STDOUT: %self.loc22_13.1: %.11 = param self +// CHECK:STDOUT: %self.loc22_13.3: %.11 = bind_name self, %self.loc22_13.1 +// CHECK:STDOUT: %.loc22_8: %.11 = addr_pattern %self.loc22_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -152,7 +152,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc26: %.13 = base_decl %B, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -160,42 +160,42 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: extend name_scope3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[addr @A.%self.loc12_13.3: A*](); +// CHECK:STDOUT: fn @F.1[addr @A.%self.loc12_13.3: %.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[addr @B.%self.loc17_13.3: B*](); +// CHECK:STDOUT: fn @F.2[addr @B.%self.loc17_13.3: %.6](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3[addr @C.%self.loc22_13.3: C*](); +// CHECK:STDOUT: fn @F.3[addr @C.%self.loc22_13.3: %.11](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%a: A*, %b: B*, %c: C*, %d: D*) { +// CHECK:STDOUT: fn @Call(%a: %.1, %b: %.6, %c: %.11, %d: %.14) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: A* = name_ref a, %a -// CHECK:STDOUT: %.loc30_4.1: ref A = deref %a.ref -// CHECK:STDOUT: %F.ref.loc30: = name_ref F, @A.%F.decl [template = constants.%F.1] +// 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: A* = addr_of %.loc30_4.1 -// CHECK:STDOUT: %F.call.loc30: init () = call %.loc30_7(%.loc30_4.2) -// CHECK:STDOUT: %b.ref: B* = name_ref b, %b -// CHECK:STDOUT: %.loc31_4.1: ref B = deref %b.ref -// CHECK:STDOUT: %F.ref.loc31: = name_ref F, @B.%F.decl [template = constants.%F.2] +// 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: %.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: B* = addr_of %.loc31_4.1 -// CHECK:STDOUT: %F.call.loc31: init () = call %.loc31_7(%.loc31_4.2) -// CHECK:STDOUT: %c.ref: C* = name_ref c, %c -// CHECK:STDOUT: %.loc32_4.1: ref C = deref %c.ref -// CHECK:STDOUT: %F.ref.loc32: = name_ref F, @C.%F.decl [template = constants.%F.3] +// CHECK:STDOUT: %.loc31_4.2: %.6 = addr_of %.loc31_4.1 +// CHECK:STDOUT: %F.call.loc31: init %.2 = call %.loc31_7(%.loc31_4.2) +// CHECK:STDOUT: %c.ref: %.11 = 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: C* = addr_of %.loc32_4.1 -// CHECK:STDOUT: %F.call.loc32: init () = call %.loc32_7(%.loc32_4.2) -// CHECK:STDOUT: %d.ref: D* = name_ref d, %d -// CHECK:STDOUT: %.loc33_4.1: ref D = deref %d.ref -// CHECK:STDOUT: %F.ref.loc33: = name_ref F, @B.%F.decl [template = constants.%F.2] +// CHECK:STDOUT: %.loc32_4.2: %.11 = addr_of %.loc32_4.1 +// CHECK:STDOUT: %F.call.loc32: init %.2 = call %.loc32_7(%.loc32_4.2) +// CHECK:STDOUT: %d.ref: %.14 = 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: D* = addr_of %.loc33_4.1 -// CHECK:STDOUT: %.loc33_9.1: ref D = deref %.loc33_4.2 -// CHECK:STDOUT: %.loc33_9.2: ref B = class_element_access %.loc33_9.1, element0 -// CHECK:STDOUT: %.loc33_9.3: B* = addr_of %.loc33_9.2 -// CHECK:STDOUT: %.loc33_9.4: B* = converted %.loc33_4.2, %.loc33_9.3 -// CHECK:STDOUT: %F.call.loc33: init () = call %.loc33_7(%.loc33_9.4) +// CHECK:STDOUT: %.loc33_4.2: %.14 = addr_of %.loc33_4.1 +// CHECK:STDOUT: %.loc33_9.1: ref %D = deref %.loc33_4.2 +// CHECK:STDOUT: %.loc33_9.2: ref %B = class_element_access %.loc33_9.1, element0 +// CHECK:STDOUT: %.loc33_9.3: %.6 = addr_of %.loc33_9.2 +// CHECK:STDOUT: %.loc33_9.4: %.6 = converted %.loc33_4.2, %.loc33_9.3 +// CHECK:STDOUT: %F.call.loc33: init %.2 = call %.loc33_7(%.loc33_9.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 283e52b3dc94..434b00dcda82 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -32,15 +32,15 @@ fn Run() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,14 +52,14 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc21_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_15.1: type = value_of_initializer %int.make_type_32.loc21_15 [template = i32] // CHECK:STDOUT: %.loc21_15.2: type = converted %int.make_type_32.loc21_15, %.loc21_15.1 [template = i32] @@ -70,8 +70,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_32.loc21_23, %.loc21_23.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_13.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_13.2: type = converted %int.make_type_32.loc25, %.loc25_13.1 [template = i32] @@ -80,7 +80,7 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32.loc12_11 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32.loc12_11, %.loc12_11.1 [template = i32] @@ -91,7 +91,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc16_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_32.loc16_11 [template = i32] // CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_32.loc16_11, %.loc16_11.1 [template = i32] @@ -105,7 +105,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_32.loc18, %.loc18_10.1 [template = i32] -// CHECK:STDOUT: %.loc18_8: = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc18_8: %.2 = field_decl k, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -131,7 +131,7 @@ fn Run() -> i32 { // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc26_18: i32 = int_literal 4 [template = constants.%.4] // CHECK:STDOUT: %F.call: init i32 = call %F.ref(%.loc26_18) // CHECK:STDOUT: %.loc26_20.1: i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index 3e9c77d339c9..e1053f8dc455 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -20,12 +20,12 @@ class C { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [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: type = ptr_type {.a: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,15 +35,15 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc12_8.1: C = param c -// CHECK:STDOUT: %c.loc12_8.2: C = bind_name c, %c.loc12_8.1 +// CHECK:STDOUT: %c.loc12_8.1: %C = param c +// CHECK:STDOUT: %c.loc12_8.2: %C = bind_name c, %c.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_32.loc12, %.loc12_17.1 [template = i32] @@ -52,7 +52,7 @@ class C { // 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc14_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -62,10 +62,10 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(@C.%c.loc12_8.2: C) -> i32 { +// CHECK:STDOUT: fn @F(@C.%c.loc12_8.2: %C) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: C = name_ref c, @C.%c.loc12_8.2 -// CHECK:STDOUT: %a.ref: = name_ref a, @C.%.loc14_8 [template = @C.%.loc14_8] +// CHECK:STDOUT: %c.ref: %C = name_ref c, @C.%c.loc12_8.2 +// CHECK:STDOUT: %a.ref: %.2 = 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 0a49a00e1adf..b360409c52a6 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -43,27 +43,27 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [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: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32, .c: i32} [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: %.4: type = ptr_type %.3 [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: %AccessDerived.type: type = fn_type @AccessDerived [template] -// CHECK:STDOUT: %AccessDerived: = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.base: Base, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %AccessDerived: %AccessDerived.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4, .d: i32, .e: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] // CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [template] -// CHECK:STDOUT: %AccessBase: = struct_value () [template] -// CHECK:STDOUT: %.11: type = ptr_type Derived [template] +// CHECK:STDOUT: %AccessBase: %AccessBase.type = struct_value () [template] +// CHECK:STDOUT: %.11: type = ptr_type %Derived [template] // CHECK:STDOUT: %.12: type = ptr_type i32 [template] // CHECK:STDOUT: %AccessDerivedIndirect.type: type = fn_type @AccessDerivedIndirect [template] -// CHECK:STDOUT: %AccessDerivedIndirect: = struct_value () [template] +// CHECK:STDOUT: %AccessDerivedIndirect: %AccessDerivedIndirect.type = struct_value () [template] // CHECK:STDOUT: %AccessBaseIndirect.type: type = fn_type @AccessBaseIndirect [template] -// CHECK:STDOUT: %AccessBaseIndirect: = struct_value () [template] +// CHECK:STDOUT: %AccessBaseIndirect: %AccessBaseIndirect.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -78,55 +78,55 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessDerived.decl: = fn_decl @AccessDerived [template = constants.%AccessDerived] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessDerived.decl: %AccessDerived.type = fn_decl @AccessDerived [template = constants.%AccessDerived] { // CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc24_18.1: Derived = param d -// CHECK:STDOUT: @AccessDerived.%d: Derived = bind_name d, %d.loc24_18.1 +// CHECK:STDOUT: %d.loc24_18.1: %Derived = param d +// CHECK:STDOUT: @AccessDerived.%d: %Derived = bind_name d, %d.loc24_18.1 // CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_33.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] // CHECK:STDOUT: %.loc24_33.2: type = converted %int.make_type_32.loc24, %.loc24_33.1 [template = i32] // CHECK:STDOUT: @AccessDerived.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessBase.decl: = fn_decl @AccessBase [template = constants.%AccessBase] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessBase.decl: %AccessBase.type = fn_decl @AccessBase [template = constants.%AccessBase] { // CHECK:STDOUT: %Derived.ref.loc28: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc28_15.1: Derived = param d -// CHECK:STDOUT: @AccessBase.%d: Derived = bind_name d, %d.loc28_15.1 +// CHECK:STDOUT: %d.loc28_15.1: %Derived = param d +// CHECK:STDOUT: @AccessBase.%d: %Derived = bind_name d, %d.loc28_15.1 // CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_30.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] // CHECK:STDOUT: %.loc28_30.2: type = converted %int.make_type_32.loc28, %.loc28_30.1 [template = i32] // CHECK:STDOUT: @AccessBase.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessDerivedIndirect.decl: = fn_decl @AccessDerivedIndirect [template = constants.%AccessDerivedIndirect] { +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessDerivedIndirect.decl: %AccessDerivedIndirect.type = fn_decl @AccessDerivedIndirect [template = constants.%AccessDerivedIndirect] { // CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc32_36: type = ptr_type Derived [template = constants.%.11] -// CHECK:STDOUT: %p.loc32_26.1: Derived* = param p -// CHECK:STDOUT: @AccessDerivedIndirect.%p: Derived* = bind_name p, %p.loc32_26.1 +// CHECK:STDOUT: %.loc32_36: type = ptr_type %Derived [template = constants.%.11] +// CHECK:STDOUT: %p.loc32_26.1: %.11 = param p +// CHECK:STDOUT: @AccessDerivedIndirect.%p: %.11 = bind_name p, %p.loc32_26.1 // CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_45.1: type = value_of_initializer %int.make_type_32.loc32 [template = i32] // CHECK:STDOUT: %.loc32_45.2: type = converted %int.make_type_32.loc32, %.loc32_45.1 [template = i32] // CHECK:STDOUT: %.loc32_45.3: type = ptr_type i32 [template = constants.%.12] -// CHECK:STDOUT: @AccessDerivedIndirect.%return: ref i32* = var +// CHECK:STDOUT: @AccessDerivedIndirect.%return: ref %.12 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessBaseIndirect.decl: = fn_decl @AccessBaseIndirect [template = constants.%AccessBaseIndirect] { +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessBaseIndirect.decl: %AccessBaseIndirect.type = fn_decl @AccessBaseIndirect [template = constants.%AccessBaseIndirect] { // CHECK:STDOUT: %Derived.ref.loc36: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc36_33: type = ptr_type Derived [template = constants.%.11] -// CHECK:STDOUT: %p.loc36_23.1: Derived* = param p -// CHECK:STDOUT: @AccessBaseIndirect.%p: Derived* = bind_name p, %p.loc36_23.1 +// CHECK:STDOUT: %.loc36_33: type = ptr_type %Derived [template = constants.%.11] +// CHECK:STDOUT: %p.loc36_23.1: %.11 = param p +// CHECK:STDOUT: @AccessBaseIndirect.%p: %.11 = bind_name p, %p.loc36_23.1 // CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_42.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] // CHECK:STDOUT: %.loc36_42.2: type = converted %int.make_type_32.loc36, %.loc36_42.1 [template = i32] // CHECK:STDOUT: %.loc36_42.3: type = ptr_type i32 [template = constants.%.12] -// CHECK:STDOUT: @AccessBaseIndirect.%return: ref i32* = var +// CHECK:STDOUT: @AccessBaseIndirect.%return: ref %.12 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -134,15 +134,15 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = 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: = field_decl c, element2 [template] +// CHECK:STDOUT: %.loc14_8: %.2 = field_decl c, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -153,15 +153,15 @@ 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: = 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: = 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: = field_decl e, element2 [template] +// CHECK:STDOUT: %.loc21_8: %.6 = field_decl e, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -173,49 +173,49 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessDerived(%d: Derived) -> i32 { +// CHECK:STDOUT: fn @AccessDerived(%d: %Derived) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %d.ref.loc25_10: Derived = name_ref d, %d +// CHECK:STDOUT: %d.ref.loc25_10: %Derived = name_ref d, %d // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref.loc25_20: = 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 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessBase(%d: Derived) -> i32 { +// CHECK:STDOUT: fn @AccessBase(%d: %Derived) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %d.ref: Derived = name_ref d, %d +// 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: = 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: %b.ref: %.2 = 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 // CHECK:STDOUT: %.loc29_11.4: i32 = bind_value %.loc29_11.3 // CHECK:STDOUT: return %.loc29_11.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessDerivedIndirect(%p: Derived*) -> i32* { +// CHECK:STDOUT: fn @AccessDerivedIndirect(%p: %.11) -> %.12 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref: = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] -// CHECK:STDOUT: %.loc33_12.1: ref Derived = deref %p.ref +// 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: i32* = addr_of %.loc33_12.2 +// CHECK:STDOUT: %.loc33_10: %.12 = addr_of %.loc33_12.2 // CHECK:STDOUT: return %.loc33_10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessBaseIndirect(%p: Derived*) -> i32* { +// CHECK:STDOUT: fn @AccessBaseIndirect(%p: %.11) -> %.12 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.11 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: = 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: %b.ref: %.2 = 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: i32* = addr_of %.loc37_12.4 +// CHECK:STDOUT: %.loc37_10: %.12 = 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 e11729a0208d..cab094c336d4 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -152,7 +152,7 @@ var c: Other.C = {}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -161,7 +161,7 @@ var c: Other.C = {}; // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C() { @@ -175,8 +175,8 @@ var c: Other.C = {}; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -191,8 +191,8 @@ var c: Other.C = {}; // CHECK:STDOUT: %import_ref.1: type = import_ref ir8, inst+2, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref ir8, inst+3, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -202,9 +202,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: {} = struct_literal () -// CHECK:STDOUT: %.loc6_19.2: init C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_20: init C = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_19.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc6_19.2: init %C = class_init (), file.%c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc6_20: init %C = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -235,7 +235,7 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16: {} = struct_literal () +// CHECK:STDOUT: %.loc16: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -246,8 +246,8 @@ var c: Other.C = {}; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -263,8 +263,8 @@ var c: Other.C = {}; // CHECK:STDOUT: %import_ref.2 = import_ref ir8, inst+3, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir9, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -274,9 +274,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_19.1: {} = struct_literal () -// CHECK:STDOUT: %.loc23_19.2: init C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc23_20: init C = converted %.loc23_19.1, %.loc23_19.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc23_19.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc23_19.2: init %C = class_init (), file.%c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc23_20: init %C = converted %.loc23_19.1, %.loc23_19.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc23_20 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -287,8 +287,8 @@ var c: Other.C = {}; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -304,8 +304,8 @@ var c: Other.C = {}; // CHECK:STDOUT: %import_ref.2 = import_ref ir8, inst+3, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir9, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -315,9 +315,9 @@ var c: Other.C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_19.1: {} = struct_literal () -// CHECK:STDOUT: %.loc22_19.2: init C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc22_20: init C = converted %.loc22_19.1, %.loc22_19.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc22_19.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc22_19.2: init %C = class_init (), file.%c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc22_20: init %C = converted %.loc22_19.1, %.loc22_19.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc22_20 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 32ebdc633919..e78659bd08fe 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -44,47 +44,47 @@ fn ConvertInit() { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [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: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32} [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: %.4: type = ptr_type %.3 [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: %C: type = class_type @C [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: {.a: i32}*, .b: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.base: {.a: i32}*, .b: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.base: A, .b: i32} [template] -// CHECK:STDOUT: %.11: type = unbound_element_type C, B [template] -// CHECK:STDOUT: %.12: type = unbound_element_type C, i32 [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: B, .c: i32} [template] -// CHECK:STDOUT: %.14: type = ptr_type C [template] -// CHECK:STDOUT: %.15: type = ptr_type B [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4, .b: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.11: type = unbound_element_type %C, %B [template] +// CHECK:STDOUT: %.12: type = unbound_element_type %C, i32 [template] +// CHECK:STDOUT: %.13: type = struct_type {.base: %B, .c: i32} [template] +// CHECK:STDOUT: %.14: type = ptr_type %C [template] +// CHECK:STDOUT: %.15: type = ptr_type %B [template] // CHECK:STDOUT: %ConvertCToB.type: type = fn_type @ConvertCToB [template] -// CHECK:STDOUT: %ConvertCToB: = struct_value () [template] -// CHECK:STDOUT: %.16: type = struct_type {.base: {.base: A, .b: i32}*, .c: i32} [template] -// CHECK:STDOUT: %.17: type = ptr_type {.base: {.base: A, .b: i32}*, .c: i32} [template] -// CHECK:STDOUT: %.18: type = ptr_type {.base: B, .c: i32} [template] -// CHECK:STDOUT: %.19: type = ptr_type A [template] +// CHECK:STDOUT: %ConvertCToB: %ConvertCToB.type = struct_value () [template] +// CHECK:STDOUT: %.16: type = struct_type {.base: %.10, .c: i32} [template] +// CHECK:STDOUT: %.17: type = ptr_type %.16 [template] +// CHECK:STDOUT: %.18: type = ptr_type %.13 [template] +// CHECK:STDOUT: %.19: type = ptr_type %A [template] // CHECK:STDOUT: %ConvertBToA.type: type = fn_type @ConvertBToA [template] -// CHECK:STDOUT: %ConvertBToA: = struct_value () [template] +// CHECK:STDOUT: %ConvertBToA: %ConvertBToA.type = struct_value () [template] // CHECK:STDOUT: %ConvertCToA.type: type = fn_type @ConvertCToA [template] -// CHECK:STDOUT: %ConvertCToA: = struct_value () [template] +// CHECK:STDOUT: %ConvertCToA: %ConvertCToA.type = struct_value () [template] // CHECK:STDOUT: %ConvertValue.type: type = fn_type @ConvertValue [template] -// CHECK:STDOUT: %ConvertValue: = struct_value () [template] +// CHECK:STDOUT: %ConvertValue: %ConvertValue.type = struct_value () [template] // CHECK:STDOUT: %ConvertRef.type: type = fn_type @ConvertRef [template] -// CHECK:STDOUT: %ConvertRef: = struct_value () [template] +// CHECK:STDOUT: %ConvertRef: %ConvertRef.type = struct_value () [template] // CHECK:STDOUT: %ConvertInit.type: type = fn_type @ConvertInit [template] -// CHECK:STDOUT: %ConvertInit: = struct_value () [template] +// CHECK:STDOUT: %ConvertInit: %ConvertInit.type = struct_value () [template] // CHECK:STDOUT: %.20: i32 = int_literal 1 [template] // CHECK:STDOUT: %.21: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.22: type = struct_type {.base: {.a: i32}, .b: i32} [template] +// CHECK:STDOUT: %.22: type = struct_type {.base: %.3, .b: i32} [template] // CHECK:STDOUT: %.23: i32 = int_literal 3 [template] -// CHECK:STDOUT: %.24: type = struct_type {.base: {.base: {.a: i32}, .b: i32}, .c: i32} [template] -// CHECK:STDOUT: %struct.1: A = struct_value (%.20) [template] -// CHECK:STDOUT: %struct.2: B = struct_value (%struct.1, %.21) [template] -// CHECK:STDOUT: %struct.3: C = struct_value (%struct.2, %.23) [template] +// CHECK:STDOUT: %.24: type = struct_type {.base: %.22, .c: i32} [template] +// CHECK:STDOUT: %struct.1: %A = struct_value (%.20) [template] +// CHECK:STDOUT: %struct.2: %B = struct_value (%struct.1, %.21) [template] +// CHECK:STDOUT: %struct.3: %C = struct_value (%struct.2, %.23) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,60 +102,60 @@ fn ConvertInit() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %ConvertCToB.decl: = fn_decl @ConvertCToB [template = constants.%ConvertCToB] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertCToB.decl: %ConvertCToB.type = fn_decl @ConvertCToB [template = constants.%ConvertCToB] { // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc25_20: type = ptr_type C [template = constants.%.14] -// CHECK:STDOUT: %p.loc25_16.1: C* = param p -// CHECK:STDOUT: @ConvertCToB.%p: C* = bind_name p, %p.loc25_16.1 +// CHECK:STDOUT: %.loc25_20: type = ptr_type %C [template = constants.%.14] +// CHECK:STDOUT: %p.loc25_16.1: %.14 = param p +// CHECK:STDOUT: @ConvertCToB.%p: %.14 = bind_name p, %p.loc25_16.1 // CHECK:STDOUT: %B.ref.loc25: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc25_27: type = ptr_type B [template = constants.%.15] -// CHECK:STDOUT: @ConvertCToB.%return: ref B* = var +// CHECK:STDOUT: %.loc25_27: type = ptr_type %B [template = constants.%.15] +// CHECK:STDOUT: @ConvertCToB.%return: ref %.15 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertBToA.decl: = fn_decl @ConvertBToA [template = constants.%ConvertBToA] { +// CHECK:STDOUT: %ConvertBToA.decl: %ConvertBToA.type = fn_decl @ConvertBToA [template = constants.%ConvertBToA] { // CHECK:STDOUT: %B.ref.loc26: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc26_20: type = ptr_type B [template = constants.%.15] -// CHECK:STDOUT: %p.loc26_16.1: B* = param p -// CHECK:STDOUT: @ConvertBToA.%p: B* = bind_name p, %p.loc26_16.1 +// CHECK:STDOUT: %.loc26_20: type = ptr_type %B [template = constants.%.15] +// CHECK:STDOUT: %p.loc26_16.1: %.15 = param p +// CHECK:STDOUT: @ConvertBToA.%p: %.15 = bind_name p, %p.loc26_16.1 // CHECK:STDOUT: %A.ref.loc26: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc26_27: type = ptr_type A [template = constants.%.19] -// CHECK:STDOUT: @ConvertBToA.%return: ref A* = var +// CHECK:STDOUT: %.loc26_27: type = ptr_type %A [template = constants.%.19] +// CHECK:STDOUT: @ConvertBToA.%return: ref %.19 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertCToA.decl: = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { +// CHECK:STDOUT: %ConvertCToA.decl: %ConvertCToA.type = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc27_20: type = ptr_type C [template = constants.%.14] -// CHECK:STDOUT: %p.loc27_16.1: C* = param p -// CHECK:STDOUT: @ConvertCToA.%p: C* = bind_name p, %p.loc27_16.1 +// CHECK:STDOUT: %.loc27_20: type = ptr_type %C [template = constants.%.14] +// CHECK:STDOUT: %p.loc27_16.1: %.14 = param p +// CHECK:STDOUT: @ConvertCToA.%p: %.14 = bind_name p, %p.loc27_16.1 // CHECK:STDOUT: %A.ref.loc27: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc27_27: type = ptr_type A [template = constants.%.19] -// CHECK:STDOUT: @ConvertCToA.%return: ref A* = var +// CHECK:STDOUT: %.loc27_27: type = ptr_type %A [template = constants.%.19] +// CHECK:STDOUT: @ConvertCToA.%return: ref %.19 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertValue.decl: = fn_decl @ConvertValue [template = constants.%ConvertValue] { +// CHECK:STDOUT: %ConvertValue.decl: %ConvertValue.type = fn_decl @ConvertValue [template = constants.%ConvertValue] { // CHECK:STDOUT: %C.ref.loc29: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc29_17.1: C = param c -// CHECK:STDOUT: @ConvertValue.%c: C = bind_name c, %c.loc29_17.1 +// CHECK:STDOUT: %c.loc29_17.1: %C = param c +// CHECK:STDOUT: @ConvertValue.%c: %C = bind_name c, %c.loc29_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertRef.decl: = fn_decl @ConvertRef [template = constants.%ConvertRef] { +// CHECK:STDOUT: %ConvertRef.decl: %ConvertRef.type = fn_decl @ConvertRef [template = constants.%ConvertRef] { // CHECK:STDOUT: %C.ref.loc33: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc33_19: type = ptr_type C [template = constants.%.14] -// CHECK:STDOUT: %c.loc33_15.1: C* = param c -// CHECK:STDOUT: @ConvertRef.%c: C* = bind_name c, %c.loc33_15.1 +// CHECK:STDOUT: %.loc33_19: type = ptr_type %C [template = constants.%.14] +// CHECK:STDOUT: %c.loc33_15.1: %.14 = param c +// CHECK:STDOUT: @ConvertRef.%c: %.14 = bind_name c, %c.loc33_15.1 // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc33_26: type = ptr_type A [template = constants.%.19] -// CHECK:STDOUT: @ConvertRef.%return: ref A* = var +// CHECK:STDOUT: %.loc33_26: type = ptr_type %A [template = constants.%.19] +// CHECK:STDOUT: @ConvertRef.%return: ref %.19 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertInit.decl: = fn_decl @ConvertInit [template = constants.%ConvertInit] {} +// CHECK:STDOUT: %ConvertInit.decl: %ConvertInit.type = fn_decl @ConvertInit [template = constants.%ConvertInit] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -164,11 +164,11 @@ 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: = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc17_8: %.6 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -179,11 +179,11 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc21: %.11 = 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: = field_decl c, element1 [template] +// CHECK:STDOUT: %.loc22_8: %.12 = field_decl c, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -194,58 +194,58 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertCToB(%p: C*) -> B* { +// CHECK:STDOUT: fn @ConvertCToB(%p: %.14) -> %.15 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: C* = 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: B* = addr_of %.loc25_39.2 -// CHECK:STDOUT: %.loc25_39.4: B* = converted %p.ref, %.loc25_39.3 +// CHECK:STDOUT: %p.ref: %.14 = 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: %.15 = addr_of %.loc25_39.2 +// CHECK:STDOUT: %.loc25_39.4: %.15 = converted %p.ref, %.loc25_39.3 // CHECK:STDOUT: return %.loc25_39.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertBToA(%p: B*) -> A* { +// CHECK:STDOUT: fn @ConvertBToA(%p: %.15) -> %.19 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: B* = 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: A* = addr_of %.loc26_39.2 -// CHECK:STDOUT: %.loc26_39.4: A* = converted %p.ref, %.loc26_39.3 +// CHECK:STDOUT: %p.ref: %.15 = 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: %.19 = addr_of %.loc26_39.2 +// CHECK:STDOUT: %.loc26_39.4: %.19 = converted %p.ref, %.loc26_39.3 // CHECK:STDOUT: return %.loc26_39.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertCToA(%p: C*) -> A* { +// CHECK:STDOUT: fn @ConvertCToA(%p: %.14) -> %.19 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: C* = 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: A* = addr_of %.loc27_39.3 -// CHECK:STDOUT: %.loc27_39.5: A* = converted %p.ref, %.loc27_39.4 +// CHECK:STDOUT: %p.ref: %.14 = 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: %.19 = addr_of %.loc27_39.3 +// CHECK:STDOUT: %.loc27_39.5: %.19 = converted %p.ref, %.loc27_39.4 // CHECK:STDOUT: return %.loc27_39.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertValue(%c: C) { +// CHECK:STDOUT: fn @ConvertValue(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %.loc30_15.1: ref B = class_element_access %c.ref, element0 -// CHECK:STDOUT: %.loc30_15.2: ref A = class_element_access %.loc30_15.1, element0 -// CHECK:STDOUT: %.loc30_15.3: ref A = converted %c.ref, %.loc30_15.2 -// CHECK:STDOUT: %.loc30_15.4: A = bind_value %.loc30_15.3 -// CHECK:STDOUT: %a: A = bind_name a, %.loc30_15.4 +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %.loc30_15.1: ref %B = class_element_access %c.ref, element0 +// CHECK:STDOUT: %.loc30_15.2: ref %A = class_element_access %.loc30_15.1, element0 +// CHECK:STDOUT: %.loc30_15.3: ref %A = converted %c.ref, %.loc30_15.2 +// CHECK:STDOUT: %.loc30_15.4: %A = bind_value %.loc30_15.3 +// CHECK:STDOUT: %a: %A = bind_name a, %.loc30_15.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertRef(%c: C*) -> A* { +// CHECK:STDOUT: fn @ConvertRef(%c: %.14) -> %.19 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: C* = name_ref c, %c -// CHECK:STDOUT: %.loc34_12: ref C = deref %c.ref +// CHECK:STDOUT: %c.ref: %.14 = name_ref c, %c +// CHECK:STDOUT: %.loc34_12: ref %C = deref %c.ref // CHECK:STDOUT: %A.ref: 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: A* = addr_of %.loc34_15.3 +// 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: %.19 = addr_of %.loc34_15.3 // CHECK:STDOUT: return %.loc34_10 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -253,33 +253,33 @@ 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_literal 1 [template = constants.%.20] -// CHECK:STDOUT: %.loc38_39.1: {.a: i32} = struct_literal (%.loc38_38) +// CHECK:STDOUT: %.loc38_39.1: %.3 = struct_literal (%.loc38_38) // CHECK:STDOUT: %.loc38_47: i32 = int_literal 2 [template = constants.%.21] -// CHECK:STDOUT: %.loc38_48.1: {.base: {.a: i32}, .b: i32} = struct_literal (%.loc38_39.1, %.loc38_47) +// CHECK:STDOUT: %.loc38_48.1: %.22 = struct_literal (%.loc38_39.1, %.loc38_47) // CHECK:STDOUT: %.loc38_56: i32 = int_literal 3 [template = constants.%.23] -// CHECK:STDOUT: %.loc38_57.1: {.base: {.base: {.a: i32}, .b: i32}, .c: i32} = struct_literal (%.loc38_48.1, %.loc38_56) +// CHECK:STDOUT: %.loc38_57.1: %.24 = 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_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.%.20] -// 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_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.%.21] -// 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_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.%.23] -// 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 -// CHECK:STDOUT: %.loc38_63.1: ref B = class_element_access %.loc38_59, element0 -// CHECK:STDOUT: %.loc38_63.2: ref A = class_element_access %.loc38_63.1, element0 -// CHECK:STDOUT: %.loc38_63.3: ref A = converted %.loc38_59, %.loc38_63.2 -// CHECK:STDOUT: %.loc38_63.4: A = bind_value %.loc38_63.3 -// CHECK:STDOUT: %a: A = bind_name a, %.loc38_63.4 +// 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 +// CHECK:STDOUT: %.loc38_63.1: ref %B = class_element_access %.loc38_59, element0 +// CHECK:STDOUT: %.loc38_63.2: ref %A = class_element_access %.loc38_63.1, element0 +// CHECK:STDOUT: %.loc38_63.3: ref %A = converted %.loc38_59, %.loc38_63.2 +// CHECK:STDOUT: %.loc38_63.4: %A = bind_value %.loc38_63.3 +// CHECK:STDOUT: %a: %A = bind_name a, %.loc38_63.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index fe304945ff53..dd0d7610c6cf 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -97,18 +97,18 @@ class StructAdapter { // 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: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type SomeClass, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %SomeClass, i32 [template] // CHECK:STDOUT: %StaticMemberFunction.type: type = fn_type @StaticMemberFunction [template] -// CHECK:STDOUT: %StaticMemberFunction: = struct_value () [template] +// CHECK:STDOUT: %StaticMemberFunction: %StaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %AdapterMethod.type: type = fn_type @AdapterMethod [template] -// CHECK:STDOUT: %AdapterMethod: = struct_value () [template] +// CHECK:STDOUT: %AdapterMethod: %AdapterMethod.type = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %TestStaticMemberFunction.type: type = fn_type @TestStaticMemberFunction [template] -// CHECK:STDOUT: %TestStaticMemberFunction: = struct_value () [template] +// CHECK:STDOUT: %TestStaticMemberFunction: %TestStaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %TestAdapterMethod.type: type = fn_type @TestAdapterMethod [template] -// CHECK:STDOUT: %TestAdapterMethod: = struct_value () [template] +// CHECK:STDOUT: %TestAdapterMethod: %TestAdapterMethod.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -122,24 +122,24 @@ class StructAdapter { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClassAdapter.decl.loc4: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SomeClassAdapter.decl.loc15: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} -// CHECK:STDOUT: %TestStaticMemberFunction.decl: = fn_decl @TestStaticMemberFunction [template = constants.%TestStaticMemberFunction] { +// CHECK:STDOUT: %TestStaticMemberFunction.decl: %TestStaticMemberFunction.type = fn_decl @TestStaticMemberFunction [template = constants.%TestStaticMemberFunction] { // CHECK:STDOUT: %SomeClassAdapter.ref.loc19: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc19_29.1: SomeClassAdapter = param a -// CHECK:STDOUT: @TestStaticMemberFunction.%a: SomeClassAdapter = bind_name a, %a.loc19_29.1 +// CHECK:STDOUT: %a.loc19_29.1: %SomeClassAdapter = param a +// CHECK:STDOUT: @TestStaticMemberFunction.%a: %SomeClassAdapter = bind_name a, %a.loc19_29.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %TestAdapterMethod.decl: = fn_decl @TestAdapterMethod [template = constants.%TestAdapterMethod] { +// CHECK:STDOUT: %TestAdapterMethod.decl: %TestAdapterMethod.type = fn_decl @TestAdapterMethod [template = constants.%TestAdapterMethod] { // CHECK:STDOUT: %SomeClassAdapter.ref.loc23: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc23_22.1: SomeClassAdapter = param a -// CHECK:STDOUT: @TestAdapterMethod.%a: SomeClassAdapter = bind_name a, %a.loc23_22.1 +// CHECK:STDOUT: %a.loc23_22.1: %SomeClassAdapter = param a +// CHECK:STDOUT: @TestAdapterMethod.%a: %SomeClassAdapter = bind_name a, %a.loc23_22.1 // CHECK:STDOUT: } // 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: adapt_decl %SomeClass // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -150,16 +150,16 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc7_8: %.2 = 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: = field_decl b, element1 [template] -// CHECK:STDOUT: %StaticMemberFunction.decl: = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} -// CHECK:STDOUT: %AdapterMethod.decl: = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { +// CHECK:STDOUT: %.loc8_8: %.2 = 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: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %self.loc12_20.1: SomeClassAdapter = param self -// CHECK:STDOUT: %self.loc12_20.2: SomeClassAdapter = bind_name self, %self.loc12_20.1 +// CHECK:STDOUT: %self.loc12_20.1: %SomeClassAdapter = param self +// CHECK:STDOUT: %self.loc12_20.2: %SomeClassAdapter = bind_name self, %self.loc12_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -174,22 +174,22 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: fn @StaticMemberFunction(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @AdapterMethod[@SomeClass.%self.loc12_20.2: SomeClassAdapter](); +// CHECK:STDOUT: fn @AdapterMethod[@SomeClass.%self.loc12_20.2: %SomeClassAdapter](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestStaticMemberFunction(%a: SomeClassAdapter) { +// CHECK:STDOUT: fn @TestStaticMemberFunction(%a: %SomeClassAdapter) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %StaticMemberFunction.ref: = name_ref StaticMemberFunction, @SomeClass.%StaticMemberFunction.decl [template = constants.%StaticMemberFunction] -// CHECK:STDOUT: %StaticMemberFunction.call: init () = call %StaticMemberFunction.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAdapterMethod(%a: SomeClassAdapter) { +// CHECK:STDOUT: fn @TestAdapterMethod(%a: %SomeClassAdapter) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %AdapterMethod.ref: = name_ref AdapterMethod, @SomeClass.%AdapterMethod.decl [template = constants.%AdapterMethod] +// 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 () = call %.loc24(%a.ref) +// CHECK:STDOUT: %AdapterMethod.call: init %.1 = call %.loc24(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -199,12 +199,12 @@ class StructAdapter { // 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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -217,18 +217,18 @@ class StructAdapter { // CHECK:STDOUT: %Core: = namespace [template] {} // 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: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc12_6.1: SomeClassAdapter = param a -// CHECK:STDOUT: @F.2.%a: SomeClassAdapter = bind_name a, %a.loc12_6.1 +// CHECK:STDOUT: %a.loc12_6.1: %SomeClassAdapter = param a +// CHECK:STDOUT: @F.2.%a: %SomeClassAdapter = bind_name a, %a.loc12_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SomeClass [template = constants.%SomeClass] -// CHECK:STDOUT: %self.loc5_8.1: SomeClass = param self -// CHECK:STDOUT: %self.loc5_8.2: SomeClass = bind_name self, %self.loc5_8.1 +// CHECK:STDOUT: %self.loc5_8.1: %SomeClass = param self +// CHECK:STDOUT: %self.loc5_8.2: %SomeClass = bind_name self, %self.loc5_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -238,21 +238,21 @@ class StructAdapter { // 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: adapt_decl %SomeClass // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter // CHECK:STDOUT: extend name_scope2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[@SomeClass.%self.loc5_8.2: SomeClass](); +// CHECK:STDOUT: fn @F.1[@SomeClass.%self.loc5_8.2: %SomeClass](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%a: SomeClassAdapter) { +// CHECK:STDOUT: fn @F.2(%a: %SomeClassAdapter) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %F.ref: = name_ref F, @SomeClass.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a +// CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @SomeClass.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc20: = bound_method %a.ref, %F.ref -// CHECK:STDOUT: %F.call: init () = call %.loc20() [template = ] +// CHECK:STDOUT: %F.call: init %.1 = call %.loc20() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -262,13 +262,13 @@ class StructAdapter { // 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: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type SomeClass, i32 [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: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -280,14 +280,14 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc13_6.1: SomeClassAdapter = param a -// CHECK:STDOUT: @F.%a: SomeClassAdapter = bind_name a, %a.loc13_6.1 +// CHECK:STDOUT: %a.loc13_6.1: %SomeClassAdapter = param a +// CHECK:STDOUT: @F.%a: %SomeClassAdapter = bind_name a, %a.loc13_6.1 // 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] @@ -299,11 +299,11 @@ class StructAdapter { // 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: = field_decl a, element0 [template] +// 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass @@ -313,7 +313,7 @@ class StructAdapter { // 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: adapt_decl %SomeClass // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -322,10 +322,10 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%a: SomeClassAdapter) -> i32 { +// CHECK:STDOUT: fn @F(%a: %SomeClassAdapter) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %b.ref: = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] +// 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: %.loc18: i32 = class_element_access , element1 [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -336,9 +336,9 @@ class StructAdapter { // 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: %Int32: = struct_value () [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 {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -348,8 +348,8 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %StructAdapter.decl: type = class_decl @StructAdapter [template = constants.%StructAdapter] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { @@ -360,7 +360,7 @@ class StructAdapter { // 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 {.a: i32, .b: i32} +// CHECK:STDOUT: adapt_decl %.2 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter diff --git a/toolchain/check/testdata/class/extern.carbon b/toolchain/check/testdata/class/extern.carbon index 52765fbb1730..2e2ae17d4f05 100644 --- a/toolchain/check/testdata/class/extern.carbon +++ b/toolchain/check/testdata/class/extern.carbon @@ -348,7 +348,7 @@ extern class C; // 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: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -358,7 +358,7 @@ extern class C; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index d4f00b1bcde7..69c17357be76 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -36,27 +36,27 @@ fn Access(d: Derived) -> (i32, i32) { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Abstract, i32 [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: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32} [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: %.4: type = ptr_type %.3 [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: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: {.a: i32}*, .d: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.base: {.a: i32}*, .d: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.base: Abstract, .d: i32} [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = struct_type {.base: %.4, .d: i32} [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %.10: type = ptr_type %.7 [template] // CHECK:STDOUT: %.11: i32 = int_literal 1 [template] // CHECK:STDOUT: %.12: i32 = int_literal 7 [template] -// CHECK:STDOUT: %.13: type = struct_type {.base: {.a: i32}, .d: i32} [template] +// CHECK:STDOUT: %.13: type = struct_type {.base: %.3, .d: i32} [template] // CHECK:STDOUT: %.14: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] -// CHECK:STDOUT: %Access: = struct_value () [template] -// CHECK:STDOUT: %.16: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %Access: %Access.type = struct_value () [template] +// CHECK:STDOUT: %.16: type = ptr_type %.15 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -69,28 +69,28 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Abstract.decl: type = class_decl @Abstract [template = constants.%Abstract] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Derived.ref.loc21: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: @Make.%return: ref Derived = var +// CHECK:STDOUT: @Make.%return: ref %Derived = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Access.decl: = fn_decl @Access [template = constants.%Access] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref.loc29: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc29_11.1: Derived = param d -// CHECK:STDOUT: @Access.%d: Derived = bind_name d, %d.loc29_11.1 +// CHECK:STDOUT: %d.loc29_11.1: %Derived = param d +// CHECK:STDOUT: @Access.%d: %Derived = bind_name d, %d.loc29_11.1 // CHECK:STDOUT: %int.make_type_32.loc29_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc29_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc29_35.1: (type, type) = tuple_literal (%int.make_type_32.loc29_27, %int.make_type_32.loc29_32) +// CHECK:STDOUT: %.loc29_35.1: %.14 = tuple_literal (%int.make_type_32.loc29_27, %int.make_type_32.loc29_32) // CHECK:STDOUT: %.loc29_35.2: type = value_of_initializer %int.make_type_32.loc29_27 [template = i32] // CHECK:STDOUT: %.loc29_35.3: type = converted %int.make_type_32.loc29_27, %.loc29_35.2 [template = i32] // CHECK:STDOUT: %.loc29_35.4: type = value_of_initializer %int.make_type_32.loc29_32 [template = i32] // CHECK:STDOUT: %.loc29_35.5: type = converted %int.make_type_32.loc29_32, %.loc29_35.4 [template = i32] // CHECK:STDOUT: %.loc29_35.6: type = converted %.loc29_35.1, constants.%.15 [template = constants.%.15] -// CHECK:STDOUT: @Access.%return: ref (i32, i32) = var +// CHECK:STDOUT: @Access.%return: ref %.15 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -98,7 +98,7 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract @@ -107,11 +107,11 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] -// CHECK:STDOUT: %.loc16: = base_decl Abstract, element0 [template] +// CHECK:STDOUT: %.loc16: %.5 = base_decl %Abstract, 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: = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc18_8: %.6 = field_decl d, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -122,35 +122,35 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> %return: Derived { +// CHECK:STDOUT: fn @Make() -> %return: %Derived { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc26_25: i32 = int_literal 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc26_26: {.a: i32} = struct_literal (%.loc26_25) +// CHECK:STDOUT: %.loc26_26: %.3 = struct_literal (%.loc26_25) // CHECK:STDOUT: %.loc26_34: i32 = int_literal 7 [template = constants.%.12] -// CHECK:STDOUT: %.loc26_35: {.base: {.a: i32}, .d: i32} = struct_literal (%.loc26_26, %.loc26_34) +// CHECK:STDOUT: %.loc26_35: %.13 = struct_literal (%.loc26_26, %.loc26_34) // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Access(%d: Derived) -> %return: (i32, i32) { +// CHECK:STDOUT: fn @Access(%d: %Derived) -> %return: %.15 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %d.ref.loc30_11: Derived = name_ref d, %d -// CHECK:STDOUT: %d.ref.loc30_12: = name_ref d, @Derived.%.loc18_8 [template = @Derived.%.loc18_8] +// CHECK:STDOUT: %d.ref.loc30_11: %Derived = name_ref d, %d +// CHECK:STDOUT: %d.ref.loc30_12: %.6 = name_ref d, @Derived.%.loc18_8 [template = @Derived.%.loc18_8] // CHECK:STDOUT: %.loc30_12.1: ref i32 = class_element_access %d.ref.loc30_11, element1 // CHECK:STDOUT: %.loc30_12.2: i32 = bind_value %.loc30_12.1 -// CHECK:STDOUT: %d.ref.loc30_16: Derived = name_ref d, %d -// CHECK:STDOUT: %base.ref: = name_ref base, @Derived.%.loc16 [template = @Derived.%.loc16] -// CHECK:STDOUT: %.loc30_17.1: ref Abstract = class_element_access %d.ref.loc30_16, element0 -// CHECK:STDOUT: %.loc30_17.2: Abstract = bind_value %.loc30_17.1 -// CHECK:STDOUT: %a.ref: = name_ref a, @Abstract.%.loc12_8 [template = @Abstract.%.loc12_8] +// CHECK:STDOUT: %d.ref.loc30_16: %Derived = name_ref d, %d +// CHECK:STDOUT: %base.ref: %.5 = name_ref base, @Derived.%.loc16 [template = @Derived.%.loc16] +// CHECK:STDOUT: %.loc30_17.1: ref %Abstract = class_element_access %d.ref.loc30_16, element0 +// CHECK:STDOUT: %.loc30_17.2: %Abstract = bind_value %.loc30_17.1 +// CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Abstract.%.loc12_8 [template = @Abstract.%.loc12_8] // CHECK:STDOUT: %.loc30_22.1: ref i32 = class_element_access %.loc30_17.2, element0 // CHECK:STDOUT: %.loc30_22.2: i32 = bind_value %.loc30_22.1 -// CHECK:STDOUT: %.loc30_24.1: (i32, i32) = tuple_literal (%.loc30_12.2, %.loc30_22.2) +// CHECK:STDOUT: %.loc30_24.1: %.15 = tuple_literal (%.loc30_12.2, %.loc30_22.2) // CHECK:STDOUT: %.loc30_24.2: ref i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc30_24.3: init i32 = initialize_from %.loc30_12.2 to %.loc30_24.2 // CHECK:STDOUT: %.loc30_24.4: ref i32 = tuple_access %return, element1 // CHECK:STDOUT: %.loc30_24.5: init i32 = initialize_from %.loc30_22.2 to %.loc30_24.4 -// CHECK:STDOUT: %.loc30_24.6: init (i32, i32) = tuple_init (%.loc30_24.3, %.loc30_24.5) to %return -// CHECK:STDOUT: %.loc30_25: init (i32, i32) = converted %.loc30_24.1, %.loc30_24.6 +// CHECK:STDOUT: %.loc30_24.6: init %.15 = tuple_init (%.loc30_24.3, %.loc30_24.5) to %return +// CHECK:STDOUT: %.loc30_25: init %.15 = converted %.loc30_24.1, %.loc30_24.6 // CHECK:STDOUT: return %.loc30_25 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index df0704b730e5..b0476c7f51b4 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -103,7 +103,7 @@ class C { // CHECK:STDOUT: %.1: i32 = int_literal 100 [template] // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Use: = struct_value () [template] +// CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,10 +114,10 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Bad.decl: type = class_decl @Bad [template = constants.%Bad] {} -// CHECK:STDOUT: %Use.decl: = fn_decl @Use [template = constants.%Use] { +// CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [template = constants.%Use] { // CHECK:STDOUT: %Bad.ref: type = name_ref Bad, %Bad.decl [template = constants.%Bad] -// CHECK:STDOUT: %b.loc16_8.1: Bad = param b -// CHECK:STDOUT: @Use.%b: Bad = bind_name b, %b.loc16_8.1 +// CHECK:STDOUT: %b.loc16_8.1: %Bad = param b +// CHECK:STDOUT: @Use.%b: %Bad = bind_name b, %b.loc16_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -129,9 +129,9 @@ class C { // CHECK:STDOUT: .Self = constants.%Bad // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Use(%b: Bad) { +// CHECK:STDOUT: fn @Use(%b: %Bad) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %b.ref: Bad = name_ref b, %b +// CHECK:STDOUT: %b.ref: %Bad = name_ref b, %b // CHECK:STDOUT: %F.ref: = name_ref F, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -143,7 +143,7 @@ class C { // CHECK:STDOUT: %.1: i32 = int_literal 100 [template] // CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Use: = struct_value () [template] +// CHECK:STDOUT: %Use: %Use.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -154,10 +154,10 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Bad.decl: type = class_decl @Bad [template = constants.%Bad] {} -// CHECK:STDOUT: %Use.decl: = fn_decl @Use [template = constants.%Use] { +// CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [template = constants.%Use] { // CHECK:STDOUT: %Bad.ref: type = name_ref Bad, %Bad.decl [template = constants.%Bad] -// CHECK:STDOUT: %b.loc13_8.1: Bad = param b -// CHECK:STDOUT: @Use.%b: Bad = bind_name b, %b.loc13_8.1 +// CHECK:STDOUT: %b.loc13_8.1: %Bad = param b +// CHECK:STDOUT: @Use.%b: %Bad = bind_name b, %b.loc13_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -170,9 +170,9 @@ class C { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Use(%b: Bad) { +// CHECK:STDOUT: fn @Use(%b: %Bad) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %b.ref: Bad = name_ref b, %b +// CHECK:STDOUT: %b.ref: %Bad = name_ref b, %b // CHECK:STDOUT: %F.ref: = name_ref F, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -198,20 +198,20 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @MultipleAdapts { -// CHECK:STDOUT: %.loc5_10: () = tuple_literal () +// CHECK:STDOUT: %.loc5_10: %.1 = tuple_literal () // CHECK:STDOUT: %.loc5_11: type = converted %.loc5_10, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: adapt_decl () -// CHECK:STDOUT: %.loc13: {} = struct_literal () +// CHECK:STDOUT: adapt_decl %.1 +// CHECK:STDOUT: %.loc13: %.2 = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MultipleAdapts // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @MultipleAdaptsSameType { -// CHECK:STDOUT: %.loc17_10: () = tuple_literal () +// CHECK:STDOUT: %.loc17_10: %.1 = tuple_literal () // CHECK:STDOUT: %.loc17_11: type = converted %.loc17_10, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: adapt_decl () -// CHECK:STDOUT: %.loc25: () = tuple_literal () +// CHECK:STDOUT: adapt_decl %.1 +// CHECK:STDOUT: %.loc25: %.1 = tuple_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MultipleAdaptsSameType @@ -222,10 +222,10 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @I.1 [template] -// CHECK:STDOUT: %Self.1: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.3: type = interface_type @I.2 [template] -// CHECK:STDOUT: %Self.2: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -235,14 +235,14 @@ class C { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc8: {} = struct_literal () +// CHECK:STDOUT: %.loc8: %.1 = struct_literal () // CHECK:STDOUT: %I.decl: type = interface_decl @I.1 [template = constants.%.2] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I.1 { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %.loc15: {} = struct_literal () +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %.loc15: %.1 = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -250,8 +250,8 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I.2 { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %.loc23: {} = struct_literal () +// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %.loc23: %.1 = struct_literal () // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon index e1799dffc0ef..2e16bcfb88c7 100644 --- a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon @@ -62,7 +62,7 @@ class C5 { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %C1: type = class_type @C1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [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] @@ -95,7 +95,7 @@ class C5 { // CHECK:STDOUT: // 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: adapt_decl %B // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 @@ -103,7 +103,7 @@ class C5 { // CHECK:STDOUT: // 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: adapt_decl %B // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 @@ -111,7 +111,7 @@ class C5 { // CHECK:STDOUT: // 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: adapt_decl %B // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C3 @@ -119,7 +119,7 @@ class C5 { // CHECK:STDOUT: // 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: adapt_decl %B // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C4 @@ -128,7 +128,7 @@ class C5 { // CHECK:STDOUT: // 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: adapt_decl %B // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C5 diff --git a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon index 7ec9b53f7deb..685631aaef0a 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon @@ -82,9 +82,9 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %AdaptWithBase: type = class_type @AdaptWithBase [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type AdaptWithBase, Base [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [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: file { @@ -96,7 +96,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %AdaptWithBase.decl: type = class_decl @AdaptWithBase [template = constants.%AdaptWithBase] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -110,7 +110,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: = base_decl Base, element0 [template] +// CHECK:STDOUT: %.loc15: %.4 = base_decl %Base, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithBase @@ -126,10 +126,10 @@ class AdaptWithBaseAndFields { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type AdaptWithField, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.2: 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: %.3: type = unbound_element_type %AdaptWithFields, i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -140,13 +140,13 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %AdaptWithField.decl: type = class_decl @AdaptWithField [template = constants.%AdaptWithField] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %AdaptWithFields.decl: type = class_decl @AdaptWithFields [template = constants.%AdaptWithFields] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithField { @@ -157,7 +157,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: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithField @@ -172,15 +172,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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc25_8: %.3 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc26_8: %.3 = 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: = field_decl c, element2 [template] +// CHECK:STDOUT: %.loc27_8: %.3 = field_decl c, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithFields @@ -198,11 +198,11 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %AdaptWithBaseAndFields: type = class_type @AdaptWithBaseAndFields [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type AdaptWithBaseAndFields, Base [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: = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type AdaptWithBaseAndFields, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %AdaptWithBaseAndFields, i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -214,7 +214,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %AdaptWithBaseAndFields.decl: type = class_decl @AdaptWithBaseAndFields [template = constants.%AdaptWithBaseAndFields] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -224,14 +224,14 @@ 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: = 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: = field_decl n, element1 [template] -// CHECK:STDOUT: %.loc15_10: {} = struct_literal () +// 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 {} +// CHECK:STDOUT: adapt_decl %.1 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithBaseAndFields diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index 2500791334f6..86f12e3661f6 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -25,12 +25,12 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = ptr_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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -44,17 +44,17 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc16: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %a.loc16_13.1: Class* = param a -// CHECK:STDOUT: %a.loc16_13.2: Class* = bind_name a, %a.loc16_13.1 +// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %a.loc16_13.1: %.1 = param a +// CHECK:STDOUT: %a.loc16_13.2: %.1 = bind_name a, %a.loc16_13.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc21: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc21: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %b.loc21_13.1: Class* = param b -// CHECK:STDOUT: %b.loc21_13.2: Class* = bind_name b, %b.loc21_13.1 +// CHECK:STDOUT: %.loc21: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %b.loc21_13.1: %.1 = param b +// CHECK:STDOUT: %b.loc21_13.2: %.1 = bind_name b, %b.loc21_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -63,7 +63,7 @@ class Class { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[@Class.%a.loc16_13.2: Class*](); +// CHECK:STDOUT: fn @F[@Class.%a.loc16_13.2: %.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(@Class.%b.loc21_13.2: Class*); +// CHECK:STDOUT: fn @G(@Class.%b.loc21_13.2: %.1); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index 5d67f1c12ddf..2cf7870693b2 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -48,16 +48,16 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = ptr_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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,30 +68,30 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Class.ref.loc16_9: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc16_6.1: Class = param c -// CHECK:STDOUT: @F.2.%c: Class = bind_name c, %c.loc16_6.1 +// CHECK:STDOUT: %c.loc16_6.1: %Class = param c +// CHECK:STDOUT: @F.2.%c: %Class = bind_name c, %c.loc16_6.1 // CHECK:STDOUT: %Class.ref.loc16_19: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %p.loc16_16.1: Class* = param p -// CHECK:STDOUT: @F.2.%p: Class* = bind_name p, %p.loc16_16.1 +// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %p.loc16_16.1: %.1 = param p +// CHECK:STDOUT: @F.2.%p: %.1 = bind_name p, %p.loc16_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Class.ref.loc12: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc12_24: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: Class* = param self -// CHECK:STDOUT: %self.loc12_13.3: Class* = bind_name self, %self.loc12_13.1 -// CHECK:STDOUT: %.loc12_8: Class* = addr_pattern %self.loc12_13.3 +// CHECK:STDOUT: %.loc12_24: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 +// CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc13: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %self.loc13_13.1: Class = param self -// CHECK:STDOUT: %self.loc13_13.3: Class = bind_name self, %self.loc13_13.1 -// CHECK:STDOUT: %.loc13: Class = addr_pattern %self.loc13_13.3 +// CHECK:STDOUT: %self.loc13_13.1: %Class = param self +// CHECK:STDOUT: %self.loc13_13.3: %Class = bind_name self, %self.loc13_13.1 +// CHECK:STDOUT: %.loc13: %Class = addr_pattern %self.loc13_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -100,32 +100,32 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[addr @Class.%self.loc12_13.3: Class*](); +// CHECK:STDOUT: fn @F.1[addr @Class.%self.loc12_13.3: %.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr @Class.%self.loc13_13.3: Class](); +// CHECK:STDOUT: fn @G[addr @Class.%self.loc13_13.3: %Class](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%c: Class, %p: Class*) { +// CHECK:STDOUT: fn @F.2(%c: %Class, %p: %.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref.loc24: Class = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc24: = name_ref F, @Class.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %c.ref.loc24: %Class = name_ref c, %c +// CHECK:STDOUT: %F.ref.loc24: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc24: = bound_method %c.ref.loc24, %F.ref.loc24 -// CHECK:STDOUT: %F.call.loc24: init () = call %.loc24() [template = ] -// CHECK:STDOUT: %c.ref.loc33: Class = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc33: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %F.call.loc24: init %.2 = call %.loc24() [template = ] +// CHECK:STDOUT: %c.ref.loc33: %Class = name_ref c, %c +// CHECK:STDOUT: %G.ref.loc33: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc33: = bound_method %c.ref.loc33, %G.ref.loc33 -// CHECK:STDOUT: %G.call.loc33: init () = call %.loc33() [template = ] -// CHECK:STDOUT: %p.ref.loc36: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc36_4.1: ref Class = deref %p.ref.loc36 -// CHECK:STDOUT: %F.ref.loc36: = name_ref F, @Class.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %G.call.loc33: init %.2 = call %.loc33() [template = ] +// CHECK:STDOUT: %p.ref.loc36: %.1 = name_ref p, %p +// CHECK:STDOUT: %.loc36_4.1: ref %Class = deref %p.ref.loc36 +// CHECK:STDOUT: %F.ref.loc36: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc36_7: = bound_method %.loc36_4.1, %F.ref.loc36 -// CHECK:STDOUT: %.loc36_4.2: Class* = addr_of %.loc36_4.1 -// CHECK:STDOUT: %F.call.loc36: init () = call %.loc36_7(%.loc36_4.2) -// CHECK:STDOUT: %p.ref.loc44: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc44_4.1: ref Class = deref %p.ref.loc44 -// CHECK:STDOUT: %G.ref.loc44: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %.loc36_4.2: %.1 = addr_of %.loc36_4.1 +// CHECK:STDOUT: %F.call.loc36: init %.2 = call %.loc36_7(%.loc36_4.2) +// CHECK:STDOUT: %p.ref.loc44: %.1 = name_ref p, %p +// CHECK:STDOUT: %.loc44_4.1: ref %Class = deref %p.ref.loc44 +// CHECK:STDOUT: %G.ref.loc44: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc44_7: = bound_method %.loc44_4.1, %G.ref.loc44 -// CHECK:STDOUT: %.loc44_4.2: Class* = addr_of %.loc44_4.1 -// CHECK:STDOUT: %G.call.loc44: init () = call %.loc44_7() [template = ] +// CHECK:STDOUT: %.loc44_4.2: %.1 = addr_of %.loc44_4.1 +// CHECK:STDOUT: %G.call.loc44: init %.2 = call %.loc44_7() [template = ] // 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 737391fbed82..d6fef0a644f7 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -140,66 +140,66 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Final: type = class_type @Final [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type Final, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Final, i32 [template] // CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %DeriveFromError: type = class_type @DeriveFromError [template] -// CHECK:STDOUT: %.5: type = ptr_type DeriveFromError [template] +// CHECK:STDOUT: %.5: type = ptr_type %DeriveFromError [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError.type: type = fn_type @AccessMemberWithInvalidBaseError [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseError: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseError: %AccessMemberWithInvalidBaseError.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] // CHECK:STDOUT: %.6: i32 = int_literal 32 [template] -// CHECK:STDOUT: %.7: type = ptr_type DeriveFromNonType [template] +// CHECK:STDOUT: %.7: type = ptr_type %DeriveFromNonType [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.type: type = fn_type @AccessMemberWithInvalidBasNonType [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: %AccessMemberWithInvalidBasNonType.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromi32: type = class_type @DeriveFromi32 [template] -// CHECK:STDOUT: %.8: type = ptr_type DeriveFromi32 [template] +// CHECK:STDOUT: %.8: type = ptr_type %DeriveFromi32 [template] // CHECK:STDOUT: %.9: type = ptr_type i32 [template] // CHECK:STDOUT: %ConvertToBadBasei32.type: type = fn_type @ConvertToBadBasei32 [template] -// CHECK:STDOUT: %ConvertToBadBasei32: = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBasei32: %ConvertToBadBasei32.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.type: type = fn_type @AccessMemberWithInvalidBasei32 [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBasei32: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBasei32: %AccessMemberWithInvalidBasei32.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromTuple: type = class_type @DeriveFromTuple [template] // CHECK:STDOUT: %.10: type = tuple_type (type) [template] -// CHECK:STDOUT: %.11: type = tuple_type (Base) [template] -// CHECK:STDOUT: %.12: type = ptr_type {} [template] -// CHECK:STDOUT: %.13: type = tuple_type ({}*) [template] -// CHECK:STDOUT: %.14: type = ptr_type DeriveFromTuple [template] -// CHECK:STDOUT: %.15: type = ptr_type (Base,) [template] +// CHECK:STDOUT: %.11: type = tuple_type (%Base) [template] +// CHECK:STDOUT: %.12: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.13: type = tuple_type (%.12) [template] +// CHECK:STDOUT: %.14: type = ptr_type %DeriveFromTuple [template] +// CHECK:STDOUT: %.15: type = ptr_type %.11 [template] // CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] -// CHECK:STDOUT: %ConvertToBadBaseTuple: = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseTuple: %ConvertToBadBaseTuple.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: %AccessMemberWithInvalidBaseTuple.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromStruct: type = class_type @DeriveFromStruct [template] // CHECK:STDOUT: %.16: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.17: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.18: type = ptr_type DeriveFromStruct [template] +// CHECK:STDOUT: %.17: type = ptr_type %.16 [template] +// CHECK:STDOUT: %.18: type = ptr_type %DeriveFromStruct [template] // CHECK:STDOUT: %ConvertToBadBaseStruct.type: type = fn_type @ConvertToBadBaseStruct [template] -// CHECK:STDOUT: %ConvertToBadBaseStruct: = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseStruct: %ConvertToBadBaseStruct.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.type: type = fn_type @AccessMemberWithInvalidBaseStruct [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct: %AccessMemberWithInvalidBaseStruct.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %DeriveFromIncomplete: type = class_type @DeriveFromIncomplete [template] -// CHECK:STDOUT: %.19: type = ptr_type DeriveFromIncomplete [template] -// CHECK:STDOUT: %.20: type = ptr_type Incomplete [template] +// CHECK:STDOUT: %.19: type = ptr_type %DeriveFromIncomplete [template] +// CHECK:STDOUT: %.20: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] -// CHECK:STDOUT: %ConvertToBadBaseIncomplete: = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseIncomplete: %ConvertToBadBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: %AccessMemberWithInvalidBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: %DeriveFromFinal: type = class_type @DeriveFromFinal [template] -// CHECK:STDOUT: %.21: type = ptr_type {.a: i32} [template] -// CHECK:STDOUT: %.22: type = unbound_element_type DeriveFromFinal, Final [template] -// CHECK:STDOUT: %.23: type = struct_type {.base: Final} [template] -// CHECK:STDOUT: %.24: type = ptr_type DeriveFromFinal [template] -// CHECK:STDOUT: %.25: type = ptr_type Final [template] +// CHECK:STDOUT: %.21: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.22: type = unbound_element_type %DeriveFromFinal, %Final [template] +// CHECK:STDOUT: %.23: type = struct_type {.base: %Final} [template] +// CHECK:STDOUT: %.24: type = ptr_type %DeriveFromFinal [template] +// CHECK:STDOUT: %.25: type = ptr_type %Final [template] // CHECK:STDOUT: %ConvertToBadBaseFinal.type: type = fn_type @ConvertToBadBaseFinal [template] -// CHECK:STDOUT: %ConvertToBadBaseFinal: = struct_value () [template] -// CHECK:STDOUT: %.26: type = struct_type {.base: {.a: i32}*} [template] -// CHECK:STDOUT: %.27: type = ptr_type {.base: Final} [template] +// CHECK:STDOUT: %ConvertToBadBaseFinal: %ConvertToBadBaseFinal.type = struct_value () [template] +// CHECK:STDOUT: %.26: type = struct_type {.base: %.21} [template] +// CHECK:STDOUT: %.27: type = ptr_type %.23 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_WithMember [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember: %AccessMemberWithInvalidBaseFinal_WithMember.type = struct_value () [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_NoMember [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember: %AccessMemberWithInvalidBaseFinal_NoMember.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -232,89 +232,89 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %Final.decl: type = class_decl @Final [template = constants.%Final] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %DeriveFromError.decl: type = class_decl @DeriveFromError [template = constants.%DeriveFromError] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseError.decl: = fn_decl @AccessMemberWithInvalidBaseError [template = constants.%AccessMemberWithInvalidBaseError] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseError.decl: %AccessMemberWithInvalidBaseError.type = fn_decl @AccessMemberWithInvalidBaseError [template = constants.%AccessMemberWithInvalidBaseError] { // CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, %DeriveFromError.decl [template = constants.%DeriveFromError] -// CHECK:STDOUT: %.loc25_55: type = ptr_type DeriveFromError [template = constants.%.5] -// CHECK:STDOUT: %p.loc25_37.1: DeriveFromError* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBaseError.%p: DeriveFromError* = bind_name p, %p.loc25_37.1 +// CHECK:STDOUT: %.loc25_55: type = ptr_type %DeriveFromError [template = constants.%.5] +// CHECK:STDOUT: %p.loc25_37.1: %.5 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBaseError.%p: %.5 = bind_name p, %p.loc25_37.1 // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_61.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_61.2: type = converted %int.make_type_32.loc25, %.loc25_61.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseError.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromNonType.decl: type = class_decl @DeriveFromNonType [template = constants.%DeriveFromNonType] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: %AccessMemberWithInvalidBasNonType.type = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, %DeriveFromNonType.decl [template = constants.%DeriveFromNonType] -// CHECK:STDOUT: %.loc35_58: type = ptr_type DeriveFromNonType [template = constants.%.7] -// CHECK:STDOUT: %p.loc35_38.1: DeriveFromNonType* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBasNonType.%p: DeriveFromNonType* = bind_name p, %p.loc35_38.1 +// CHECK:STDOUT: %.loc35_58: type = ptr_type %DeriveFromNonType [template = constants.%.7] +// CHECK:STDOUT: %p.loc35_38.1: %.7 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBasNonType.%p: %.7 = bind_name p, %p.loc35_38.1 // CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc35_64.1: type = value_of_initializer %int.make_type_32.loc35 [template = i32] // CHECK:STDOUT: %.loc35_64.2: type = converted %int.make_type_32.loc35, %.loc35_64.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBasNonType.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromi32.decl: type = class_decl @DeriveFromi32 [template = constants.%DeriveFromi32] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %ConvertToBadBasei32.decl: = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertToBadBasei32.decl: %ConvertToBadBasei32.type = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { // CHECK:STDOUT: %DeriveFromi32.ref.loc51: type = name_ref DeriveFromi32, %DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc51_40: type = ptr_type DeriveFromi32 [template = constants.%.8] -// CHECK:STDOUT: %p.loc51_24.1: DeriveFromi32* = param p -// CHECK:STDOUT: @ConvertToBadBasei32.%p: DeriveFromi32* = bind_name p, %p.loc51_24.1 +// CHECK:STDOUT: %.loc51_40: type = ptr_type %DeriveFromi32 [template = constants.%.8] +// CHECK:STDOUT: %p.loc51_24.1: %.8 = param p +// CHECK:STDOUT: @ConvertToBadBasei32.%p: %.8 = bind_name p, %p.loc51_24.1 // CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc51_49.1: type = value_of_initializer %int.make_type_32.loc51 [template = i32] // CHECK:STDOUT: %.loc51_49.2: type = converted %int.make_type_32.loc51, %.loc51_49.1 [template = i32] // CHECK:STDOUT: %.loc51_49.3: type = ptr_type i32 [template = constants.%.9] -// CHECK:STDOUT: @ConvertToBadBasei32.%return: ref i32* = var +// CHECK:STDOUT: @ConvertToBadBasei32.%return: ref %.9 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: %AccessMemberWithInvalidBasei32.type = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { // CHECK:STDOUT: %DeriveFromi32.ref.loc53: type = name_ref DeriveFromi32, %DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %.loc53_51: type = ptr_type DeriveFromi32 [template = constants.%.8] -// CHECK:STDOUT: %p.loc53_35.1: DeriveFromi32* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBasei32.%p: DeriveFromi32* = bind_name p, %p.loc53_35.1 +// CHECK:STDOUT: %.loc53_51: type = ptr_type %DeriveFromi32 [template = constants.%.8] +// CHECK:STDOUT: %p.loc53_35.1: %.8 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBasei32.%p: %.8 = bind_name p, %p.loc53_35.1 // CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_57.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_57.2: type = converted %int.make_type_32.loc53, %.loc53_57.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBasei32.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromTuple.decl: type = class_decl @DeriveFromTuple [template = constants.%DeriveFromTuple] {} -// CHECK:STDOUT: %ConvertToBadBaseTuple.decl: = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { +// CHECK:STDOUT: %ConvertToBadBaseTuple.decl: %ConvertToBadBaseTuple.type = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { // CHECK:STDOUT: %DeriveFromTuple.ref.loc67: type = name_ref DeriveFromTuple, %DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc67_44: type = ptr_type DeriveFromTuple [template = constants.%.14] -// CHECK:STDOUT: %p.loc67_26.1: DeriveFromTuple* = param p -// CHECK:STDOUT: @ConvertToBadBaseTuple.%p: DeriveFromTuple* = bind_name p, %p.loc67_26.1 +// CHECK:STDOUT: %.loc67_44: type = ptr_type %DeriveFromTuple [template = constants.%.14] +// CHECK:STDOUT: %p.loc67_26.1: %.14 = param p +// CHECK:STDOUT: @ConvertToBadBaseTuple.%p: %.14 = bind_name p, %p.loc67_26.1 // CHECK:STDOUT: %Base.ref: type = name_ref Base, %Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc67_56: (type,) = tuple_literal (%Base.ref) +// CHECK:STDOUT: %.loc67_56: %.10 = tuple_literal (%Base.ref) // CHECK:STDOUT: %.loc67_57.1: type = converted %.loc67_56, constants.%.11 [template = constants.%.11] -// CHECK:STDOUT: %.loc67_57.2: type = ptr_type (Base,) [template = constants.%.15] -// CHECK:STDOUT: @ConvertToBadBaseTuple.%return: ref (Base,)* = var +// CHECK:STDOUT: %.loc67_57.2: type = ptr_type %.11 [template = constants.%.15] +// CHECK:STDOUT: @ConvertToBadBaseTuple.%return: ref %.15 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: %AccessMemberWithInvalidBaseTuple.type = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { // CHECK:STDOUT: %DeriveFromTuple.ref.loc69: type = name_ref DeriveFromTuple, %DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %.loc69_55: type = ptr_type DeriveFromTuple [template = constants.%.14] -// CHECK:STDOUT: %p.loc69_37.1: DeriveFromTuple* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBaseTuple.%p: DeriveFromTuple* = bind_name p, %p.loc69_37.1 +// CHECK:STDOUT: %.loc69_55: type = ptr_type %DeriveFromTuple [template = constants.%.14] +// CHECK:STDOUT: %p.loc69_37.1: %.14 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBaseTuple.%p: %.14 = bind_name p, %p.loc69_37.1 // CHECK:STDOUT: %int.make_type_32.loc69: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc69_61.1: type = value_of_initializer %int.make_type_32.loc69 [template = i32] // CHECK:STDOUT: %.loc69_61.2: type = converted %int.make_type_32.loc69, %.loc69_61.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseTuple.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromStruct.decl: type = class_decl @DeriveFromStruct [template = constants.%DeriveFromStruct] {} -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %ConvertToBadBaseStruct.decl: = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertToBadBaseStruct.decl: %ConvertToBadBaseStruct.type = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { // CHECK:STDOUT: %DeriveFromStruct.ref.loc85: type = name_ref DeriveFromStruct, %DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc85_46: type = ptr_type DeriveFromStruct [template = constants.%.18] -// CHECK:STDOUT: %p.loc85_27.1: DeriveFromStruct* = param p -// CHECK:STDOUT: @ConvertToBadBaseStruct.%p: DeriveFromStruct* = bind_name p, %p.loc85_27.1 +// CHECK:STDOUT: %.loc85_46: type = ptr_type %DeriveFromStruct [template = constants.%.18] +// CHECK:STDOUT: %p.loc85_27.1: %.18 = param p +// CHECK:STDOUT: @ConvertToBadBaseStruct.%p: %.18 = bind_name p, %p.loc85_27.1 // CHECK:STDOUT: %int.make_type_32.loc85_57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc85_57.1: type = value_of_initializer %int.make_type_32.loc85_57 [template = i32] // CHECK:STDOUT: %.loc85_57.2: type = converted %int.make_type_32.loc85_57, %.loc85_57.1 [template = i32] @@ -322,15 +322,15 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.loc85_66.1: type = value_of_initializer %int.make_type_32.loc85_66 [template = i32] // CHECK:STDOUT: %.loc85_66.2: type = converted %int.make_type_32.loc85_66, %.loc85_66.1 [template = i32] // CHECK:STDOUT: %.loc85_69: type = struct_type {.a: i32, .b: i32} [template = constants.%.16] -// CHECK:STDOUT: %.loc85_70: type = ptr_type {.a: i32, .b: i32} [template = constants.%.17] -// CHECK:STDOUT: @ConvertToBadBaseStruct.%return: ref {.a: i32, .b: i32}* = var +// CHECK:STDOUT: %.loc85_70: type = ptr_type %.16 [template = constants.%.17] +// CHECK:STDOUT: @ConvertToBadBaseStruct.%return: ref %.17 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: %AccessMemberWithInvalidBaseStruct.type = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { // CHECK:STDOUT: %DeriveFromStruct.ref.loc88: type = name_ref DeriveFromStruct, %DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %.loc88_57: type = ptr_type DeriveFromStruct [template = constants.%.18] -// CHECK:STDOUT: %p.loc88_38.1: DeriveFromStruct* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBaseStruct.%p: DeriveFromStruct* = bind_name p, %p.loc88_38.1 +// CHECK:STDOUT: %.loc88_57: type = ptr_type %DeriveFromStruct [template = constants.%.18] +// CHECK:STDOUT: %p.loc88_38.1: %.18 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBaseStruct.%p: %.18 = bind_name p, %p.loc88_38.1 // CHECK:STDOUT: %int.make_type_32.loc88: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc88_63.1: type = value_of_initializer %int.make_type_32.loc88 [template = i32] // CHECK:STDOUT: %.loc88_63.2: type = converted %int.make_type_32.loc88, %.loc88_63.1 [template = i32] @@ -338,53 +338,53 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} // CHECK:STDOUT: %DeriveFromIncomplete.decl: type = class_decl @DeriveFromIncomplete [template = constants.%DeriveFromIncomplete] {} -// CHECK:STDOUT: %ConvertToBadBaseIncomplete.decl: = fn_decl @ConvertToBadBaseIncomplete [template = constants.%ConvertToBadBaseIncomplete] { +// CHECK:STDOUT: %ConvertToBadBaseIncomplete.decl: %ConvertToBadBaseIncomplete.type = fn_decl @ConvertToBadBaseIncomplete [template = constants.%ConvertToBadBaseIncomplete] { // CHECK:STDOUT: %DeriveFromIncomplete.ref.loc107: type = name_ref DeriveFromIncomplete, %DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %.loc107_54: type = ptr_type DeriveFromIncomplete [template = constants.%.19] -// CHECK:STDOUT: %p.loc107_31.1: DeriveFromIncomplete* = param p -// CHECK:STDOUT: @ConvertToBadBaseIncomplete.%p: DeriveFromIncomplete* = bind_name p, %p.loc107_31.1 +// CHECK:STDOUT: %.loc107_54: type = ptr_type %DeriveFromIncomplete [template = constants.%.19] +// CHECK:STDOUT: %p.loc107_31.1: %.19 = param p +// CHECK:STDOUT: @ConvertToBadBaseIncomplete.%p: %.19 = bind_name p, %p.loc107_31.1 // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc107_70: type = ptr_type Incomplete [template = constants.%.20] -// CHECK:STDOUT: @ConvertToBadBaseIncomplete.%return: ref Incomplete* = var +// CHECK:STDOUT: %.loc107_70: type = ptr_type %Incomplete [template = constants.%.20] +// CHECK:STDOUT: @ConvertToBadBaseIncomplete.%return: ref %.20 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%AccessMemberWithInvalidBaseIncomplete] { +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: %AccessMemberWithInvalidBaseIncomplete.type = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%AccessMemberWithInvalidBaseIncomplete] { // CHECK:STDOUT: %DeriveFromIncomplete.ref.loc109: type = name_ref DeriveFromIncomplete, %DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %.loc109_65: type = ptr_type DeriveFromIncomplete [template = constants.%.19] -// CHECK:STDOUT: %p.loc109_42.1: DeriveFromIncomplete* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBaseIncomplete.%p: DeriveFromIncomplete* = bind_name p, %p.loc109_42.1 +// CHECK:STDOUT: %.loc109_65: type = ptr_type %DeriveFromIncomplete [template = constants.%.19] +// CHECK:STDOUT: %p.loc109_42.1: %.19 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBaseIncomplete.%p: %.19 = bind_name p, %p.loc109_42.1 // CHECK:STDOUT: %int.make_type_32.loc109: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc109_71.1: type = value_of_initializer %int.make_type_32.loc109 [template = i32] // CHECK:STDOUT: %.loc109_71.2: type = converted %int.make_type_32.loc109, %.loc109_71.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseIncomplete.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromFinal.decl: type = class_decl @DeriveFromFinal [template = constants.%DeriveFromFinal] {} -// CHECK:STDOUT: %ConvertToBadBaseFinal.decl: = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { +// CHECK:STDOUT: %ConvertToBadBaseFinal.decl: %ConvertToBadBaseFinal.type = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc120: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc120_44: type = ptr_type DeriveFromFinal [template = constants.%.24] -// CHECK:STDOUT: %p.loc120_26.1: DeriveFromFinal* = param p -// CHECK:STDOUT: @ConvertToBadBaseFinal.%p: DeriveFromFinal* = bind_name p, %p.loc120_26.1 +// CHECK:STDOUT: %.loc120_44: type = ptr_type %DeriveFromFinal [template = constants.%.24] +// CHECK:STDOUT: %p.loc120_26.1: %.24 = param p +// CHECK:STDOUT: @ConvertToBadBaseFinal.%p: %.24 = bind_name p, %p.loc120_26.1 // CHECK:STDOUT: %Final.ref: type = name_ref Final, %Final.decl [template = constants.%Final] -// CHECK:STDOUT: %.loc120_55: type = ptr_type Final [template = constants.%.25] -// CHECK:STDOUT: @ConvertToBadBaseFinal.%return: ref Final* = var +// CHECK:STDOUT: %.loc120_55: type = ptr_type %Final [template = constants.%.25] +// CHECK:STDOUT: @ConvertToBadBaseFinal.%return: ref %.25 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: %AccessMemberWithInvalidBaseFinal_WithMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc124: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc124_66: type = ptr_type DeriveFromFinal [template = constants.%.24] -// CHECK:STDOUT: %p.loc124_48.1: DeriveFromFinal* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_WithMember.%p: DeriveFromFinal* = bind_name p, %p.loc124_48.1 +// CHECK:STDOUT: %.loc124_66: type = ptr_type %DeriveFromFinal [template = constants.%.24] +// CHECK:STDOUT: %p.loc124_48.1: %.24 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_WithMember.%p: %.24 = bind_name p, %p.loc124_48.1 // CHECK:STDOUT: %int.make_type_32.loc124: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc124_72.1: type = value_of_initializer %int.make_type_32.loc124 [template = i32] // CHECK:STDOUT: %.loc124_72.2: type = converted %int.make_type_32.loc124, %.loc124_72.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_WithMember.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { +// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: %AccessMemberWithInvalidBaseFinal_NoMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc128: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %.loc128_64: type = ptr_type DeriveFromFinal [template = constants.%.24] -// CHECK:STDOUT: %p.loc128_46.1: DeriveFromFinal* = param p -// CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_NoMember.%p: DeriveFromFinal* = bind_name p, %p.loc128_46.1 +// CHECK:STDOUT: %.loc128_64: type = ptr_type %DeriveFromFinal [template = constants.%.24] +// CHECK:STDOUT: %p.loc128_46.1: %.24 = param p +// CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_NoMember.%p: %.24 = bind_name p, %p.loc128_46.1 // CHECK:STDOUT: %int.make_type_32.loc128: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc128_70.1: type = value_of_initializer %int.make_type_32.loc128 [template = i32] // CHECK:STDOUT: %.loc128_70.2: type = converted %int.make_type_32.loc128, %.loc128_70.1 [template = i32] @@ -401,7 +401,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32, %.loc13_10.1 [template = i32] -// CHECK:STDOUT: %.loc13_8: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc13_8: %.3 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Final @@ -442,7 +442,7 @@ 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: %.loc60_22.1: (type,) = tuple_literal (%Base.ref) +// CHECK:STDOUT: %.loc60_22.1: %.10 = tuple_literal (%Base.ref) // CHECK:STDOUT: %.loc60_22.2: type = converted %.loc60_22.1, constants.%.11 [template = constants.%.11] // CHECK:STDOUT: %.loc60_23: = base_decl , element0 [template] // CHECK:STDOUT: @@ -482,7 +482,7 @@ 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: %.loc116: = base_decl Final, element0 [template] +// CHECK:STDOUT: %.loc116: %.22 = base_decl %Final, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromFinal @@ -492,104 +492,104 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseError(%p: DeriveFromError*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseError(%p: %.5) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromError* = name_ref p, %p -// CHECK:STDOUT: %.loc25: ref DeriveFromError = deref %p.ref +// CHECK:STDOUT: %p.ref: %.5 = name_ref p, %p +// CHECK:STDOUT: %.loc25: ref %DeriveFromError = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p: DeriveFromNonType*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p: %.7) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromNonType* = name_ref p, %p -// CHECK:STDOUT: %.loc35: ref DeriveFromNonType = deref %p.ref +// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %.loc35: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBasei32(%p: DeriveFromi32*) -> i32* { +// CHECK:STDOUT: fn @ConvertToBadBasei32(%p: %.8) -> %.9 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromi32* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p: DeriveFromi32*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p: %.8) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromi32* = name_ref p, %p -// CHECK:STDOUT: %.loc53: ref DeriveFromi32 = deref %p.ref +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p +// CHECK:STDOUT: %.loc53: ref %DeriveFromi32 = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p: DeriveFromTuple*) -> (Base,)* { +// CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p: %.14) -> %.15 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromTuple* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.14 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p: DeriveFromTuple*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p: %.14) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromTuple* = name_ref p, %p -// CHECK:STDOUT: %.loc69: ref DeriveFromTuple = deref %p.ref +// CHECK:STDOUT: %p.ref: %.14 = name_ref p, %p +// CHECK:STDOUT: %.loc69: ref %DeriveFromTuple = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { +// CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p: %.18) -> %.17 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromStruct* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.18 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p: DeriveFromStruct*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p: %.18) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromStruct* = name_ref p, %p -// CHECK:STDOUT: %.loc88: ref DeriveFromStruct = deref %p.ref +// CHECK:STDOUT: %p.ref: %.18 = name_ref p, %p +// CHECK:STDOUT: %.loc88: ref %DeriveFromStruct = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p: DeriveFromIncomplete*) -> Incomplete* { +// CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p: %.19) -> %.20 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromIncomplete* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.19 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p: DeriveFromIncomplete*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p: %.19) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromIncomplete* = name_ref p, %p -// CHECK:STDOUT: %.loc109: ref DeriveFromIncomplete = deref %p.ref +// CHECK:STDOUT: %p.ref: %.19 = name_ref p, %p +// CHECK:STDOUT: %.loc109: ref %DeriveFromIncomplete = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p: DeriveFromFinal*) -> Final* { +// CHECK:STDOUT: fn @ConvertToBadBaseFinal(%p: %.24) -> %.25 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromFinal* = name_ref p, %p -// CHECK:STDOUT: %.loc121_11.1: ref DeriveFromFinal = deref %p.ref -// CHECK:STDOUT: %.loc121_11.2: ref Final = class_element_access %.loc121_11.1, element0 -// CHECK:STDOUT: %.loc121_11.3: Final* = addr_of %.loc121_11.2 -// CHECK:STDOUT: %.loc121_11.4: Final* = converted %p.ref, %.loc121_11.3 +// CHECK:STDOUT: %p.ref: %.24 = name_ref p, %p +// CHECK:STDOUT: %.loc121_11.1: ref %DeriveFromFinal = deref %p.ref +// CHECK:STDOUT: %.loc121_11.2: ref %Final = class_element_access %.loc121_11.1, element0 +// CHECK:STDOUT: %.loc121_11.3: %.25 = addr_of %.loc121_11.2 +// CHECK:STDOUT: %.loc121_11.4: %.25 = converted %p.ref, %.loc121_11.3 // CHECK:STDOUT: return %.loc121_11.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p: DeriveFromFinal*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_WithMember(%p: %.24) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromFinal* = name_ref p, %p -// CHECK:STDOUT: %.loc125_11: ref DeriveFromFinal = deref %p.ref -// CHECK:STDOUT: %a.ref: = name_ref a, @Final.%.loc13_8 [template = @Final.%.loc13_8] -// CHECK:STDOUT: %.loc125_14.1: ref Final = class_element_access %.loc125_11, element0 -// CHECK:STDOUT: %.loc125_14.2: ref Final = converted %.loc125_11, %.loc125_14.1 +// CHECK:STDOUT: %p.ref: %.24 = name_ref p, %p +// CHECK:STDOUT: %.loc125_11: ref %DeriveFromFinal = deref %p.ref +// CHECK:STDOUT: %a.ref: %.3 = name_ref a, @Final.%.loc13_8 [template = @Final.%.loc13_8] +// CHECK:STDOUT: %.loc125_14.1: ref %Final = class_element_access %.loc125_11, element0 +// CHECK:STDOUT: %.loc125_14.2: ref %Final = converted %.loc125_11, %.loc125_14.1 // CHECK:STDOUT: %.loc125_14.3: ref i32 = class_element_access %.loc125_14.2, element0 // CHECK:STDOUT: %.loc125_14.4: i32 = bind_value %.loc125_14.3 // CHECK:STDOUT: return %.loc125_14.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p: DeriveFromFinal*) -> i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBaseFinal_NoMember(%p: %.24) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: DeriveFromFinal* = name_ref p, %p -// CHECK:STDOUT: %.loc132: ref DeriveFromFinal = deref %p.ref +// CHECK:STDOUT: %p.ref: %.24 = name_ref p, %p +// CHECK:STDOUT: %.loc132: ref %DeriveFromFinal = deref %p.ref // CHECK:STDOUT: %b.ref: = name_ref b, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_base_method_define.carbon b/toolchain/check/testdata/class/fail_base_method_define.carbon index a73386fcbfed..d7a5ff6d96ad 100644 --- a/toolchain/check/testdata/class/fail_base_method_define.carbon +++ b/toolchain/check/testdata/class/fail_base_method_define.carbon @@ -37,19 +37,19 @@ fn D.C.F() {} // 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: %F.1: = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type D, B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: B} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %D, %B [template] +// CHECK:STDOUT: %.5: type = struct_type {.base: %B} [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.6: > = struct_value () [template] +// CHECK:STDOUT: %.6: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,12 +61,12 @@ fn D.C.F() {} // CHECK:STDOUT: %Core: = namespace [template] {} // 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: = fn_decl @F.3 [template = constants.%F.3] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.6] {} +// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.6] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// 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: // CHECK:STDOUT: !members: @@ -76,7 +76,7 @@ fn D.C.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -85,7 +85,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc20: %.4 = base_decl %B, element0 [template] // 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 426ec14acb50..eda666e07a11 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/class/fail_base_modifiers.carbon b/toolchain/check/testdata/class/fail_base_modifiers.carbon index 6131bb91af07..488ef0b84dee 100644 --- a/toolchain/check/testdata/class/fail_base_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_base_modifiers.carbon @@ -58,15 +58,15 @@ class C4 { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %C1: type = class_type @C1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type C1, B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: B} [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: %C2: type = class_type @C2 [template] -// CHECK:STDOUT: %.6: type = unbound_element_type C2, B [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %C2, %B [template] // CHECK:STDOUT: %C3: type = class_type @C3 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type C3, B [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %C3, %B [template] // CHECK:STDOUT: %C4: type = class_type @C4 [template] -// CHECK:STDOUT: %.8: type = unbound_element_type C4, B [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %C4, %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -93,7 +93,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc18: %.4 = base_decl %B, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C1 @@ -103,7 +103,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc30: %.6 = base_decl %B, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C2 @@ -112,7 +112,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc41: %.7 = base_decl %B, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C3 @@ -122,7 +122,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc51: %.8 = base_decl %B, element0 [template] // 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 a54b61473c6e..332407fd4734 100644 --- a/toolchain/check/testdata/class/fail_base_no_extend.carbon +++ b/toolchain/check/testdata/class/fail_base_no_extend.carbon @@ -24,9 +24,9 @@ class C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type C, B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: B} [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,7 +47,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc17: %.4 = base_decl %B, element0 [template] // 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 6c53b5ed1f24..196e7a2c13ce 100644 --- a/toolchain/check/testdata/class/fail_base_repeated.carbon +++ b/toolchain/check/testdata/class/fail_base_repeated.carbon @@ -43,11 +43,11 @@ class D { // CHECK:STDOUT: %B2: type = class_type @B2 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type C, B1 [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: B1} [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: %D: type = class_type @D [template] -// CHECK:STDOUT: %.6: type = unbound_element_type D, B1 [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %D, %B1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,7 +77,7 @@ 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: = 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: // CHECK:STDOUT: !members: @@ -88,7 +88,7 @@ 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: = base_decl B1, element0 [template] +// CHECK:STDOUT: %.loc28: %.6 = base_decl %B1, element0 [template] // CHECK:STDOUT: %B1.ref.loc35: type = name_ref B1, file.%B1.decl [template = constants.%B1] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/class/fail_base_unbound.carbon b/toolchain/check/testdata/class/fail_base_unbound.carbon index ec4a9bacf77b..7135bbef8032 100644 --- a/toolchain/check/testdata/class/fail_base_unbound.carbon +++ b/toolchain/check/testdata/class/fail_base_unbound.carbon @@ -26,9 +26,9 @@ let b: B = C.base; // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type C, B [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: B} [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,8 +42,8 @@ let b: B = C.base; // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %base.ref: = name_ref base, @C.%.loc14 [template = @C.%.loc14] -// CHECK:STDOUT: %b: B = bind_name b, +// CHECK:STDOUT: %base.ref: %.4 = name_ref base, @C.%.loc14 [template = @C.%.loc14] +// CHECK:STDOUT: %b: %B = bind_name b, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { @@ -53,7 +53,7 @@ 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: = base_decl B, element0 [template] +// CHECK:STDOUT: %.loc14: %.4 = base_decl %B, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index 90d438f38225..afcf5a3c24ef 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -29,16 +29,16 @@ fn AccessBInA(a: A) -> i32 { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [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: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = unbound_element_type B, i32 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %B, i32 [template] // CHECK:STDOUT: %.5: type = struct_type {.b: i32} [template] // CHECK:STDOUT: %AccessBInA.type: type = fn_type @AccessBInA [template] -// CHECK:STDOUT: %AccessBInA: = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type {.a: i32} [template] -// CHECK:STDOUT: %.7: type = ptr_type {.b: i32} [template] +// CHECK:STDOUT: %AccessBInA: %AccessBInA.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,14 +50,14 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AccessBInA.decl: = fn_decl @AccessBInA [template = constants.%AccessBInA] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessBInA.decl: %AccessBInA.type = fn_decl @AccessBInA [template = constants.%AccessBInA] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %a.loc19_15.1: A = param a -// CHECK:STDOUT: @AccessBInA.%a: A = bind_name a, %a.loc19_15.1 +// CHECK:STDOUT: %a.loc19_15.1: %A = param a +// CHECK:STDOUT: @AccessBInA.%a: %A = bind_name a, %a.loc19_15.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_32, %.loc19_24.1 [template = i32] @@ -69,7 +69,7 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -80,7 +80,7 @@ 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: = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc16_8: %.4 = field_decl b, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -89,11 +89,11 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessBInA(%a: A) -> i32 { +// CHECK:STDOUT: fn @AccessBInA(%a: %A) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: A = name_ref a, %a +// 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: = 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: %.loc23: i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return // 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 1c2582334134..2f5165d65b55 100644 --- a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon +++ b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon @@ -25,7 +25,7 @@ fn Make() -> C { // 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: %Make: = struct_value () [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 123 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } @@ -38,9 +38,9 @@ fn Make() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @Make.%return: ref C = var +// CHECK:STDOUT: @Make.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -53,10 +53,10 @@ fn Make() -> C { // CHECK:STDOUT: .a = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> %return: C { +// CHECK:STDOUT: fn @Make() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_16: i32 = int_literal 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc19_19: {.a: i32} = struct_literal (%.loc19_16) +// CHECK:STDOUT: %.loc19_19: %.3 = 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 88dfc19708ec..30d9511e19a6 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -40,28 +40,28 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type A1, i32 [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: %A2: type = class_type @A2 [template] -// CHECK:STDOUT: %.4: 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: %.5: type = ptr_type {.a: i32} [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: type = ptr_type B2 [template] -// CHECK:STDOUT: %.10: type = ptr_type A1 [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [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: type = ptr_type %B2 [template] +// CHECK:STDOUT: %.10: type = ptr_type %A1 [template] // CHECK:STDOUT: %ConvertUnrelated.type: type = fn_type @ConvertUnrelated [template] -// CHECK:STDOUT: %ConvertUnrelated: = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: {.a: i32}*, .b: i32} [template] -// CHECK:STDOUT: %.12: type = ptr_type {.base: {.a: i32}*, .b: i32} [template] -// CHECK:STDOUT: %.13: type = ptr_type {.base: A2, .b: i32} [template] +// CHECK:STDOUT: %ConvertUnrelated: %ConvertUnrelated.type = struct_value () [template] +// CHECK:STDOUT: %.11: type = struct_type {.base: %.5, .b: i32} [template] +// CHECK:STDOUT: %.12: type = ptr_type %.11 [template] +// CHECK:STDOUT: %.13: type = ptr_type %.8 [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.14: type = ptr_type Incomplete [template] -// CHECK:STDOUT: %.15: type = ptr_type A2 [template] +// CHECK:STDOUT: %.14: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.15: type = ptr_type %A2 [template] // CHECK:STDOUT: %ConvertIncomplete.type: type = fn_type @ConvertIncomplete [template] -// CHECK:STDOUT: %ConvertIncomplete: = struct_value () [template] +// CHECK:STDOUT: %ConvertIncomplete: %ConvertIncomplete.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,29 +76,29 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A1.decl: type = class_decl @A1 [template = constants.%A1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %A2.decl: type = class_decl @A2 [template = constants.%A2] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B2.decl: type = class_decl @B2 [template = constants.%B2] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %ConvertUnrelated.decl: = fn_decl @ConvertUnrelated [template = constants.%ConvertUnrelated] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertUnrelated.decl: %ConvertUnrelated.type = fn_decl @ConvertUnrelated [template = constants.%ConvertUnrelated] { // CHECK:STDOUT: %B2.ref: type = name_ref B2, %B2.decl [template = constants.%B2] -// CHECK:STDOUT: %.loc28_26: type = ptr_type B2 [template = constants.%.9] -// CHECK:STDOUT: %p.loc28_21.1: B2* = param p -// CHECK:STDOUT: @ConvertUnrelated.%p: B2* = bind_name p, %p.loc28_21.1 +// CHECK:STDOUT: %.loc28_26: type = ptr_type %B2 [template = constants.%.9] +// CHECK:STDOUT: %p.loc28_21.1: %.9 = param p +// CHECK:STDOUT: @ConvertUnrelated.%p: %.9 = bind_name p, %p.loc28_21.1 // CHECK:STDOUT: %A1.ref: type = name_ref A1, %A1.decl [template = constants.%A1] -// CHECK:STDOUT: %.loc28_34: type = ptr_type A1 [template = constants.%.10] -// CHECK:STDOUT: @ConvertUnrelated.%return: ref A1* = var +// CHECK:STDOUT: %.loc28_34: type = ptr_type %A1 [template = constants.%.10] +// CHECK:STDOUT: @ConvertUnrelated.%return: ref %.10 = var // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} -// CHECK:STDOUT: %ConvertIncomplete.decl: = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { +// CHECK:STDOUT: %ConvertIncomplete.decl: %ConvertIncomplete.type = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc35_35: type = ptr_type Incomplete [template = constants.%.14] -// CHECK:STDOUT: %p.loc35_22.1: Incomplete* = param p -// CHECK:STDOUT: @ConvertIncomplete.%p: Incomplete* = bind_name p, %p.loc35_22.1 +// CHECK:STDOUT: %.loc35_35: type = ptr_type %Incomplete [template = constants.%.14] +// CHECK:STDOUT: %p.loc35_22.1: %.14 = param p +// CHECK:STDOUT: @ConvertIncomplete.%p: %.14 = bind_name p, %p.loc35_22.1 // CHECK:STDOUT: %A2.ref: type = name_ref A2, %A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc35_43: type = ptr_type A2 [template = constants.%.15] -// CHECK:STDOUT: @ConvertIncomplete.%return: ref A2* = var +// CHECK:STDOUT: %.loc35_43: type = ptr_type %A2 [template = constants.%.15] +// CHECK:STDOUT: @ConvertIncomplete.%return: ref %.15 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,7 +106,7 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A1 @@ -117,7 +117,7 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc16_8: %.4 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A2 @@ -126,11 +126,11 @@ 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: = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc21_8: %.7 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 @@ -143,15 +143,15 @@ 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: B2*) -> A1* { +// CHECK:STDOUT: fn @ConvertUnrelated(%p: %.9) -> %.10 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: B2* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertIncomplete(%p: Incomplete*) -> A2* { +// CHECK:STDOUT: fn @ConvertIncomplete(%p: %.14) -> %.15 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Incomplete* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.14 = name_ref p, %p // CHECK:STDOUT: return // 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 cf5fbb828265..66b73eb36909 100644 --- a/toolchain/check/testdata/class/fail_extend_cycle.carbon +++ b/toolchain/check/testdata/class/fail_extend_cycle.carbon @@ -38,11 +38,11 @@ base class A { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %.4: type = unbound_element_type B, A [template] -// CHECK:STDOUT: %.5: type = struct_type {.base: A} [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: type = class_type @.1 [template] -// CHECK:STDOUT: %.7: type = unbound_element_type , A [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %.6, %A [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -64,7 +64,7 @@ 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: = base_decl A, element0 [template] +// CHECK:STDOUT: %.loc16: %.4 = base_decl %A, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -74,7 +74,7 @@ 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: > = base_decl A, element0 [template] +// CHECK:STDOUT: %.loc27: %.7 = base_decl %A, element0 [template] // CHECK:STDOUT: %C.ref: = name_ref C, [template = ] // CHECK:STDOUT: %.loc31: = field_decl c, element1 [template] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index bc04a7902678..a69d86dd2294 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -40,8 +40,8 @@ class Class { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, i32 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = struct_type {.j: i32, .k: i32} [template] @@ -54,21 +54,21 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: 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: = field_decl j, element0 [template] +// CHECK:STDOUT: %.loc17_16: %.2 = 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: = field_decl k, element1 [template] +// CHECK:STDOUT: %.loc23_14: %.2 = 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] diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index e416723009d8..6233cacf7d95 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -37,17 +37,17 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, T [symbolic] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: T} [symbolic] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %T} [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: > = struct_value () [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,12 +56,12 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_32, %.loc32_14.1 [template = i32] @@ -78,14 +78,14 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc12: = field_decl a, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %.loc12: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] -// CHECK:STDOUT: %self.loc13_8.1: Class = param self -// CHECK:STDOUT: %self.loc13_8.2: Class = bind_name self, %self.loc13_8.1 +// CHECK:STDOUT: %self.loc13_8.1: %Class.2 = param self +// CHECK:STDOUT: %self.loc13_8.2: %Class.2 = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc13_20.1: T = param n -// CHECK:STDOUT: %n.loc13_20.2: T = bind_name n, %n.loc13_20.1 +// CHECK:STDOUT: %n.loc13_20.1: %T = param n +// CHECK:STDOUT: %n.loc13_20.2: %T = bind_name n, %n.loc13_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -94,7 +94,7 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[@Class.%self.loc13_8.2: Class](@Class.%n.loc13_20.2: T); +// CHECK:STDOUT: fn @F[@Class.%self.loc13_8.2: %Class.2](@Class.%n.loc13_20.2: %T); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index 801e4d10c30c..5f240439c5c6 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -141,31 +141,31 @@ fn CallReturnIncomplete() { // 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: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %CallClassFunction.type: type = fn_type @CallClassFunction [template] -// CHECK:STDOUT: %CallClassFunction: = struct_value () [template] +// CHECK:STDOUT: %CallClassFunction: %CallClassFunction.type = struct_value () [template] // CHECK:STDOUT: %ConvertFromStruct.type: type = fn_type @ConvertFromStruct [template] -// CHECK:STDOUT: %ConvertFromStruct: = struct_value () [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: %.4: type = ptr_type %Class [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %MemberAccess.type: type = fn_type @MemberAccess [template] -// CHECK:STDOUT: %MemberAccess: = struct_value () [template] +// CHECK:STDOUT: %MemberAccess: %MemberAccess.type = struct_value () [template] // CHECK:STDOUT: %Copy.type: type = fn_type @Copy [template] -// CHECK:STDOUT: %Copy: = struct_value () [template] +// CHECK:STDOUT: %Copy: %Copy.type = struct_value () [template] // CHECK:STDOUT: %Let.type: type = fn_type @Let [template] -// CHECK:STDOUT: %Let: = struct_value () [template] +// CHECK:STDOUT: %Let: %Let.type = struct_value () [template] // CHECK:STDOUT: %TakeIncomplete.type: type = fn_type @TakeIncomplete [template] -// CHECK:STDOUT: %TakeIncomplete: = struct_value () [template] +// CHECK:STDOUT: %TakeIncomplete: %TakeIncomplete.type = struct_value () [template] // CHECK:STDOUT: %ReturnIncomplete.type: type = fn_type @ReturnIncomplete [template] -// CHECK:STDOUT: %ReturnIncomplete: = struct_value () [template] +// CHECK:STDOUT: %ReturnIncomplete: %ReturnIncomplete.type = struct_value () [template] // CHECK:STDOUT: %CallTakeIncomplete.type: type = fn_type @CallTakeIncomplete [template] -// CHECK:STDOUT: %CallTakeIncomplete: = struct_value () [template] +// CHECK:STDOUT: %CallTakeIncomplete: %CallTakeIncomplete.type = struct_value () [template] // CHECK:STDOUT: %CallReturnIncomplete.type: type = fn_type @CallReturnIncomplete [template] -// CHECK:STDOUT: %CallReturnIncomplete: = struct_value () [template] +// CHECK:STDOUT: %CallReturnIncomplete: %CallReturnIncomplete.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -186,67 +186,67 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} -// CHECK:STDOUT: %CallClassFunction.decl: = fn_decl @CallClassFunction [template = constants.%CallClassFunction] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %CallClassFunction.decl: %CallClassFunction.type = fn_decl @CallClassFunction [template = constants.%CallClassFunction] {} // CHECK:STDOUT: %Class.ref.loc40: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %global_var.var: ref = var global_var // CHECK:STDOUT: %global_var: ref = bind_name global_var, %global_var.var -// CHECK:STDOUT: %ConvertFromStruct.decl: = fn_decl @ConvertFromStruct [template = constants.%ConvertFromStruct] { +// CHECK:STDOUT: %ConvertFromStruct.decl: %ConvertFromStruct.type = fn_decl @ConvertFromStruct [template = constants.%ConvertFromStruct] { // CHECK:STDOUT: %Class.ref.loc49: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: @ConvertFromStruct.%return: ref Class = var +// CHECK:STDOUT: @ConvertFromStruct.%return: ref %Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc51: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc51_14: type = ptr_type Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc51_6.1: Class* = param p -// CHECK:STDOUT: @G.%p: Class* = bind_name p, %p.loc51_6.1 +// CHECK:STDOUT: %.loc51_14: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.loc51_6.1: %.4 = param p +// CHECK:STDOUT: @G.%p: %.4 = bind_name p, %p.loc51_6.1 // CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc51_20.1: type = value_of_initializer %int.make_type_32.loc51 [template = i32] // CHECK:STDOUT: %.loc51_20.2: type = converted %int.make_type_32.loc51, %.loc51_20.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %MemberAccess.decl: = fn_decl @MemberAccess [template = constants.%MemberAccess] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MemberAccess.decl: %MemberAccess.type = fn_decl @MemberAccess [template = constants.%MemberAccess] { // CHECK:STDOUT: %Class.ref.loc62: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc62_25: type = ptr_type Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc62_17.1: Class* = param p -// CHECK:STDOUT: @MemberAccess.%p: Class* = bind_name p, %p.loc62_17.1 +// CHECK:STDOUT: %.loc62_25: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.loc62_17.1: %.4 = param p +// CHECK:STDOUT: @MemberAccess.%p: %.4 = bind_name p, %p.loc62_17.1 // CHECK:STDOUT: %int.make_type_32.loc62: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc62_31.1: type = value_of_initializer %int.make_type_32.loc62 [template = i32] // CHECK:STDOUT: %.loc62_31.2: type = converted %int.make_type_32.loc62, %.loc62_31.1 [template = i32] // CHECK:STDOUT: @MemberAccess.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Copy.decl: = fn_decl @Copy [template = constants.%Copy] { +// CHECK:STDOUT: %Copy.decl: %Copy.type = fn_decl @Copy [template = constants.%Copy] { // CHECK:STDOUT: %Class.ref.loc80_12: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc80: type = ptr_type Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc80_9.1: Class* = param p -// CHECK:STDOUT: @Copy.%p: Class* = bind_name p, %p.loc80_9.1 +// CHECK:STDOUT: %.loc80: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.loc80_9.1: %.4 = param p +// CHECK:STDOUT: @Copy.%p: %.4 = bind_name p, %p.loc80_9.1 // CHECK:STDOUT: %Class.ref.loc80_23: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: @Copy.%return: ref Class = var +// CHECK:STDOUT: @Copy.%return: ref %Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Let.decl: = fn_decl @Let [template = constants.%Let] { +// CHECK:STDOUT: %Let.decl: %Let.type = fn_decl @Let [template = constants.%Let] { // CHECK:STDOUT: %Class.ref.loc84: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc84: type = ptr_type Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc84_8.1: Class* = param p -// CHECK:STDOUT: @Let.%p: Class* = bind_name p, %p.loc84_8.1 +// CHECK:STDOUT: %.loc84: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.loc84_8.1: %.4 = param p +// CHECK:STDOUT: @Let.%p: %.4 = bind_name p, %p.loc84_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %TakeIncomplete.decl: = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { +// CHECK:STDOUT: %TakeIncomplete.decl: %TakeIncomplete.type = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { // CHECK:STDOUT: %Class.ref.loc95: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc95_19.1: Class = param c -// CHECK:STDOUT: @TakeIncomplete.%c: Class = bind_name c, %c.loc95_19.1 +// CHECK:STDOUT: %c.loc95_19.1: %Class = param c +// CHECK:STDOUT: @TakeIncomplete.%c: %Class = bind_name c, %c.loc95_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnIncomplete.decl: = fn_decl @ReturnIncomplete [template = constants.%ReturnIncomplete] { +// CHECK:STDOUT: %ReturnIncomplete.decl: %ReturnIncomplete.type = fn_decl @ReturnIncomplete [template = constants.%ReturnIncomplete] { // CHECK:STDOUT: %Class.ref.loc97: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: @ReturnIncomplete.%return: ref Class = var +// CHECK:STDOUT: @ReturnIncomplete.%return: ref %Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %CallTakeIncomplete.decl: = fn_decl @CallTakeIncomplete [template = constants.%CallTakeIncomplete] { +// CHECK:STDOUT: %CallTakeIncomplete.decl: %CallTakeIncomplete.type = fn_decl @CallTakeIncomplete [template = constants.%CallTakeIncomplete] { // CHECK:STDOUT: %Class.ref.loc99: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc99: type = ptr_type Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc99_23.1: Class* = param p -// CHECK:STDOUT: @CallTakeIncomplete.%p: Class* = bind_name p, %p.loc99_23.1 +// CHECK:STDOUT: %.loc99: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.loc99_23.1: %.4 = param p +// CHECK:STDOUT: @CallTakeIncomplete.%p: %.4 = bind_name p, %p.loc99_23.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %CallReturnIncomplete.decl: = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} +// CHECK:STDOUT: %CallReturnIncomplete.decl: %CallReturnIncomplete.type = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class; @@ -263,63 +263,63 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertFromStruct() -> Class { +// CHECK:STDOUT: fn @ConvertFromStruct() -> %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc49: {} = struct_literal () +// CHECK:STDOUT: %.loc49: %.3 = 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: Class*) -> i32 { +// CHECK:STDOUT: fn @G(%p: %.4) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc59: ref Class = deref %p.ref +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %.loc59: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @MemberAccess(%p: Class*) -> i32 { +// CHECK:STDOUT: fn @MemberAccess(%p: %.4) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc70: ref Class = deref %p.ref +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %.loc70: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Copy(%p: Class*) -> Class { +// CHECK:STDOUT: fn @Copy(%p: %.4) -> %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc81: ref Class = deref %p.ref +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %.loc81: ref %Class = deref %p.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Let(%p: Class*) { +// CHECK:STDOUT: fn @Let(%p: %.4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc92: ref Class = deref %p.ref +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %.loc92: ref %Class = deref %p.ref // CHECK:STDOUT: %c: = bind_name c, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TakeIncomplete(%c: Class); +// CHECK:STDOUT: fn @TakeIncomplete(%c: %Class); // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnIncomplete() -> Class; +// CHECK:STDOUT: fn @ReturnIncomplete() -> %Class; // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallTakeIncomplete(%p: Class*) { +// CHECK:STDOUT: fn @CallTakeIncomplete(%p: %.4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TakeIncomplete.ref.loc110: = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc110: ref Class = deref %p.ref -// CHECK:STDOUT: %TakeIncomplete.call.loc110: init () = call %TakeIncomplete.ref.loc110() [template = ] -// CHECK:STDOUT: %TakeIncomplete.ref.loc122: = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] -// CHECK:STDOUT: %.loc122: {} = struct_literal () -// CHECK:STDOUT: %TakeIncomplete.call.loc122: init () = call %TakeIncomplete.ref.loc122() [template = ] +// CHECK:STDOUT: %TakeIncomplete.ref.loc110: %TakeIncomplete.type = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p +// CHECK:STDOUT: %.loc110: ref %Class = deref %p.ref +// CHECK:STDOUT: %TakeIncomplete.call.loc110: init %.1 = call %TakeIncomplete.ref.loc110() [template = ] +// CHECK:STDOUT: %TakeIncomplete.ref.loc122: %TakeIncomplete.type = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] +// CHECK:STDOUT: %.loc122: %.3 = struct_literal () +// CHECK:STDOUT: %TakeIncomplete.call.loc122: init %.1 = call %TakeIncomplete.ref.loc122() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallReturnIncomplete() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ReturnIncomplete.ref: = name_ref ReturnIncomplete, file.%ReturnIncomplete.decl [template = constants.%ReturnIncomplete] +// CHECK:STDOUT: %ReturnIncomplete.ref: %ReturnIncomplete.type = name_ref ReturnIncomplete, file.%ReturnIncomplete.decl [template = constants.%ReturnIncomplete] // CHECK:STDOUT: %ReturnIncomplete.call: init = call %ReturnIncomplete.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 359bdd1cbe01..ffc6f633cf65 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -36,14 +36,14 @@ fn F() { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] // CHECK:STDOUT: %.8: type = struct_type {.a: i32, .c: i32} [template] // CHECK:STDOUT: %.9: i32 = int_literal 3 [template] @@ -58,20 +58,20 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -84,28 +84,28 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc21_9: i32 = int_literal 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc21_10.1: {.a: i32} = struct_literal (%.loc21_9) +// 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: %.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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc26_17: i32 = int_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc26_18.1: {.a: i32, .c: i32} = struct_literal (%.loc26_9, %.loc26_17) +// 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.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.%.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: %.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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc30_17: i32 = int_literal 2 [template = constants.%.7] // CHECK:STDOUT: %.loc30_25: i32 = int_literal 3 [template = constants.%.9] -// CHECK:STDOUT: %.loc30_26.1: {.a: i32, .b: i32, .c: i32} = struct_literal (%.loc30_9, %.loc30_17, %.loc30_25) +// 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, -// CHECK:STDOUT: %.loc30_28: ref Class = converted %.loc30_26.1, %.loc30_26.3 +// CHECK:STDOUT: %.loc30_26.2: ref %Class = temporary_storage +// CHECK:STDOUT: %.loc30_26.3: ref %Class = temporary %.loc30_26.2, +// CHECK:STDOUT: %.loc30_28: ref %Class = converted %.loc30_26.1, %.loc30_26.3 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 3a5734a81caf..d393785ce225 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -32,18 +32,18 @@ fn F() { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: type = ptr_type Class [template] +// CHECK:STDOUT: %.4: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: Class = struct_value (%.6, %.7) [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.6, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,26 +55,26 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16: type = ptr_type Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc16_6.1: Class* = param p -// CHECK:STDOUT: @G.%p: Class* = bind_name p, %p.loc16_6.1 +// CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.4] +// CHECK:STDOUT: %p.loc16_6.1: %.4 = param p +// CHECK:STDOUT: @G.%p: %.4 = bind_name p, %p.loc16_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -84,31 +84,31 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p: Class*); +// CHECK:STDOUT: fn @G(%p: %.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: %c.var: ref %Class = var c +// CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %.loc25_24: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %.loc25_32: i32 = int_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_33.1: {.a: i32, .b: i32} = struct_literal (%.loc25_24, %.loc25_32) +// CHECK:STDOUT: %.loc25_33.1: %.3 = 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.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.%.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.%.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 -// CHECK:STDOUT: %.loc25_35.2: Class = bind_value %.loc25_35.1 +// 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 +// CHECK:STDOUT: %.loc25_35.2: %Class = bind_value %.loc25_35.1 // CHECK:STDOUT: assign %c.var, -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %c.ref: ref Class = name_ref c, %c -// CHECK:STDOUT: %.loc26: Class* = addr_of %c.ref -// CHECK:STDOUT: %G.call: init () = call %G.ref(%.loc26) +// 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: %.4 = addr_of %c.ref +// CHECK:STDOUT: %G.call: init %.1 = 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 9c739b4fd363..54cc1a36c9e7 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -42,19 +42,19 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.1: type = ptr_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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] -// CHECK:STDOUT: %.5: type = unbound_element_type B, A [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: A} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.6: type = struct_type {.a: %A} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: {}*} [template] -// CHECK:STDOUT: %.8: type = ptr_type {.a: A} [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.7: type = struct_type {.a: %.4} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,24 +67,24 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %Core: = namespace [template] {} // 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: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc19: type = struct_type {.a: A} [template = constants.%.6] -// CHECK:STDOUT: %s.loc19_6.1: {.a: A} = param s -// CHECK:STDOUT: @F.2.%s: {.a: A} = bind_name s, %s.loc19_6.1 +// CHECK:STDOUT: %.loc19: type = struct_type {.a: %A} [template = constants.%.6] +// CHECK:STDOUT: %s.loc19_6.1: %.6 = param s +// CHECK:STDOUT: @F.2.%s: %.6 = bind_name s, %s.loc19_6.1 // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %b.loc19_18.1: B = param b -// CHECK:STDOUT: @F.2.%b: B = bind_name b, %b.loc19_18.1 +// CHECK:STDOUT: %b.loc19_18.1: %B = param b +// CHECK:STDOUT: @F.2.%b: %B = bind_name b, %b.loc19_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc12_20: type = ptr_type A [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: A* = param self -// CHECK:STDOUT: %self.loc12_13.3: A* = bind_name self, %self.loc12_13.1 -// CHECK:STDOUT: %.loc12_8: A* = addr_pattern %self.loc12_13.3 +// CHECK:STDOUT: %.loc12_20: type = ptr_type %A [template = constants.%.1] +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 +// CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -94,29 +94,29 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc16: %.5 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .a = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[addr @A.%self.loc12_13.3: A*](); +// CHECK:STDOUT: fn @F.1[addr @A.%self.loc12_13.3: %.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%s: {.a: A}, %b: B) { +// CHECK:STDOUT: fn @F.2(%s: %.6, %b: %B) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %s.ref: {.a: A} = name_ref s, %s -// CHECK:STDOUT: %.loc28_4: A = struct_access %s.ref, element0 -// CHECK:STDOUT: %F.ref.loc28: = name_ref F, @A.%F.decl [template = constants.%F.1] +// 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 () = call %.loc28_6() [template = ] -// CHECK:STDOUT: %b.ref: B = name_ref b, %b -// CHECK:STDOUT: %a.ref: = 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: = name_ref F, @A.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %F.call.loc28: init %.2 = call %.loc28_6() [template = ] +// CHECK:STDOUT: %b.ref: %B = name_ref b, %b +// 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 () = call %.loc38_6() [template = ] +// CHECK:STDOUT: %F.call.loc38: init %.2 = call %.loc38_6() [template = ] // 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 14402ab5a355..ba40ad4a6c93 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -28,12 +28,12 @@ fn T.F() {} // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,14 +43,14 @@ fn T.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %T: type = bind_name T, %Class.ref -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index 6ca209ef1273..c7b774e416da 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -52,13 +52,13 @@ fn F(c: Class) { // 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: %NoSelf: = struct_value () [template] +// CHECK:STDOUT: %NoSelf: %NoSelf.type = struct_value () [template] // CHECK:STDOUT: %WithSelf.type: type = fn_type @WithSelf [template] -// CHECK:STDOUT: %WithSelf: = struct_value () [template] +// CHECK:STDOUT: %WithSelf: %WithSelf.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -71,21 +71,21 @@ fn F(c: Class) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %Class.ref.loc16: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %WithSelf.ref: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] -// CHECK:STDOUT: %A: = bind_alias A, @Class.%WithSelf.decl [template = constants.%WithSelf] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %WithSelf.ref: %WithSelf.type = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] +// CHECK:STDOUT: %A: %WithSelf.type = bind_alias A, @Class.%WithSelf.decl [template = constants.%WithSelf] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc18: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc18_6.1: Class = param c -// CHECK:STDOUT: @F.%c: Class = bind_name c, %c.loc18_6.1 +// CHECK:STDOUT: %c.loc18_6.1: %Class = param c +// CHECK:STDOUT: @F.%c: %Class = bind_name c, %c.loc18_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %NoSelf.decl: = fn_decl @NoSelf [template = constants.%NoSelf] {} -// CHECK:STDOUT: %WithSelf.decl: = fn_decl @WithSelf [template = constants.%WithSelf] { +// CHECK:STDOUT: %NoSelf.decl: %NoSelf.type = fn_decl @NoSelf [template = constants.%NoSelf] {} +// CHECK:STDOUT: %WithSelf.decl: %WithSelf.type = fn_decl @WithSelf [template = constants.%WithSelf] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %self.loc13_15.1: Class = param self -// CHECK:STDOUT: %self.loc13_15.2: Class = bind_name self, %self.loc13_15.1 +// CHECK:STDOUT: %self.loc13_15.1: %Class = param self +// CHECK:STDOUT: %self.loc13_15.2: %Class = bind_name self, %self.loc13_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -96,29 +96,29 @@ fn F(c: Class) { // CHECK:STDOUT: // CHECK:STDOUT: fn @NoSelf(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @WithSelf[@Class.%self.loc13_15.2: Class](); +// CHECK:STDOUT: fn @WithSelf[@Class.%self.loc13_15.2: %Class](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%c: Class) { +// CHECK:STDOUT: fn @F(%c: %Class) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref.loc19: Class = name_ref c, %c -// CHECK:STDOUT: %NoSelf.ref.loc19: = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] -// CHECK:STDOUT: %NoSelf.call.loc19: init () = call %NoSelf.ref.loc19() -// CHECK:STDOUT: %c.ref.loc20: Class = name_ref c, %c -// CHECK:STDOUT: %WithSelf.ref.loc20: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] +// 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: %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 () = call %.loc20(%c.ref.loc20) +// CHECK:STDOUT: %WithSelf.call.loc20: init %.1 = 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: = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] -// CHECK:STDOUT: %NoSelf.call.loc22: init () = call %NoSelf.ref.loc22() +// 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: %Class.ref.loc30: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %WithSelf.ref.loc30: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] -// CHECK:STDOUT: %WithSelf.call.loc30: init () = call %WithSelf.ref.loc30() [template = ] +// 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() [template = ] // CHECK:STDOUT: %Class.ref.loc38: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %WithSelf.ref.loc38: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] -// CHECK:STDOUT: %c.ref.loc38: Class = name_ref c, %c -// CHECK:STDOUT: %WithSelf.call.loc38: init () = call %WithSelf.ref.loc38() [template = ] -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A [template = constants.%WithSelf] -// CHECK:STDOUT: %WithSelf.call.loc46: init () = call %A.ref() [template = ] +// 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: %WithSelf.call.loc38: init %.1 = call %WithSelf.ref.loc38() [template = ] +// CHECK:STDOUT: %A.ref: %WithSelf.type = name_ref A, file.%A [template = constants.%WithSelf] +// CHECK:STDOUT: %WithSelf.call.loc46: init %.1 = call %A.ref() [template = ] // 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 9f768a142ab7..01d8a20482d9 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -61,18 +61,18 @@ base class BaseClass { // 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: %Abstract.1: = struct_value () [template] +// CHECK:STDOUT: %Abstract.1: %Abstract.type.1 = struct_value () [template] // CHECK:STDOUT: %Virtual.type: type = fn_type @Virtual [template] -// CHECK:STDOUT: %Virtual: = struct_value () [template] +// CHECK:STDOUT: %Virtual: %Virtual.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %AbstractClass: type = class_type @AbstractClass [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] -// CHECK:STDOUT: %Default: = struct_value () [template] +// CHECK:STDOUT: %Default: %Default.type = struct_value () [template] // CHECK:STDOUT: %Final.type: type = fn_type @Final [template] -// CHECK:STDOUT: %Final: = struct_value () [template] +// CHECK:STDOUT: %Final: %Final.type = struct_value () [template] // CHECK:STDOUT: %BaseClass: type = class_type @BaseClass [template] // CHECK:STDOUT: %Abstract.type.2: type = fn_type @Abstract.2 [template] -// CHECK:STDOUT: %Abstract.2: = struct_value () [template] +// CHECK:STDOUT: %Abstract.2: %Abstract.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,15 +89,15 @@ base class BaseClass { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FinalClass { -// CHECK:STDOUT: %Abstract.decl: = fn_decl @Abstract.1 [template = constants.%Abstract.1] { +// CHECK:STDOUT: %Abstract.decl: %Abstract.type.1 = fn_decl @Abstract.1 [template = constants.%Abstract.1] { // CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] -// CHECK:STDOUT: %self.loc20_24.1: FinalClass = param self -// CHECK:STDOUT: %self.loc20_24.2: FinalClass = bind_name self, %self.loc20_24.1 +// CHECK:STDOUT: %self.loc20_24.1: %FinalClass = param self +// CHECK:STDOUT: %self.loc20_24.2: %FinalClass = bind_name self, %self.loc20_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Virtual.decl: = fn_decl @Virtual [template = constants.%Virtual] { +// CHECK:STDOUT: %Virtual.decl: %Virtual.type = fn_decl @Virtual [template = constants.%Virtual] { // CHECK:STDOUT: %Self.ref.loc29: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] -// CHECK:STDOUT: %self.loc29_22.1: FinalClass = param self -// CHECK:STDOUT: %self.loc29_22.2: FinalClass = bind_name self, %self.loc29_22.1 +// CHECK:STDOUT: %self.loc29_22.1: %FinalClass = param self +// CHECK:STDOUT: %self.loc29_22.2: %FinalClass = bind_name self, %self.loc29_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -107,15 +107,15 @@ base class BaseClass { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AbstractClass { -// CHECK:STDOUT: %Default.decl: = fn_decl @Default [template = constants.%Default] { +// CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] { // CHECK:STDOUT: %Self.ref.loc38: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] -// CHECK:STDOUT: %self.loc38_22.1: AbstractClass = param self -// CHECK:STDOUT: %self.loc38_22.2: AbstractClass = bind_name self, %self.loc38_22.1 +// CHECK:STDOUT: %self.loc38_22.1: %AbstractClass = param self +// CHECK:STDOUT: %self.loc38_22.2: %AbstractClass = bind_name self, %self.loc38_22.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Final.decl: = fn_decl @Final [template = constants.%Final] { +// CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] { // CHECK:STDOUT: %Self.ref.loc44: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] -// CHECK:STDOUT: %self.loc44_18.1: AbstractClass = param self -// CHECK:STDOUT: %self.loc44_18.2: AbstractClass = bind_name self, %self.loc44_18.1 +// CHECK:STDOUT: %self.loc44_18.1: %AbstractClass = param self +// CHECK:STDOUT: %self.loc44_18.2: %AbstractClass = bind_name self, %self.loc44_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -125,10 +125,10 @@ base class BaseClass { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @BaseClass { -// CHECK:STDOUT: %Abstract.decl: = fn_decl @Abstract.2 [template = constants.%Abstract.2] { +// CHECK:STDOUT: %Abstract.decl: %Abstract.type.2 = fn_decl @Abstract.2 [template = constants.%Abstract.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%BaseClass [template = constants.%BaseClass] -// CHECK:STDOUT: %self.loc55_24.1: BaseClass = param self -// CHECK:STDOUT: %self.loc55_24.2: BaseClass = bind_name self, %self.loc55_24.1 +// CHECK:STDOUT: %self.loc55_24.1: %BaseClass = param self +// CHECK:STDOUT: %self.loc55_24.2: %BaseClass = bind_name self, %self.loc55_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -136,13 +136,13 @@ base class BaseClass { // CHECK:STDOUT: .Abstract = %Abstract.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Abstract.1[@FinalClass.%self.loc20_24.2: FinalClass](); +// CHECK:STDOUT: fn @Abstract.1[@FinalClass.%self.loc20_24.2: %FinalClass](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Virtual[@FinalClass.%self.loc29_22.2: FinalClass](); +// CHECK:STDOUT: fn @Virtual[@FinalClass.%self.loc29_22.2: %FinalClass](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Default[@AbstractClass.%self.loc38_22.2: AbstractClass](); +// CHECK:STDOUT: fn @Default[@AbstractClass.%self.loc38_22.2: %AbstractClass](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Final[@AbstractClass.%self.loc44_18.2: AbstractClass](); +// CHECK:STDOUT: fn @Final[@AbstractClass.%self.loc44_18.2: %AbstractClass](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Abstract.2[@BaseClass.%self.loc55_24.2: BaseClass](); +// CHECK:STDOUT: fn @Abstract.2[@BaseClass.%self.loc55_24.2: %BaseClass](); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_method_redefinition.carbon b/toolchain/check/testdata/class/fail_method_redefinition.carbon index 67611f4b2c32..596570a2a0ba 100644 --- a/toolchain/check/testdata/class/fail_method_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_method_redefinition.carbon @@ -25,7 +25,7 @@ class Class { // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,8 +39,8 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc19: = fn_decl @F [template = constants.%F] {} +// 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: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class 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 f93e82e27cc0..d725ce3bbafa 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: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,7 +32,7 @@ fn C.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/class/fail_redefinition.carbon b/toolchain/check/testdata/class/fail_redefinition.carbon index f3ee4676a3f4..82b49ab8cc79 100644 --- a/toolchain/check/testdata/class/fail_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_redefinition.carbon @@ -48,21 +48,21 @@ fn Class.I() {} // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %H.type.1: type = fn_type @H.1 [template] -// CHECK:STDOUT: %H.1: = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %I.1: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %G.1: = struct_value () [template] +// CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] -// CHECK:STDOUT: %H.2: = struct_value () [template] +// CHECK:STDOUT: %H.2: %H.type.2 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = fn_type @I.2 [template] -// CHECK:STDOUT: %I.2: = struct_value () [template] +// CHECK:STDOUT: %I.2: %I.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] -// CHECK:STDOUT: %G.2: = struct_value () [template] +// CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -73,16 +73,16 @@ fn Class.I() {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H.1 [template = constants.%H.1] {} -// CHECK:STDOUT: %I.decl: = fn_decl @I.1 [template = constants.%I.1] {} +// 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] {} +// CHECK:STDOUT: %I.decl: %I.type.1 = fn_decl @I.1 [template = constants.%I.1] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H.1 [template = constants.%H.1] {} -// CHECK:STDOUT: %I.decl: = fn_decl @I.1 [template = constants.%I.1] {} +// 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: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -93,9 +93,9 @@ fn Class.I() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { -// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H.2 [template = constants.%H.2] {} -// CHECK:STDOUT: %I.decl: = fn_decl @I.2 [template = constants.%I.2] {} +// 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: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.3 diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index f22036f7134a..23d0fd595c9b 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -27,13 +27,13 @@ fn G() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,9 +44,9 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_32, %.loc17_11.1 [template = i32] @@ -55,7 +55,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index a31864279b1c..dba56fe40f9e 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -58,16 +58,16 @@ fn CallWrongSelf(ws: WrongSelf) { // 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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %WrongSelf: type = class_type @WrongSelf [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %CallWrongSelf.type: type = fn_type @CallWrongSelf [template] -// CHECK:STDOUT: %CallWrongSelf: = struct_value () [template] +// CHECK:STDOUT: %CallWrongSelf: %CallWrongSelf.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -79,32 +79,32 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc25: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc25_12.1: Class = param self -// CHECK:STDOUT: @F.1.%self: Class = bind_name self, %self.loc25_12.1 +// CHECK:STDOUT: %self.loc25_12.1: %Class = param self +// CHECK:STDOUT: @F.1.%self: %Class = bind_name self, %self.loc25_12.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc28: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: @G.%return: ref Class = var +// CHECK:STDOUT: @G.%return: ref %Class = var // CHECK:STDOUT: } // CHECK:STDOUT: %WrongSelf.decl: type = class_decl @WrongSelf [template = constants.%WrongSelf] {} -// CHECK:STDOUT: %CallWrongSelf.decl: = fn_decl @CallWrongSelf [template = constants.%CallWrongSelf] { +// CHECK:STDOUT: %CallWrongSelf.decl: %CallWrongSelf.type = fn_decl @CallWrongSelf [template = constants.%CallWrongSelf] { // CHECK:STDOUT: %WrongSelf.ref: type = name_ref WrongSelf, %WrongSelf.decl [template = constants.%WrongSelf] -// CHECK:STDOUT: %ws.loc45_18.1: WrongSelf = param ws -// CHECK:STDOUT: @CallWrongSelf.%ws: WrongSelf = bind_name ws, %ws.loc45_18.1 +// CHECK:STDOUT: %ws.loc45_18.1: %WrongSelf = param ws +// CHECK:STDOUT: @CallWrongSelf.%ws: %WrongSelf = bind_name ws, %ws.loc45_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc16_8.1: Class = param self -// CHECK:STDOUT: %self.loc16_8.2: Class = bind_name self, %self.loc16_8.1 +// CHECK:STDOUT: %self.loc16_8.1: %Class = param self +// CHECK:STDOUT: %self.loc16_8.2: %Class = bind_name self, %self.loc16_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc18: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %return.var: ref Class = var +// CHECK:STDOUT: %return.var: ref %Class = var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -114,10 +114,10 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @WrongSelf { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %self.loc42_8.1: Class = param self -// CHECK:STDOUT: %self.loc42_8.2: Class = bind_name self, %self.loc42_8.1 +// CHECK:STDOUT: %self.loc42_8.1: %Class = param self +// CHECK:STDOUT: %self.loc42_8.2: %Class = bind_name self, %self.loc42_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -125,29 +125,29 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1(%self: Class) { +// CHECK:STDOUT: fn @F.1(%self: %Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G() -> %return: Class { +// CHECK:STDOUT: fn @G() -> %return: %Class { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.var: ref Class = var self -// CHECK:STDOUT: %self: ref Class = bind_name self, %self.var -// CHECK:STDOUT: %self.ref: ref Class = name_ref self, %self -// CHECK:STDOUT: %.loc38: Class = bind_value %self.ref +// CHECK:STDOUT: %self.var: ref %Class = var self +// CHECK:STDOUT: %self: ref %Class = bind_name self, %self.var +// CHECK:STDOUT: %self.ref: ref %Class = name_ref self, %self +// CHECK:STDOUT: %.loc38: %Class = bind_value %self.ref // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[@WrongSelf.%self.loc42_8.2: Class](); +// CHECK:STDOUT: fn @F.2[@WrongSelf.%self.loc42_8.2: %Class](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallWrongSelf(%ws: WrongSelf) { +// CHECK:STDOUT: fn @CallWrongSelf(%ws: %WrongSelf) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ws.ref: WrongSelf = name_ref ws, %ws -// CHECK:STDOUT: %F.ref: = name_ref F, @WrongSelf.%F.decl [template = constants.%F.2] +// CHECK:STDOUT: %ws.ref: %WrongSelf = name_ref ws, %ws +// CHECK:STDOUT: %F.ref: %F.type.2 = name_ref F, @WrongSelf.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc52: = bound_method %ws.ref, %F.ref -// CHECK:STDOUT: %F.call: init () = call %.loc52() [template = ] +// CHECK:STDOUT: %F.call: init %.1 = call %.loc52() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_self_type_member.carbon b/toolchain/check/testdata/class/fail_self_type_member.carbon index 70314fe9dd36..e82b7f58abad 100644 --- a/toolchain/check/testdata/class/fail_self_type_member.carbon +++ b/toolchain/check/testdata/class/fail_self_type_member.carbon @@ -31,14 +31,14 @@ fn F() -> bool { // 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: %Bool: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, bool [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {.b: bool} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: bool = bool_literal true [template] -// CHECK:STDOUT: %struct: Class = struct_value (%.5) [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} @@ -47,7 +47,7 @@ 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: = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl b, element0 [template] // 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 06f01b84b706..466e35494c32 100644 --- a/toolchain/check/testdata/class/fail_todo_local_class.carbon +++ b/toolchain/check/testdata/class/fail_todo_local_class.carbon @@ -32,14 +32,14 @@ class A { // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A diff --git a/toolchain/check/testdata/class/fail_todo_modifiers.carbon b/toolchain/check/testdata/class/fail_todo_modifiers.carbon index fa547fa73fe2..dd3667c941b6 100644 --- a/toolchain/check/testdata/class/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_todo_modifiers.carbon @@ -60,26 +60,26 @@ abstract class Abstract { // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Access, i32 [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: %Base: type = class_type @Base [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %I.type: type = fn_type @I [template] -// CHECK:STDOUT: %I: = struct_value () [template] +// CHECK:STDOUT: %I: %I.type = struct_value () [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] -// CHECK:STDOUT: %J: = struct_value () [template] +// CHECK:STDOUT: %J: %J.type = struct_value () [template] // CHECK:STDOUT: %K.type: type = fn_type @K [template] -// CHECK:STDOUT: %K: = struct_value () [template] +// CHECK:STDOUT: %K: %K.type = struct_value () [template] // CHECK:STDOUT: %L.type: type = fn_type @L [template] -// CHECK:STDOUT: %L: = struct_value () [template] +// CHECK:STDOUT: %L: %L.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,23 +91,23 @@ abstract class Abstract { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Access.decl: type = class_decl @Access [template = constants.%Access] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %Abstract.decl: type = class_decl @Abstract [template = constants.%Abstract] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Access { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: %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: = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc17_16: %.2 = 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: = field_decl l, element1 [template] +// CHECK:STDOUT: %.loc19_18: %.2 = field_decl l, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Access @@ -118,8 +118,8 @@ abstract class Abstract { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} -// CHECK:STDOUT: %I.decl: = fn_decl @I [template = constants.%I] {} +// 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: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -128,9 +128,9 @@ abstract class Abstract { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %J.decl: = fn_decl @J [template = constants.%J] {} -// CHECK:STDOUT: %K.decl: = fn_decl @K [template = constants.%K] {} -// CHECK:STDOUT: %L.decl: = fn_decl @L [template = constants.%L] {} +// 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: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index cb372f492de9..def5d9c4c03b 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -32,13 +32,13 @@ fn G() -> i32 { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.field: i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,10 +49,10 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32, %.loc22_11.1 [template = i32] @@ -64,8 +64,8 @@ fn G() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_14.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_14.2: type = converted %int.make_type_32.loc12, %.loc12_14.1 [template = i32] -// CHECK:STDOUT: %.loc12_12: = field_decl field, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %.loc12_12: %.2 = field_decl field, element0 [template] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // 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] @@ -82,14 +82,14 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %field.ref: = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %.2 = 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: = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %.2 = 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 257af3ad9ad0..0b6974152cb8 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -26,12 +26,12 @@ fn G(c: Class) -> i32 { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {.n: i32} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,12 +42,12 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc15_6.1: Class = param c -// CHECK:STDOUT: @G.%c: Class = bind_name c, %c.loc15_6.1 +// CHECK:STDOUT: %c.loc15_6.1: %Class = param c +// CHECK:STDOUT: @G.%c: %Class = bind_name c, %c.loc15_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32, %.loc15_19.1 [template = i32] @@ -59,7 +59,7 @@ 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: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -68,9 +68,9 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%c: Class) -> i32 { +// CHECK:STDOUT: fn @G(%c: %Class) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: Class = name_ref c, %c +// CHECK:STDOUT: %c.ref: %Class = name_ref c, %c // CHECK:STDOUT: %something.ref: = name_ref something, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 6f160eb61ff7..adc91935d75b 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -27,12 +27,12 @@ fn Run() { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {.j: i32, .k: i32} [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -45,22 +45,22 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: = field_decl j, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl k, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl k, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -73,15 +73,15 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: 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: %c.ref.loc18: ref Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc18: = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// 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: %.loc18_4: ref i32 = class_element_access %c.ref.loc18, element0 // CHECK:STDOUT: %.loc18_9: i32 = int_literal 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: = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// 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: %.loc19_4: ref i32 = class_element_access %c.ref.loc19, element1 // CHECK:STDOUT: %.loc19_9: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: assign %.loc19_4, %.loc19_9 @@ -90,8 +90,8 @@ fn Run() { // CHECK:STDOUT: %.loc20_11.2: type = converted %int.make_type_32.loc20, %.loc20_11.1 [template = i32] // 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: = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// 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: %.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 @@ -100,8 +100,8 @@ fn Run() { // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32.loc21, %.loc21_11.1 [template = i32] // 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: = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// 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: %.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 262f616b23e4..3404a385ea0f 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -28,12 +28,12 @@ fn Test() { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: %Test.type: type = fn_type @Test [template] -// CHECK:STDOUT: %Test: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {.j: i32, .k: i32} [template] +// CHECK:STDOUT: %Test: %Test.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -46,22 +46,22 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: = field_decl j, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl k, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl k, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -74,29 +74,29 @@ fn Test() { // CHECK:STDOUT: fn @Test() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc17: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// 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: = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// 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: %.loc18_5: ref i32 = class_element_access %cv.ref.loc18, element0 // CHECK:STDOUT: %.loc18_10: i32 = int_literal 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: = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// 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: %.loc19_5: ref i32 = class_element_access %cv.ref.loc19, element1 // CHECK:STDOUT: %.loc19_10: i32 = int_literal 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 -// CHECK:STDOUT: %.loc20: Class = bind_value %cv.ref.loc20 -// CHECK:STDOUT: %c: Class = bind_name c, %.loc20 +// CHECK:STDOUT: %cv.ref.loc20: ref %Class = name_ref cv, %cv +// CHECK:STDOUT: %.loc20: %Class = bind_value %cv.ref.loc20 +// CHECK:STDOUT: %c: %Class = bind_name c, %.loc20 // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32.loc21, %.loc21_11.1 [template = i32] // 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: = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// 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: %.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 @@ -105,8 +105,8 @@ fn Test() { // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32.loc22, %.loc22_11.1 [template = i32] // 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: = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// 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: %.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 5eeae3655357..fcd923d734b5 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -16,10 +16,10 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = ptr_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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,22 +30,22 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc13_9: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc13_14: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %p.loc13_6.1: Class* = param p -// CHECK:STDOUT: @F.%p: Class* = bind_name p, %p.loc13_6.1 +// CHECK:STDOUT: %.loc13_14: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %p.loc13_6.1: %.1 = param p +// CHECK:STDOUT: @F.%p: %.1 = bind_name p, %p.loc13_6.1 // CHECK:STDOUT: %Class.ref.loc13_20: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc13_25: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: @F.%return: ref Class* = var +// CHECK:STDOUT: %.loc13_25: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p: Class*) -> Class* { +// CHECK:STDOUT: fn @F(%p: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.1 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic.carbon b/toolchain/check/testdata/class/generic.carbon index a6a0d189c04d..f158ea67c61e 100644 --- a/toolchain/check/testdata/class/generic.carbon +++ b/toolchain/check/testdata/class/generic.carbon @@ -15,7 +15,7 @@ class C[](); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C.1: = struct_value () [template] +// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -25,7 +25,7 @@ class C[](); // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %C.decl: = class_decl @C [template = constants.%C.1] {} +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index d0aad854bf5a..05e7fb581d01 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -28,17 +28,17 @@ class Class(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] -// CHECK:STDOUT: %.2: type = ptr_type Class [template] -// CHECK:STDOUT: %.3: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] // CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr [template] -// CHECK:STDOUT: %GetAddr: = struct_value () [template] +// CHECK:STDOUT: %GetAddr: %GetAddr.type = struct_value () [template] // CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue [template] -// CHECK:STDOUT: %GetValue: = struct_value () [template] -// CHECK:STDOUT: %.4: type = unbound_element_type Class, T [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {.k: T} [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type {.k: T} [symbolic] +// CHECK:STDOUT: %GetValue: %GetValue.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.5: type = struct_type {.k: %T} [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,32 +47,32 @@ class Class(T:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %GetAddr.decl: = fn_decl @GetAddr [template = constants.%GetAddr] { +// CHECK:STDOUT: %GetAddr.decl: %GetAddr.type = fn_decl @GetAddr [template = constants.%GetAddr] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] -// CHECK:STDOUT: %.loc12_29: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc12_19.1: Class* = param self -// CHECK:STDOUT: %self.loc12_19.3: Class* = bind_name self, %self.loc12_19.1 -// CHECK:STDOUT: %.loc12_14: Class* = addr_pattern %self.loc12_19.3 +// CHECK:STDOUT: %.loc12_29: type = ptr_type %Class.2 [template = constants.%.2] +// CHECK:STDOUT: %self.loc12_19.1: %.2 = param self +// CHECK:STDOUT: %self.loc12_19.3: %.2 = bind_name self, %self.loc12_19.1 +// CHECK:STDOUT: %.loc12_14: %.2 = addr_pattern %self.loc12_19.3 // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc12_38: type = ptr_type T [symbolic = constants.%.3] -// CHECK:STDOUT: %return.var.loc12: ref T* = var +// CHECK:STDOUT: %.loc12_38: type = ptr_type %T [symbolic = constants.%.3] +// CHECK:STDOUT: %return.var.loc12: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %GetValue.decl: = fn_decl @GetValue [template = constants.%GetValue] { +// CHECK:STDOUT: %GetValue.decl: %GetValue.type = fn_decl @GetValue [template = constants.%GetValue] { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] -// CHECK:STDOUT: %self.loc17_15.1: Class = param self -// CHECK:STDOUT: %self.loc17_15.2: Class = bind_name self, %self.loc17_15.1 +// CHECK:STDOUT: %self.loc17_15.1: %Class.2 = param self +// CHECK:STDOUT: %self.loc17_15.2: %Class.2 = bind_name self, %self.loc17_15.1 // CHECK:STDOUT: %T.ref.loc17: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %return.var.loc17: ref T = var +// CHECK:STDOUT: %return.var.loc17: ref %T = var // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref.loc21: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc21: = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc21: %.4 = field_decl k, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -81,22 +81,22 @@ class Class(T:! type) { // CHECK:STDOUT: .k = %.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @GetAddr[addr @Class.%self.loc12_19.3: Class*]() -> T* { +// CHECK:STDOUT: fn @GetAddr[addr @Class.%self.loc12_19.3: %.2]() -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class* = name_ref self, @Class.%self.loc12_19.3 -// CHECK:STDOUT: %.loc13_17.1: ref Class = deref %self.ref -// CHECK:STDOUT: %k.ref: = name_ref k, @Class.%.loc21 [template = @Class.%.loc21] -// CHECK:STDOUT: %.loc13_17.2: ref T = class_element_access %.loc13_17.1, element0 -// CHECK:STDOUT: %.loc13_12: T* = addr_of %.loc13_17.2 +// CHECK:STDOUT: %self.ref: %.2 = name_ref self, @Class.%self.loc12_19.3 +// CHECK:STDOUT: %.loc13_17.1: ref %Class.2 = deref %self.ref +// CHECK:STDOUT: %k.ref: %.4 = name_ref k, @Class.%.loc21 [template = @Class.%.loc21] +// CHECK:STDOUT: %.loc13_17.2: ref %T = class_element_access %.loc13_17.1, element0 +// CHECK:STDOUT: %.loc13_12: %.3 = addr_of %.loc13_17.2 // CHECK:STDOUT: return %.loc13_12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @GetValue[@Class.%self.loc17_15.2: Class]() -> T { +// CHECK:STDOUT: fn @GetValue[@Class.%self.loc17_15.2: %Class.2]() -> %T { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class = name_ref self, @Class.%self.loc17_15.2 -// CHECK:STDOUT: %k.ref: = name_ref k, @Class.%.loc21 [template = @Class.%.loc21] -// CHECK:STDOUT: %.loc18_16.1: ref T = class_element_access %self.ref, element0 -// CHECK:STDOUT: %.loc18_16.2: T = bind_value %.loc18_16.1 +// CHECK:STDOUT: %self.ref: %Class.2 = name_ref self, @Class.%self.loc17_15.2 +// CHECK:STDOUT: %k.ref: %.4 = name_ref k, @Class.%.loc21 [template = @Class.%.loc21] +// CHECK:STDOUT: %.loc18_16.1: ref %T = class_element_access %self.ref, element0 +// CHECK:STDOUT: %.loc18_16.2: %T = bind_value %.loc18_16.1 // CHECK:STDOUT: return %.loc18_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 3ab067c68c65..cbd4e3807089 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -69,16 +69,16 @@ var a: Class(5, i32*); // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: %.4: i32 = int_literal 5 [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, (file.%.loc6_17.3, file.%.loc6_20) [template] -// CHECK:STDOUT: %.5: type = ptr_type {} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] // CHECK:STDOUT: %.6: i32 = int_literal 0 [template] // CHECK:STDOUT: %Class.4: type = class_type @Class, (file.%.loc9_13, file.%.loc9_18) [template] // CHECK:STDOUT: } @@ -91,8 +91,8 @@ var a: Class(5, i32*); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] @@ -101,23 +101,23 @@ var a: Class(5, i32*); // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref.loc6: = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_17.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_32.loc6, %.loc6_17.1 [template = i32] // CHECK:STDOUT: %.loc6_17.3: type = ptr_type i32 [template = constants.%.3] // CHECK:STDOUT: %.loc6_20: i32 = int_literal 5 [template = constants.%.4] // CHECK:STDOUT: %Class.loc6: type = class_type @Class, (%.loc6_17.3, %.loc6_20) [template = constants.%Class.3] -// CHECK:STDOUT: %a.var: ref Class = var a -// CHECK:STDOUT: %a: ref Class = bind_name a, %a.var -// CHECK:STDOUT: %Class.ref.loc9: = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %.loc9_15: () = tuple_literal () +// 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_literal 0 [template = constants.%.6] // CHECK:STDOUT: %.loc9_13: type = converted %.loc9_15, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %Class.loc9: type = class_type @Class, (%.loc9_13, %.loc9_18) [template = constants.%Class.4] -// CHECK:STDOUT: %b.var: ref Class = var b -// CHECK:STDOUT: %b: ref Class = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %Class.4 = var b +// CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -133,14 +133,14 @@ var a: Class(5, i32*); // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -150,8 +150,8 @@ var a: Class(5, i32*); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] @@ -160,15 +160,15 @@ var a: Class(5, i32*); // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13, %.loc13_17.1 [template = i32] // CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] // CHECK:STDOUT: %Class: type = class_type @Class [template = constants.%Class.2] -// CHECK:STDOUT: %a.var: ref Class = var a -// CHECK:STDOUT: %a: ref Class = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %Class.2 = var a +// CHECK:STDOUT: %a: ref %Class.2 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -184,16 +184,16 @@ var a: Class(5, i32*); // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.6: type = ptr_type {} [template] +// CHECK:STDOUT: %.6: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -203,8 +203,8 @@ var a: Class(5, i32*); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] @@ -213,8 +213,8 @@ var a: Class(5, i32*); // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: = name_ref Class, %Class.decl [template = constants.%Class.1] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13, %.loc13_17.1 [template = i32] @@ -222,8 +222,8 @@ var a: Class(5, i32*); // CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc13_23: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %Class: type = class_type @Class [template = constants.%Class.2] -// CHECK:STDOUT: %a.var: ref Class = var a -// CHECK:STDOUT: %a: ref Class = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %Class.2 = var a +// CHECK:STDOUT: %a: ref %Class.2 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -239,15 +239,15 @@ var a: Class(5, i32*); // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 5 [template] // CHECK:STDOUT: %.4: type = ptr_type i32 [template] -// CHECK:STDOUT: %.5: type = ptr_type {} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -257,8 +257,8 @@ var a: Class(5, i32*); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] @@ -267,16 +267,16 @@ var a: Class(5, i32*); // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 5 [template = constants.%.3] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_32.loc12, %.loc12_20.1 [template = i32] // CHECK:STDOUT: %.loc12_20.3: type = ptr_type i32 [template = constants.%.4] // CHECK:STDOUT: %Class: type = class_type @Class [template = constants.%Class.2] -// CHECK:STDOUT: %a.var: ref Class = var a -// CHECK:STDOUT: %a: ref Class = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %Class.2 = var a +// CHECK:STDOUT: %a: ref %Class.2 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { diff --git a/toolchain/check/testdata/class/generic/fail_todo_use.carbon b/toolchain/check/testdata/class/generic/fail_todo_use.carbon index e8092a3d14f0..490c7db77da3 100644 --- a/toolchain/check/testdata/class/generic/fail_todo_use.carbon +++ b/toolchain/check/testdata/class/generic/fail_todo_use.carbon @@ -42,23 +42,23 @@ fn Run() -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] -// CHECK:STDOUT: %.2: type = ptr_type Class [template] -// CHECK:STDOUT: %.3: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.2: type = ptr_type %Class.2 [template] +// CHECK:STDOUT: %.3: type = ptr_type %T [symbolic] // CHECK:STDOUT: %Get.type: type = fn_type @Get [template] -// CHECK:STDOUT: %Get: = struct_value () [template] -// CHECK:STDOUT: %.4: type = unbound_element_type Class, T [symbolic] -// CHECK:STDOUT: %.5: type = struct_type {.k: T} [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type {.k: T} [symbolic] +// CHECK:STDOUT: %Get: %Get.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.5: type = struct_type {.k: %T} [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, (@Run.%.loc25_15.2) [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: %.8: type = struct_type {.k: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type Class [template] +// CHECK:STDOUT: %.9: type = ptr_type %Class.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,33 +68,33 @@ fn Run() -> i32 { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_32, %.loc20_13.1 [template = i32] // CHECK:STDOUT: @Run.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %Get.decl: = fn_decl @Get [template = constants.%Get] { +// CHECK:STDOUT: %Get.decl: %Get.type = fn_decl @Get [template = constants.%Get] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] -// CHECK:STDOUT: %.loc12_25: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc12_15.1: Class* = param self -// CHECK:STDOUT: %self.loc12_15.3: Class* = bind_name self, %self.loc12_15.1 -// CHECK:STDOUT: %.loc12_10: Class* = addr_pattern %self.loc12_15.3 +// CHECK:STDOUT: %.loc12_25: type = ptr_type %Class.2 [template = constants.%.2] +// CHECK:STDOUT: %self.loc12_15.1: %.2 = param self +// CHECK:STDOUT: %self.loc12_15.3: %.2 = bind_name self, %self.loc12_15.1 +// CHECK:STDOUT: %.loc12_10: %.2 = addr_pattern %self.loc12_15.3 // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc12_34: type = ptr_type T [symbolic = constants.%.3] -// CHECK:STDOUT: %return.var: ref T* = var +// CHECK:STDOUT: %.loc12_34: type = ptr_type %T [symbolic = constants.%.3] +// CHECK:STDOUT: %return.var: ref %.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref.loc16: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc16: = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc16: %.4 = field_decl k, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -102,13 +102,13 @@ fn Run() -> i32 { // CHECK:STDOUT: .k = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Get[addr @Class.%self.loc12_15.3: Class*]() -> T* { +// CHECK:STDOUT: fn @Get[addr @Class.%self.loc12_15.3: %.2]() -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class* = name_ref self, @Class.%self.loc12_15.3 -// CHECK:STDOUT: %.loc13_17.1: ref Class = deref %self.ref -// CHECK:STDOUT: %k.ref: = name_ref k, @Class.%.loc16 [template = @Class.%.loc16] -// CHECK:STDOUT: %.loc13_17.2: ref T = class_element_access %.loc13_17.1, element0 -// CHECK:STDOUT: %.loc13_12: T* = addr_of %.loc13_17.2 +// CHECK:STDOUT: %self.ref: %.2 = name_ref self, @Class.%self.loc12_15.3 +// CHECK:STDOUT: %.loc13_17.1: ref %Class.2 = deref %self.ref +// CHECK:STDOUT: %k.ref: %.4 = name_ref k, @Class.%.loc16 [template = @Class.%.loc16] +// CHECK:STDOUT: %.loc13_17.2: ref %T = class_element_access %.loc13_17.1, element0 +// CHECK:STDOUT: %.loc13_12: %.3 = addr_of %.loc13_17.2 // CHECK:STDOUT: return %.loc13_12 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -116,21 +116,21 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_32, %.loc25_15.1 [template = i32] // CHECK:STDOUT: %Class: type = class_type @Class, (%.loc25_15.2) [template = constants.%Class.3] -// CHECK:STDOUT: %v.var: ref Class = var v -// CHECK:STDOUT: %v: ref Class = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref %Class.3 = var v +// CHECK:STDOUT: %v: ref %Class.3 = bind_name v, %v.var // CHECK:STDOUT: %.loc25_29: i32 = int_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_30: {.k: i32} = struct_literal (%.loc25_29) +// CHECK:STDOUT: %.loc25_30: %.8 = struct_literal (%.loc25_29) // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %v.ref: ref Class = name_ref v, %v -// CHECK:STDOUT: %Get.ref: = name_ref Get, @Class.%Get.decl [template = constants.%Get] +// CHECK:STDOUT: %v.ref: ref %Class.3 = name_ref v, %v +// CHECK:STDOUT: %Get.ref: %Get.type = name_ref Get, @Class.%Get.decl [template = constants.%Get] // CHECK:STDOUT: %.loc36_11: = bound_method %v.ref, %Get.ref -// CHECK:STDOUT: %.loc36_10: Class* = addr_of %v.ref -// CHECK:STDOUT: %Get.call: init T* = call %.loc36_11() [template = ] +// CHECK:STDOUT: %.loc36_10: %.9 = addr_of %v.ref +// CHECK:STDOUT: %Get.call: init %.3 = call %.loc36_11() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index afc8d0be02c7..d4ce2518b841 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -44,7 +44,7 @@ class Class(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -54,7 +54,7 @@ class Class(U:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -68,10 +68,10 @@ class Class(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class: = struct_value () [template] +// CHECK:STDOUT: %Class: %Class.type = struct_value () [template] // CHECK:STDOUT: %struct: type = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type , T [symbolic] -// CHECK:STDOUT: %.3: type = struct_type {.x: T} [symbolic] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class, %T [symbolic] +// CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -79,7 +79,7 @@ class Class(U:! type) { // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+5, loaded [template = constants.%Class] +// CHECK:STDOUT: %import_ref: %Class.type = import_ref ir0, inst+5, loaded [template = constants.%Class] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%struct] { // CHECK:STDOUT: %T.loc4_13.1: type = param T @@ -89,7 +89,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc5: > = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5: %.2 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -102,10 +102,10 @@ class Class(U:! type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class: = struct_value () [template] +// CHECK:STDOUT: %Class: %Class.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,9 +114,9 @@ class Class(U:! type) { // CHECK:STDOUT: .Class = %import_ref // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+5, loaded [template = constants.%Class] +// CHECK:STDOUT: %import_ref: %Class.type = import_ref ir0, inst+5, loaded [template = constants.%Class] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %U.loc9_13.1: type = param U // CHECK:STDOUT: %U.loc9_13.2: type = bind_symbolic_name U 0, %U.loc9_13.1 [symbolic = constants.%U] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index 6627e647e846..27ad417968de 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -20,10 +20,10 @@ class Class(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,19 +33,19 @@ class Class(T:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.ref.loc12_11: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc12_8.1: T = param n -// CHECK:STDOUT: %n.loc12_8.2: T = bind_name n, %n.loc12_8.1 +// CHECK:STDOUT: %n.loc12_8.1: %T = param n +// CHECK:STDOUT: %n.loc12_8.2: %T = bind_name n, %n.loc12_8.1 // CHECK:STDOUT: %T.ref.loc12_17: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %return.var: ref T = var +// CHECK:STDOUT: %return.var: ref %T = var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -53,9 +53,9 @@ class Class(T:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(@Class.%n.loc12_8.2: T) -> T { +// CHECK:STDOUT: fn @F(@Class.%n.loc12_8.2: %T) -> %T { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: T = name_ref n, @Class.%n.loc12_8.2 +// CHECK:STDOUT: %n.ref: %T = name_ref n, @Class.%n.loc12_8.2 // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: 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 ba05f01d51f5..dd8d1344fa19 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -105,10 +105,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -118,28 +118,28 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc8_10.1: type = param T // CHECK:STDOUT: %T.loc8_10.2: type = bind_symbolic_name T 0, %T.loc8_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc8_25: type = name_ref T, %T.loc8_10.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc8_22.1: T = param n -// CHECK:STDOUT: @F.%n: T = bind_name n, %n.loc8_22.1 +// CHECK:STDOUT: %n.loc8_22.1: %T = param n +// CHECK:STDOUT: @F.%n: %T = bind_name n, %n.loc8_22.1 // CHECK:STDOUT: %T.ref.loc8_31: type = name_ref T, %T.loc8_10.2 [symbolic = constants.%T] -// CHECK:STDOUT: @F.%return: ref T = var +// CHECK:STDOUT: @F.%return: ref %T = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, file.%T.loc4_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc5_8.1: T = param n -// CHECK:STDOUT: %n.loc5_8.2: T = bind_name n, %n.loc5_8.1 +// CHECK:STDOUT: %n.loc5_8.1: %T = param n +// CHECK:STDOUT: %n.loc5_8.2: %T = bind_name n, %n.loc5_8.1 // CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, file.%T.loc4_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %return.var: ref T = var +// CHECK:STDOUT: %return.var: ref %T = var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -147,9 +147,9 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n: T) -> T { +// CHECK:STDOUT: fn @F(%n: %T) -> %T { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: T = name_ref n, %n +// CHECK:STDOUT: %n.ref: %T = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -159,16 +159,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A.1: = struct_value () [template] +// CHECK:STDOUT: %A.1: %A.type = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A [template] -// CHECK:STDOUT: %N: T = bind_symbolic_name N 1 [symbolic] +// CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %B.type: type = generic_class_type @B [template] -// CHECK:STDOUT: %B.1: = struct_value () [template] +// CHECK:STDOUT: %B.1: %B.type = struct_value () [template] // CHECK:STDOUT: %B.2: type = class_type @B [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -177,30 +177,30 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = class_decl @A [template = constants.%A.1] { +// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc10_6.1: type = param T // CHECK:STDOUT: %T.loc10_6.2: type = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10_6.2 [symbolic = constants.%T] -// CHECK:STDOUT: %N.loc10_18.1: T = param N -// CHECK:STDOUT: %N.loc10_18.2: T = bind_symbolic_name N 1, %N.loc10_18.1 [symbolic = constants.%N] +// CHECK:STDOUT: %N.loc10_18.1: %T = param N +// CHECK:STDOUT: %N.loc10_18.2: %T = bind_symbolic_name N 1, %N.loc10_18.1 [symbolic = constants.%N] // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B.2 [template = constants.%B.2] -// CHECK:STDOUT: %self.loc10_27.1: B = param self -// CHECK:STDOUT: @F.%self: B = bind_name self, %self.loc10_27.1 +// CHECK:STDOUT: %self.loc10_27.1: %B.2 = param self +// CHECK:STDOUT: @F.%self: %B.2 = bind_name self, %self.loc10_27.1 // CHECK:STDOUT: %T.ref.loc10_42: type = name_ref T, %T.loc10_6.2 [symbolic = constants.%T] -// CHECK:STDOUT: %a.loc10_39.1: T = param a -// CHECK:STDOUT: @F.%a: T = bind_name a, %a.loc10_39.1 +// CHECK:STDOUT: %a.loc10_39.1: %T = param a +// CHECK:STDOUT: @F.%a: %T = bind_name a, %a.loc10_39.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %B.decl: = class_decl @B [template = constants.%B.1] { +// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.1] { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = constants.%T] -// CHECK:STDOUT: %N.loc5_11.1: T = param N -// CHECK:STDOUT: %N.loc5_11.2: T = bind_symbolic_name N 1, %N.loc5_11.1 [symbolic = constants.%N] +// CHECK:STDOUT: %N.loc5_11.1: %T = param N +// CHECK:STDOUT: %N.loc5_11.2: %T = bind_symbolic_name N 1, %N.loc5_11.1 [symbolic = constants.%N] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -209,13 +209,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B.2 [template = constants.%B.2] -// CHECK:STDOUT: %self.loc6_10.1: B = param self -// CHECK:STDOUT: %self.loc6_10.2: B = bind_name self, %self.loc6_10.1 +// CHECK:STDOUT: %self.loc6_10.1: %B.2 = param self +// CHECK:STDOUT: %self.loc6_10.2: %B.2 = bind_name self, %self.loc6_10.1 // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = constants.%T] -// CHECK:STDOUT: %a.loc6_22.1: T = param a -// CHECK:STDOUT: %a.loc6_22.2: T = bind_name a, %a.loc6_22.1 +// CHECK:STDOUT: %a.loc6_22.1: %T = param a +// CHECK:STDOUT: %a.loc6_22.2: %T = bind_name a, %a.loc6_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -223,7 +223,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: B](%a: T) { +// CHECK:STDOUT: fn @F[%self: %B.2](%a: %T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -234,11 +234,11 @@ fn Generic(T:! ()).WrongType() {} // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -248,14 +248,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [template = constants.%NotGeneric] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %T.loc15_15.1: type = param T // CHECK:STDOUT: %T.loc15_15.2: type = bind_symbolic_name T 0, %T.loc15_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NotGeneric { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NotGeneric @@ -275,13 +275,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Generic.1: = struct_value () [template] +// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] -// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -290,15 +290,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl: = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Generic { -// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] {} +// CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [template = constants.%TooFew] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -318,14 +318,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Generic.1: = struct_value () [template] +// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] -// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %TooMany: %TooMany.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -334,11 +334,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl: = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %T.loc15_12.1: type = param T // CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T 0, %T.loc15_12.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc15_22.1: type = param U @@ -347,7 +347,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Generic { -// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] {} +// CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [template = constants.%TooMany] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -367,14 +367,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Generic.1: = struct_value () [template] +// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] // CHECK:STDOUT: %WrongType.type: type = fn_type @WrongType [template] -// CHECK:STDOUT: %WrongType: = struct_value () [template] +// CHECK:STDOUT: %WrongType: %WrongType.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %T.2: () = bind_symbolic_name T 0 [symbolic] +// CHECK:STDOUT: %T.2: %.1 = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -383,20 +383,20 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl: = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] { -// CHECK:STDOUT: %.loc14_17.1: () = tuple_literal () +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { +// 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.loc14_12.1: () = param T -// CHECK:STDOUT: %T.loc14_12.2: () = bind_symbolic_name T 0, %T.loc14_12.1 [symbolic = constants.%T.2] +// CHECK:STDOUT: %T.loc14_12.1: %.1 = param T +// CHECK:STDOUT: %T.loc14_12.2: %.1 = bind_symbolic_name T 0, %T.loc14_12.1 [symbolic = constants.%T.2] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Generic { -// CHECK:STDOUT: %WrongType.decl: = fn_decl @WrongType [template = constants.%WrongType] {} +// CHECK:STDOUT: %WrongType.decl: %WrongType.type = fn_decl @WrongType [template = constants.%WrongType] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 75807e354f15..91e051729028 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -92,7 +92,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Generic.1: = struct_value () [template] +// CHECK:STDOUT: %Generic.1: %Generic.type = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] // CHECK:STDOUT: %struct: type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] @@ -104,7 +104,7 @@ class E(U:! type) {} // CHECK:STDOUT: .Generic = %Generic.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl.loc4: = class_decl @Generic [template = constants.%Generic.1] { +// CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -126,7 +126,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -138,7 +138,7 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc12_9.1: type = param T // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -156,15 +156,15 @@ class E(U:! type) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N.1: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %B.type: type = generic_class_type @B [template] -// CHECK:STDOUT: %B.1: = struct_value () [template] +// CHECK:STDOUT: %B.1: %B.type = struct_value () [template] // CHECK:STDOUT: %B.2: type = class_type @B [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %N.2: T = bind_symbolic_name N 1 [symbolic] +// CHECK:STDOUT: %N.2: %T = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -175,20 +175,20 @@ class E(U:! type) {} // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = class_decl @B [template = constants.%B.1] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.1] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32, %.loc4_13.1 [template = i32] // CHECK:STDOUT: %N.loc4_9.1: i32 = param N // CHECK:STDOUT: %N.loc4_9.2: i32 = bind_symbolic_name N 0, %N.loc4_9.1 [symbolic = constants.%N.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc12_9.1: type = param T // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.2 [symbolic = constants.%T] -// CHECK:STDOUT: %N.loc12_19.1: T = param N -// CHECK:STDOUT: %N.loc12_19.2: T = bind_symbolic_name N 1, %N.loc12_19.1 [symbolic = constants.%N.2] +// CHECK:STDOUT: %N.loc12_19.1: %T = param N +// CHECK:STDOUT: %N.loc12_19.2: %T = bind_symbolic_name N 1, %N.loc12_19.1 [symbolic = constants.%N.2] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -207,13 +207,13 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C.1: = struct_value () [template] +// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %U: i32 = bind_symbolic_name U 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -224,12 +224,12 @@ class E(U:! type) {} // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %C.decl: = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc12_9.1: type = param T // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = constants.%T] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] @@ -255,13 +255,13 @@ class E(U:! type) {} // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %D.1: = struct_value () [template] +// CHECK:STDOUT: %D.1: %D.type = struct_value () [template] // CHECK:STDOUT: %D.2: type = class_type @D [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %T.2: i32 = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -272,12 +272,12 @@ class E(U:! type) {} // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %D.decl: = class_decl @D [template = constants.%D.1] { +// CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] @@ -301,11 +301,11 @@ class E(U:! type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %E.type: type = generic_class_type @E [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %E.1: = struct_value () [template] +// CHECK:STDOUT: %E.1: %E.type = struct_value () [template] // CHECK:STDOUT: %E.2: type = class_type @E [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -316,11 +316,11 @@ class E(U:! type) {} // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %E.decl: = class_decl @E [template = constants.%E.1] { +// CHECK:STDOUT: %E.decl: %E.type = class_decl @E [template = constants.%E.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %U.loc11_9.1: type = param U // CHECK:STDOUT: %U.loc11_9.2: type = bind_symbolic_name U 0, %U.loc11_9.1 [symbolic = constants.%U] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index c5f457107432..4836663a7c79 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -21,13 +21,13 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Class.1: = struct_value () [template] +// CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, T [symbolic] +// CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: T} [symbolic] -// CHECK:STDOUT: %.4: type = ptr_type {.a: T} [symbolic] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %T} [symbolic] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,32 +36,32 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { +// CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc16_10.1: type = param T // CHECK:STDOUT: %T.loc16_10.2: type = bind_symbolic_name T 0, %T.loc16_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] -// CHECK:STDOUT: %self.loc16_22.1: Class = param self -// CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc16_22.1 +// CHECK:STDOUT: %self.loc16_22.1: %Class.2 = param self +// CHECK:STDOUT: @F.%self: %Class.2 = bind_name self, %self.loc16_22.1 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_10.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc16_34.1: T = param n -// CHECK:STDOUT: @F.%n: T = bind_name n, %n.loc16_34.1 +// CHECK:STDOUT: %n.loc16_34.1: %T = param n +// CHECK:STDOUT: @F.%n: %T = bind_name n, %n.loc16_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc12: = field_decl a, element0 [template] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %.loc12: %.2 = field_decl a, element0 [template] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] -// CHECK:STDOUT: %self.loc13_8.1: Class = param self -// CHECK:STDOUT: %self.loc13_8.2: Class = bind_name self, %self.loc13_8.1 +// CHECK:STDOUT: %self.loc13_8.1: %Class.2 = param self +// CHECK:STDOUT: %self.loc13_8.2: %Class.2 = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc13_20.1: T = param n -// CHECK:STDOUT: %n.loc13_20.2: T = bind_name n, %n.loc13_20.1 +// CHECK:STDOUT: %n.loc13_20.1: %T = param n +// CHECK:STDOUT: %n.loc13_20.2: %T = bind_name n, %n.loc13_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -70,7 +70,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: Class](%n: T) { +// CHECK:STDOUT: fn @F[%self: %Class.2](%n: %T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 38dc1f78904a..f62d0e9392a4 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -57,15 +57,15 @@ fn Run() { // CHECK:STDOUT: %Field: type = class_type @Field [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type Field, i32 [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Field, i32 [template] // CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] // CHECK:STDOUT: %ForwardDeclared: type = class_type @ForwardDeclared [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type ForwardDeclared [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %ForwardDeclared [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +80,7 @@ fn Run() { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Empty.decl: type = class_decl @Empty [template = constants.%Empty] {} // CHECK:STDOUT: %Field.decl: type = class_decl @Field [template = constants.%Field] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %ForwardDeclared.decl.loc11: type = class_decl @ForwardDeclared [template = constants.%ForwardDeclared] {} // CHECK:STDOUT: %ForwardDeclared.decl.loc13: type = class_decl @ForwardDeclared [template = constants.%ForwardDeclared] {} // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} @@ -95,7 +95,7 @@ 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc8_8: %.3 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Field @@ -103,17 +103,17 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] -// CHECK:STDOUT: %self.loc14_8.1: ForwardDeclared = param self -// CHECK:STDOUT: %self.loc14_8.2: ForwardDeclared = bind_name self, %self.loc14_8.1 +// CHECK:STDOUT: %self.loc14_8.1: %ForwardDeclared = param self +// CHECK:STDOUT: %self.loc14_8.2: %ForwardDeclared = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] -// CHECK:STDOUT: %.loc15_23: type = ptr_type ForwardDeclared [template = constants.%.5] -// CHECK:STDOUT: %self.loc15_13.1: ForwardDeclared* = param self -// CHECK:STDOUT: %self.loc15_13.3: ForwardDeclared* = bind_name self, %self.loc15_13.1 -// CHECK:STDOUT: %.loc15_8: ForwardDeclared* = addr_pattern %self.loc15_13.3 +// CHECK:STDOUT: %.loc15_23: type = ptr_type %ForwardDeclared [template = constants.%.5] +// CHECK:STDOUT: %self.loc15_13.1: %.5 = param self +// CHECK:STDOUT: %self.loc15_13.3: %.5 = bind_name self, %self.loc15_13.1 +// CHECK:STDOUT: %.loc15_8: %.5 = addr_pattern %self.loc15_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -126,37 +126,37 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[@ForwardDeclared.%self.loc14_8.2: ForwardDeclared](); +// CHECK:STDOUT: fn @F[@ForwardDeclared.%self.loc14_8.2: %ForwardDeclared](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr @ForwardDeclared.%self.loc15_13.3: ForwardDeclared*](); +// CHECK:STDOUT: fn @G[addr @ForwardDeclared.%self.loc15_13.3: %.5](); // 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: %Run: = struct_value () [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: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.1: Empty = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %struct.1: %Empty = struct_value () [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] // CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.x: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct.2: Field = struct_value (%.6) [template] -// CHECK:STDOUT: %.7: type = unbound_element_type Field, i32 [template] +// CHECK:STDOUT: %struct.2: %Field = struct_value (%.6) [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %Field, i32 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] -// CHECK:STDOUT: %struct.3: ForwardDeclared = struct_value () [template] +// CHECK:STDOUT: %struct.3: %ForwardDeclared.1 = struct_value () [template] // CHECK:STDOUT: %ForwardDeclared.2: type = class_type @ForwardDeclared.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type ForwardDeclared [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.9: type = ptr_type %ForwardDeclared.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.10: type = ptr_type Incomplete [template] +// CHECK:STDOUT: %.10: type = ptr_type %Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -173,13 +173,13 @@ fn Run() { // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+21, loaded [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %import_ref.4: type = import_ref ir1, inst+39, loaded [template = constants.%Incomplete] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+6, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir1, inst+17, loaded [template = imports.%.1] +// CHECK:STDOUT: %import_ref.7: %.7 = import_ref ir1, inst+17, loaded [template = imports.%.1] // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+22, unloaded -// CHECK:STDOUT: %import_ref.9: = import_ref ir1, inst+36, loaded [template = constants.%G] -// CHECK:STDOUT: %import_ref.10: = import_ref ir1, inst+27, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.9: %G.type = import_ref ir1, inst+36, loaded [template = constants.%G] +// CHECK:STDOUT: %import_ref.10: %F.type = import_ref ir1, inst+27, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.11 = import_ref ir1, inst+22, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref ir1, inst+36, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref ir1, inst+27, unloaded @@ -215,59 +215,59 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%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: {} = 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: %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.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, file.%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: %b.var: ref %Field = var b +// CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var // CHECK:STDOUT: %.loc9_24: i32 = int_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_25.1: {.x: i32} = struct_literal (%.loc9_24) +// 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.%.6] -// 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: %.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: = name_ref x, file.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %b.ref: ref %Field = name_ref b, %b +// CHECK:STDOUT: %x.ref: %.7 = name_ref x, file.%import_ref.7 [template = imports.%.1] // CHECK:STDOUT: %.loc10_4: ref i32 = class_element_access %b.ref, element0 // CHECK:STDOUT: %.loc10_9: i32 = int_literal 2 [template = constants.%.8] // CHECK:STDOUT: assign %.loc10_4, %.loc10_9 // CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, file.%import_ref.3 [template = constants.%ForwardDeclared.1] -// CHECK:STDOUT: %c.var: ref ForwardDeclared = var c -// CHECK:STDOUT: %c: ref ForwardDeclared = bind_name c, %c.var -// CHECK:STDOUT: %.loc12_29.1: {} = struct_literal () -// CHECK:STDOUT: %.loc12_29.2: init ForwardDeclared = class_init (), %c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc12_30: init ForwardDeclared = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%struct.3] +// 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.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 -// CHECK:STDOUT: %c.ref.loc13: ref ForwardDeclared = name_ref c, %c -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.10 [template = constants.%F] +// CHECK:STDOUT: %c.ref.loc13: ref %ForwardDeclared.1 = name_ref c, %c +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.10 [template = constants.%F] // CHECK:STDOUT: %.loc13_4: = bound_method %c.ref.loc13, %F.ref -// CHECK:STDOUT: %.loc13_3: ForwardDeclared = bind_value %c.ref.loc13 -// CHECK:STDOUT: %F.call: init () = call %.loc13_4(%.loc13_3) -// CHECK:STDOUT: %c.ref.loc14: ref ForwardDeclared = name_ref c, %c -// CHECK:STDOUT: %G.ref: = name_ref G, file.%import_ref.9 [template = constants.%G] +// CHECK:STDOUT: %.loc13_3: %ForwardDeclared.1 = bind_value %c.ref.loc13 +// CHECK:STDOUT: %F.call: init %.1 = 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, file.%import_ref.9 [template = constants.%G] // CHECK:STDOUT: %.loc14_4: = bound_method %c.ref.loc14, %G.ref -// CHECK:STDOUT: %.loc14_3: ForwardDeclared* = addr_of %c.ref.loc14 -// CHECK:STDOUT: %G.call: init () = call %.loc14_4(%.loc14_3) +// CHECK:STDOUT: %.loc14_3: %.9 = addr_of %c.ref.loc14 +// CHECK:STDOUT: %G.call: init %.1 = call %.loc14_4(%.loc14_3) // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, file.%import_ref.3 [template = constants.%ForwardDeclared.1] -// CHECK:STDOUT: %.loc16_25: type = ptr_type ForwardDeclared [template = constants.%.9] -// CHECK:STDOUT: %d.var: ref ForwardDeclared* = var d -// CHECK:STDOUT: %d: ref ForwardDeclared* = bind_name d, %d.var -// CHECK:STDOUT: %c.ref.loc16: ref ForwardDeclared = name_ref c, %c -// CHECK:STDOUT: %.loc16_29: ForwardDeclared* = addr_of %c.ref.loc16 +// CHECK:STDOUT: %.loc16_25: type = ptr_type %ForwardDeclared.1 [template = constants.%.9] +// CHECK:STDOUT: %d.var: ref %.9 = var d +// CHECK:STDOUT: %d: ref %.9 = bind_name d, %d.var +// CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.1 = name_ref c, %c +// CHECK:STDOUT: %.loc16_29: %.9 = addr_of %c.ref.loc16 // CHECK:STDOUT: assign %d.var, %.loc16_29 // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%import_ref.4 [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc18: type = ptr_type Incomplete [template = constants.%.10] -// CHECK:STDOUT: %e.var: ref Incomplete* = var e -// CHECK:STDOUT: %e: ref Incomplete* = bind_name e, %e.var +// CHECK:STDOUT: %.loc18: type = ptr_type %Incomplete [template = constants.%.10] +// CHECK:STDOUT: %e.var: ref %.10 = var e +// CHECK:STDOUT: %e: ref %.10 = bind_name e, %e.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: ForwardDeclared](); +// CHECK:STDOUT: fn @F[%self: %ForwardDeclared.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self: ForwardDeclared*](); +// CHECK:STDOUT: fn @G[addr %self: %.9](); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index bde0a821f411..91d93fad9c94 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -42,17 +42,17 @@ fn Run() { // 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: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Unused.type: type = fn_type @Unused [template] -// CHECK:STDOUT: %Unused: = struct_value () [template] +// CHECK:STDOUT: %Unused: %Unused.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [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: %Child: type = class_type @Child [template] -// CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .unused: i32} [template] -// CHECK:STDOUT: %.5: type = unbound_element_type Child, Base [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: Base} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Child, %Base [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %Base} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -63,30 +63,30 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Child.decl: type = class_decl @Child [template = constants.%Child] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %self.loc5_8.1: Base = param self -// CHECK:STDOUT: %self.loc5_8.2: Base = bind_name self, %self.loc5_8.1 +// CHECK:STDOUT: %self.loc5_8.1: %Base = param self +// CHECK:STDOUT: %self.loc5_8.2: %Base = bind_name self, %self.loc5_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Unused.decl: = fn_decl @Unused [template = constants.%Unused] { +// CHECK:STDOUT: %Unused.decl: %Unused.type = fn_decl @Unused [template = constants.%Unused] { // CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %self.loc6_13.1: Base = param self -// CHECK:STDOUT: %self.loc6_13.2: Base = bind_name self, %self.loc6_13.1 +// CHECK:STDOUT: %self.loc6_13.1: %Base = param self +// CHECK:STDOUT: %self.loc6_13.2: %Base = bind_name self, %self.loc6_13.1 // CHECK:STDOUT: } // 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc8_8: %.2 = 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: = field_decl unused, element1 [template] +// CHECK:STDOUT: %.loc9_13: %.2 = field_decl unused, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -98,7 +98,7 @@ 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: = base_decl Base, element0 [template] +// CHECK:STDOUT: %.loc13: %.5 = base_decl %Base, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Child @@ -106,9 +106,9 @@ fn Run() { // CHECK:STDOUT: extend name_scope2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[@Base.%self.loc5_8.2: Base](); +// CHECK:STDOUT: fn @F[@Base.%self.loc5_8.2: %Base](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Unused[@Base.%self.loc6_13.2: Base](); +// CHECK:STDOUT: fn @Unused[@Base.%self.loc6_13.2: %Base](); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: @@ -117,24 +117,24 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [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: type = unbound_element_type Child, Base [template] -// CHECK:STDOUT: %.4: type = struct_type {.base: Base} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.x: i32, .unused: i32} [template] -// CHECK:STDOUT: %.6: type = struct_type {.base: {.x: i32, .unused: i32}*} [template] -// CHECK:STDOUT: %.7: type = ptr_type {.base: Base} [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Child, %Base [template] +// CHECK:STDOUT: %.4: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.2 [template] +// CHECK:STDOUT: %.6: type = struct_type {.base: %.5} [template] +// CHECK:STDOUT: %.7: type = ptr_type %.4 [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: {.x: i32, .unused: i32}} [template] -// CHECK:STDOUT: %struct.1: Base = struct_value (%.8, %.9) [template] -// CHECK:STDOUT: %struct.2: Child = struct_value (%struct.1) [template] -// CHECK:STDOUT: %.11: type = unbound_element_type Base, i32 [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.2} [template] +// CHECK:STDOUT: %struct.1: %Base = struct_value (%.8, %.9) [template] +// CHECK:STDOUT: %struct.2: %Child = struct_value (%struct.1) [template] +// CHECK:STDOUT: %.11: type = unbound_element_type %Base, i32 [template] // CHECK:STDOUT: %.12: i32 = int_literal 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -147,10 +147,10 @@ fn Run() { // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref ir1, inst+37, loaded [template = constants.%Child] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+7, loaded [template = constants.%F] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.3: %F.type = import_ref ir1, inst+7, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+26, loaded [template = imports.%.1] +// CHECK:STDOUT: %import_ref.5: %.11 = import_ref ir1, inst+26, loaded [template = imports.%.1] // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+14, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+33, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+38, unloaded @@ -176,38 +176,38 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Child.ref: type = name_ref Child, file.%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: %a.var: ref %Child = var a +// CHECK:STDOUT: %a: ref %Child = bind_name a, %a.var // CHECK:STDOUT: %.loc7_33: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc7_46: i32 = int_literal 1 [template = constants.%.9] -// CHECK:STDOUT: %.loc7_47.1: {.x: i32, .unused: i32} = struct_literal (%.loc7_33, %.loc7_46) -// CHECK:STDOUT: %.loc7_48.1: {.base: {.x: i32, .unused: i32}} = struct_literal (%.loc7_47.1) -// CHECK:STDOUT: %.loc7_48.2: ref Base = class_element_access %a.var, element0 +// CHECK:STDOUT: %.loc7_47.1: %.2 = struct_literal (%.loc7_33, %.loc7_46) +// CHECK:STDOUT: %.loc7_48.1: %.10 = 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.%.8] // 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.%.9] -// 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: %.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: = name_ref x, file.%import_ref.5 [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: %a.ref.loc8: ref %Child = name_ref a, %a +// CHECK:STDOUT: %x.ref: %.11 = name_ref x, file.%import_ref.5 [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_literal 2 [template = constants.%.12] // CHECK:STDOUT: assign %.loc8_4.3, %.loc8_9 -// CHECK:STDOUT: %a.ref.loc9: ref Child = name_ref a, %a -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.3 [template = constants.%F] +// CHECK:STDOUT: %a.ref.loc9: ref %Child = name_ref a, %a +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.3 [template = constants.%F] // CHECK:STDOUT: %.loc9_4: = bound_method %a.ref.loc9, %F.ref -// CHECK:STDOUT: %.loc9_6.1: ref Base = class_element_access %a.ref.loc9, element0 -// CHECK:STDOUT: %.loc9_6.2: ref Base = converted %a.ref.loc9, %.loc9_6.1 -// CHECK:STDOUT: %.loc9_6.3: Base = bind_value %.loc9_6.2 -// CHECK:STDOUT: %F.call: init () = call %.loc9_4(%.loc9_6.3) +// CHECK:STDOUT: %.loc9_6.1: ref %Base = class_element_access %a.ref.loc9, element0 +// CHECK:STDOUT: %.loc9_6.2: ref %Base = converted %a.ref.loc9, %.loc9_6.1 +// CHECK:STDOUT: %.loc9_6.3: %Base = bind_value %.loc9_6.2 +// CHECK:STDOUT: %F.call: init %.1 = call %.loc9_4(%.loc9_6.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: Base](); +// CHECK:STDOUT: fn @F[%self: %Base](); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_indirect.carbon b/toolchain/check/testdata/class/import_indirect.carbon index 1794dfcab981..73a0906e3dad 100644 --- a/toolchain/check/testdata/class/import_indirect.carbon +++ b/toolchain/check/testdata/class/import_indirect.carbon @@ -127,9 +127,9 @@ var ptr: E* = &val; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -146,12 +146,12 @@ var ptr: E* = &val; // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %import_ref.1 [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, %import_ref.1 [template = constants.%C] // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %import_ref.1 [template = constants.%C] -// 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: %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.%.4] -// CHECK:STDOUT: %b_ptr.var: ref C* = var b_ptr -// CHECK:STDOUT: %b_ptr: ref C* = 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 { @@ -161,12 +161,12 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_17.1: {} = struct_literal () -// CHECK:STDOUT: %.loc8_17.2: init C = class_init (), file.%b_val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc8_18: init C = converted %.loc8_17.1, %.loc8_17.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc8_17.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc8_17.2: init %C = class_init (), file.%b_val.var [template = constants.%struct] +// 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: C* = addr_of %b_val.ref +// CHECK:STDOUT: %b_val.ref: ref %C = name_ref b_val, file.%b_val +// CHECK:STDOUT: %.loc9: %.4 = addr_of %b_val.ref // CHECK:STDOUT: assign file.%b_ptr.var, %.loc9 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -177,9 +177,9 @@ var ptr: E* = &val; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -196,12 +196,12 @@ var ptr: E* = &val; // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %import_ref.1 [template = constants.%C] // CHECK:STDOUT: %E: type = bind_alias E, %import_ref.1 [template = constants.%C] // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %import_ref.1 [template = constants.%C] -// 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: %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.%.4] -// CHECK:STDOUT: %c_ptr.var: ref C* = var c_ptr -// CHECK:STDOUT: %c_ptr: ref C* = 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 { @@ -211,12 +211,12 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_17.1: {} = struct_literal () -// CHECK:STDOUT: %.loc8_17.2: init C = class_init (), file.%c_val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc8_18: init C = converted %.loc8_17.1, %.loc8_17.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc8_17.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc8_17.2: init %C = class_init (), file.%c_val.var [template = constants.%struct] +// 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: C* = addr_of %c_val.ref +// CHECK:STDOUT: %c_val.ref: ref %C = name_ref c_val, file.%c_val +// CHECK:STDOUT: %.loc9: %.4 = addr_of %c_val.ref // CHECK:STDOUT: assign file.%c_ptr.var, %.loc9 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -227,9 +227,9 @@ var ptr: E* = &val; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -249,12 +249,12 @@ var ptr: E* = &val; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %val.var: ref C = var val -// CHECK:STDOUT: %val: ref C = bind_name val, %val.var +// 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, %import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref C* = var ptr -// CHECK:STDOUT: %ptr: ref C* = 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 { @@ -264,12 +264,12 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc7_15.2: init C = class_init (), file.%val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_16: init C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%struct] +// 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: C* = addr_of %val.ref +// CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -280,9 +280,9 @@ var ptr: E* = &val; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -302,12 +302,12 @@ var ptr: E* = &val; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %import_ref.5 = import_ref ir2, inst+3, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %val.var: ref C = var val -// CHECK:STDOUT: %val: ref C = bind_name val, %val.var +// 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, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref C* = var ptr -// CHECK:STDOUT: %ptr: ref C* = 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 { @@ -317,12 +317,12 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc7_15.2: init C = class_init (), file.%val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_16: init C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%struct] +// 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: C* = addr_of %val.ref +// CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -333,9 +333,9 @@ var ptr: E* = &val; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -359,12 +359,12 @@ var ptr: E* = &val; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+6, unloaded // CHECK:STDOUT: %D.ref: type = name_ref D, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %val.var: ref C = var val -// CHECK:STDOUT: %val: ref C = bind_name val, %val.var +// 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, %import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref C* = var ptr -// CHECK:STDOUT: %ptr: ref C* = 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 { @@ -374,12 +374,12 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc7_15.2: init C = class_init (), file.%val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_16: init C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%struct] +// 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: C* = addr_of %val.ref +// CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val +// CHECK:STDOUT: %.loc8: %.4 = addr_of %val.ref // CHECK:STDOUT: assign file.%ptr.var, %.loc8 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -390,9 +390,9 @@ var ptr: E* = &val; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type C [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -416,12 +416,12 @@ var ptr: E* = &val; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+6, unloaded // CHECK:STDOUT: %D.ref: type = name_ref D, %import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %val.var: ref C = var val -// CHECK:STDOUT: %val: ref C = bind_name val, %val.var +// 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, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %.loc8: type = ptr_type C [template = constants.%.4] -// CHECK:STDOUT: %ptr.var: ref C* = var ptr -// CHECK:STDOUT: %ptr: ref C* = 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 { @@ -431,12 +431,12 @@ var ptr: E* = &val; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc7_15.2: init C = class_init (), file.%val.var [template = constants.%struct] -// CHECK:STDOUT: %.loc7_16: init C = converted %.loc7_15.1, %.loc7_15.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc7_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc7_15.2: init %C = class_init (), file.%val.var [template = constants.%struct] +// 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: C* = addr_of %val.ref +// CHECK:STDOUT: %val.ref: ref %C = name_ref val, file.%val +// 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 679a1d69bb28..51af1b8b58ee 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -30,9 +30,9 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] -// CHECK:STDOUT: %.1: type = ptr_type Cycle [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Cycle, Cycle* [template] -// CHECK:STDOUT: %.3: type = struct_type {.a: Cycle*} [template] +// CHECK:STDOUT: %.1: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %Cycle, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,8 +46,8 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @Cycle { // CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, file.%Cycle.decl [template = constants.%Cycle] -// CHECK:STDOUT: %.loc5_15: type = ptr_type Cycle [template = constants.%.1] -// CHECK:STDOUT: %.loc5_8: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5_15: type = ptr_type %Cycle [template = constants.%.1] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Cycle @@ -59,10 +59,10 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [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: Cycle*} [template] +// CHECK:STDOUT: %.2: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %.3: type = struct_type {.a: %.2} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -73,7 +73,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+2, loaded [template = constants.%Cycle] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+8, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: } @@ -87,9 +87,9 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, file.%import_ref.1 [template = constants.%Cycle] -// CHECK:STDOUT: %.loc7: type = ptr_type Cycle [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref Cycle* = var a -// CHECK:STDOUT: %a: ref Cycle* = bind_name a, %a.var +// 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: 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 dd3a48157630..a096af5b7ad0 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -35,10 +35,10 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] -// CHECK:STDOUT: %.1: type = ptr_type Cycle [template] -// CHECK:STDOUT: %.2: type = struct_type {.b: Cycle*} [template] -// CHECK:STDOUT: %.3: type = unbound_element_type Cycle, {.b: Cycle*} [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: {.b: Cycle*}} [template] +// CHECK:STDOUT: %.1: type = ptr_type %Cycle [template] +// CHECK:STDOUT: %.2: type = struct_type {.b: %.1} [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %Cycle, %.2 [template] +// CHECK:STDOUT: %.4: type = struct_type {.c: %.2} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,18 +50,18 @@ fn Run() { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Cycle.decl.loc4: type = class_decl @Cycle [template = constants.%Cycle] {} // CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, %Cycle.decl.loc4 [template = constants.%Cycle] -// CHECK:STDOUT: %.loc6_18: type = ptr_type Cycle [template = constants.%.1] -// CHECK:STDOUT: %.loc6_19: type = struct_type {.b: Cycle*} [template = constants.%.2] -// CHECK:STDOUT: %a.var: ref {.b: Cycle*} = var a -// CHECK:STDOUT: %a: ref {.b: Cycle*} = bind_name a, %a.var +// CHECK:STDOUT: %.loc6_18: type = ptr_type %Cycle [template = constants.%.1] +// CHECK:STDOUT: %.loc6_19: type = struct_type {.b: %.1} [template = constants.%.2] +// CHECK:STDOUT: %a.var: ref %.2 = var a +// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var // CHECK:STDOUT: %Cycle.decl.loc8: type = class_decl @Cycle [template = constants.%Cycle] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Cycle { // CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, file.%Cycle.decl.loc4 [template = constants.%Cycle] -// CHECK:STDOUT: %.loc10_20: type = ptr_type Cycle [template = constants.%.1] -// CHECK:STDOUT: %.loc10_21: type = struct_type {.b: Cycle*} [template = constants.%.2] -// CHECK:STDOUT: %.loc10_8: = field_decl c, element0 [template] +// CHECK:STDOUT: %.loc10_20: type = ptr_type %Cycle [template = constants.%.1] +// CHECK:STDOUT: %.loc10_21: type = struct_type {.b: %.1} [template = constants.%.2] +// CHECK:STDOUT: %.loc10_8: %.3 = field_decl c, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Cycle @@ -73,13 +73,13 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [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: Cycle*} [template] -// CHECK:STDOUT: %.4: type = struct_type {.c: {.b: Cycle*}} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.c: {.b: Cycle*}} [template] -// CHECK:STDOUT: %.6: type = unbound_element_type Cycle, {.b: 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: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %Cycle, %.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -90,11 +90,11 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded -// CHECK:STDOUT: %import_ref.2: ref {.b: Cycle*} = import_ref ir1, inst+12, loaded +// CHECK:STDOUT: %import_ref.2: ref %.3 = import_ref ir1, inst+12, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+19, loaded [template = imports.%.1] +// CHECK:STDOUT: %import_ref.4: %.6 = import_ref ir1, inst+19, loaded [template = imports.%.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Cycle { @@ -105,16 +105,16 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref.loc7_3: ref {.b: Cycle*} = name_ref a, file.%import_ref.2 -// CHECK:STDOUT: %.loc7_4: ref Cycle* = struct_access %a.ref.loc7_3, element0 -// CHECK:STDOUT: %a.ref.loc7_11: ref {.b: Cycle*} = name_ref a, file.%import_ref.2 -// CHECK:STDOUT: %.loc7_12.1: ref Cycle* = struct_access %a.ref.loc7_11, element0 -// CHECK:STDOUT: %.loc7_12.2: Cycle* = bind_value %.loc7_12.1 -// CHECK:STDOUT: %.loc7_10: ref Cycle = deref %.loc7_12.2 -// CHECK:STDOUT: %c.ref: = name_ref c, file.%import_ref.4 [template = imports.%.1] -// CHECK:STDOUT: %.loc7_15: ref {.b: Cycle*} = class_element_access %.loc7_10, element0 -// CHECK:STDOUT: %.loc7_17.1: ref Cycle* = struct_access %.loc7_15, element0 -// CHECK:STDOUT: %.loc7_17.2: Cycle* = bind_value %.loc7_17.1 +// CHECK:STDOUT: %a.ref.loc7_3: ref %.3 = name_ref a, file.%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, file.%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: %.loc7_10: ref %Cycle = deref %.loc7_12.2 +// CHECK:STDOUT: %c.ref: %.6 = name_ref c, file.%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: assign %.loc7_4, %.loc7_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index bfb934c1aea0..66c844ce6d85 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -27,17 +27,17 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // 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: %Int32: = 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, Class* [template] -// CHECK:STDOUT: %.5: type = struct_type {.n: i32, .next: Class*} [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: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type {.n: i32, .next: Class*} [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %MakeReorder.type: type = fn_type @MakeReorder [template] -// CHECK:STDOUT: %MakeReorder: = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.next: Class*, .n: i32} [template] +// CHECK:STDOUT: %MakeReorder: %MakeReorder.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = struct_type {.next: %.3, .n: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,34 +49,34 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_32.loc16, %.loc16_12.1 [template = i32] // CHECK:STDOUT: %n.loc16_9.1: i32 = param n // CHECK:STDOUT: @Make.%n: i32 = bind_name n, %n.loc16_9.1 // CHECK:STDOUT: %Class.ref.loc16_23: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc16_28: type = ptr_type Class [template = constants.%.3] -// CHECK:STDOUT: %next.loc16_17.1: Class* = param next -// CHECK:STDOUT: @Make.%next: Class* = bind_name next, %next.loc16_17.1 +// CHECK:STDOUT: %.loc16_28: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %next.loc16_17.1: %.3 = param next +// CHECK:STDOUT: @Make.%next: %.3 = bind_name next, %next.loc16_17.1 // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: @Make.%return: ref Class = var +// CHECK:STDOUT: @Make.%return: ref %Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %MakeReorder.decl: = fn_decl @MakeReorder [template = constants.%MakeReorder] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MakeReorder.decl: %MakeReorder.type = fn_decl @MakeReorder [template = constants.%MakeReorder] { // 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: %n.loc20_16.1: i32 = param n // CHECK:STDOUT: @MakeReorder.%n: i32 = bind_name n, %n.loc20_16.1 // CHECK:STDOUT: %Class.ref.loc20_30: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc20_35: type = ptr_type Class [template = constants.%.3] -// CHECK:STDOUT: %next.loc20_24.1: Class* = param next -// CHECK:STDOUT: @MakeReorder.%next: Class* = bind_name next, %next.loc20_24.1 +// CHECK:STDOUT: %.loc20_35: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %next.loc20_24.1: %.3 = param next +// CHECK:STDOUT: @MakeReorder.%next: %.3 = bind_name next, %next.loc20_24.1 // CHECK:STDOUT: %Class.ref.loc20_41: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: @MakeReorder.%return: ref Class = var +// CHECK:STDOUT: @MakeReorder.%return: ref %Class = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -84,10 +84,10 @@ 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: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl next, element1 [template] +// CHECK:STDOUT: %.loc13_18: type = ptr_type %Class [template = constants.%.3] +// CHECK:STDOUT: %.loc13_11: %.4 = field_decl next, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -97,31 +97,31 @@ 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: i32, %next: Class*) -> %return: Class { +// CHECK:STDOUT: fn @Make(%n: i32, %next: %.3) -> %return: %Class { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %next.ref: Class* = name_ref next, %next -// CHECK:STDOUT: %.loc17_31.1: {.n: i32, .next: Class*} = struct_literal (%n.ref, %next.ref) +// CHECK:STDOUT: %next.ref: %.3 = name_ref next, %next +// CHECK:STDOUT: %.loc17_31.1: %.5 = 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 Class* = class_element_access %return, element1 -// CHECK:STDOUT: %.loc17_31.5: init Class* = 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: %.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.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: i32, %next: Class*) -> %return: Class { +// CHECK:STDOUT: fn @MakeReorder(%n: i32, %next: %.3) -> %return: %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %next.ref: Class* = name_ref next, %next +// CHECK:STDOUT: %next.ref: %.3 = name_ref next, %next // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %.loc21_31.1: {.next: Class*, .n: i32} = 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 Class* = class_element_access %return, element0 -// CHECK:STDOUT: %.loc21_31.5: init Class* = 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: %.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.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 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 76d7e0ca1e60..6e6c8c433080 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -85,18 +85,18 @@ var e: C = MakeAdaptC(); // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [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: %AdaptC: type = class_type @AdaptC [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: C = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] -// CHECK:STDOUT: %MakeC: = struct_value () [template] +// CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] -// CHECK:STDOUT: %MakeAdaptC: = struct_value () [template] +// CHECK:STDOUT: %MakeAdaptC: %MakeAdaptC.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,60 +111,60 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [template = constants.%AdaptC] {} // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc13_18: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_26: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_27.1: {.a: i32, .b: i32} = struct_literal (%.loc13_18, %.loc13_26) -// CHECK:STDOUT: %.loc13_27.2: ref C = temporary_storage +// CHECK:STDOUT: %.loc13_27.1: %.3 = 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.%.5] // 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.%.6] -// 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 -// CHECK:STDOUT: %.loc13_28.2: C = bind_value %.loc13_28.1 -// CHECK:STDOUT: %a: C = bind_name a, %.loc13_28.2 +// 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 +// CHECK:STDOUT: %.loc13_28.2: %C = bind_value %.loc13_28.1 +// CHECK:STDOUT: %a: %C = bind_name a, %.loc13_28.2 // CHECK:STDOUT: %AdaptC.ref.loc15_8: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %a.ref: C = name_ref a, %a +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %AdaptC.ref.loc15_22: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %.loc15_19.1: AdaptC = as_compatible %a.ref -// CHECK:STDOUT: %.loc15_19.2: AdaptC = converted %a.ref, %.loc15_19.1 -// CHECK:STDOUT: %b: AdaptC = bind_name b, %.loc15_19.2 +// CHECK:STDOUT: %.loc15_19.1: %AdaptC = as_compatible %a.ref +// CHECK:STDOUT: %.loc15_19.2: %AdaptC = converted %a.ref, %.loc15_19.1 +// CHECK:STDOUT: %b: %AdaptC = bind_name b, %.loc15_19.2 // CHECK:STDOUT: %C.ref.loc17_8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.ref: AdaptC = name_ref b, %b +// CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, %b // CHECK:STDOUT: %C.ref.loc17_17: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc17_14.1: C = as_compatible %b.ref -// CHECK:STDOUT: %.loc17_14.2: C = converted %b.ref, %.loc17_14.1 -// CHECK:STDOUT: %c: C = bind_name c, %.loc17_14.2 -// CHECK:STDOUT: %MakeC.decl: = fn_decl @MakeC [template = constants.%MakeC] { +// CHECK:STDOUT: %.loc17_14.1: %C = as_compatible %b.ref +// CHECK:STDOUT: %.loc17_14.2: %C = converted %b.ref, %.loc17_14.1 +// CHECK:STDOUT: %c: %C = bind_name c, %.loc17_14.2 +// CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @MakeC.%return: ref C = var +// CHECK:STDOUT: @MakeC.%return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %MakeAdaptC.decl: = fn_decl @MakeAdaptC [template = constants.%MakeAdaptC] { +// CHECK:STDOUT: %MakeAdaptC.decl: %MakeAdaptC.type = fn_decl @MakeAdaptC [template = constants.%MakeAdaptC] { // CHECK:STDOUT: %AdaptC.ref.loc21: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: @MakeAdaptC.%return: ref AdaptC = var +// CHECK:STDOUT: @MakeAdaptC.%return: ref %AdaptC = var // CHECK:STDOUT: } // CHECK:STDOUT: %AdaptC.ref.loc23: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %d.var: ref AdaptC = var d -// CHECK:STDOUT: %d: ref AdaptC = bind_name d, %d.var +// CHECK:STDOUT: %d.var: ref %AdaptC = var d +// CHECK:STDOUT: %d: ref %AdaptC = bind_name d, %d.var // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %e.var: ref C = var e -// CHECK:STDOUT: %e: ref C = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %C = var e +// CHECK:STDOUT: %e: ref %C = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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: = field_decl a, element0 [template] +// 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -174,7 +174,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // 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: adapt_decl %C // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC @@ -182,25 +182,25 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeC() -> C; +// CHECK:STDOUT: fn @MakeC() -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeAdaptC() -> AdaptC; +// CHECK:STDOUT: fn @MakeAdaptC() -> %AdaptC; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %MakeC.ref: = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] -// CHECK:STDOUT: %.loc23_5: ref AdaptC = splice_block file.%d.var {} -// CHECK:STDOUT: %MakeC.call: init C = call %MakeC.ref() to %.loc23_5 +// CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] +// CHECK:STDOUT: %.loc23_5: ref %AdaptC = splice_block file.%d.var {} +// CHECK:STDOUT: %MakeC.call: init %C = call %MakeC.ref() to %.loc23_5 // CHECK:STDOUT: %AdaptC.ref: type = name_ref AdaptC, file.%AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %.loc23_25.1: init AdaptC = as_compatible %MakeC.call -// CHECK:STDOUT: %.loc23_25.2: init AdaptC = converted %MakeC.call, %.loc23_25.1 +// CHECK:STDOUT: %.loc23_25.1: init %AdaptC = as_compatible %MakeC.call +// CHECK:STDOUT: %.loc23_25.2: init %AdaptC = converted %MakeC.call, %.loc23_25.1 // CHECK:STDOUT: assign file.%d.var, %.loc23_25.2 -// CHECK:STDOUT: %MakeAdaptC.ref: = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] -// CHECK:STDOUT: %.loc25_5: ref C = splice_block file.%e.var {} -// CHECK:STDOUT: %MakeAdaptC.call: init AdaptC = call %MakeAdaptC.ref() to %.loc25_5 +// CHECK:STDOUT: %MakeAdaptC.ref: %MakeAdaptC.type = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] +// CHECK:STDOUT: %.loc25_5: ref %C = splice_block file.%e.var {} +// CHECK:STDOUT: %MakeAdaptC.call: init %AdaptC = call %MakeAdaptC.ref() to %.loc25_5 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc25_25.1: init C = as_compatible %MakeAdaptC.call -// CHECK:STDOUT: %.loc25_25.2: init C = converted %MakeAdaptC.call, %.loc25_25.1 +// CHECK:STDOUT: %.loc25_25.1: init %C = as_compatible %MakeAdaptC.call +// CHECK:STDOUT: %.loc25_25.2: init %C = converted %MakeAdaptC.call, %.loc25_25.1 // CHECK:STDOUT: assign file.%e.var, %.loc25_25.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -211,18 +211,18 @@ var e: C = MakeAdaptC(); // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [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: %AdaptC: type = class_type @AdaptC [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: C = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] -// CHECK:STDOUT: %MakeC: = struct_value () [template] +// CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] -// CHECK:STDOUT: %MakeAdaptC: = struct_value () [template] +// CHECK:STDOUT: %MakeAdaptC: %MakeAdaptC.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -237,54 +237,54 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [template = constants.%AdaptC] {} // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc13_18: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_26: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_27.1: {.a: i32, .b: i32} = struct_literal (%.loc13_18, %.loc13_26) -// CHECK:STDOUT: %.loc13_27.2: ref C = temporary_storage +// CHECK:STDOUT: %.loc13_27.1: %.3 = 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.%.5] // 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.%.6] -// 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 -// CHECK:STDOUT: %.loc13_28.2: C = bind_value %.loc13_28.1 -// CHECK:STDOUT: %a: C = bind_name a, %.loc13_28.2 +// 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 +// CHECK:STDOUT: %.loc13_28.2: %C = bind_value %.loc13_28.1 +// CHECK:STDOUT: %a: %C = bind_name a, %.loc13_28.2 // CHECK:STDOUT: %AdaptC.ref.loc21: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %b: AdaptC = bind_name b, +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b: %AdaptC = bind_name b, // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.ref: AdaptC = name_ref b, %b -// CHECK:STDOUT: %c: C = bind_name c, -// CHECK:STDOUT: %MakeC.decl: = fn_decl @MakeC [template = constants.%MakeC] { +// CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, %b +// CHECK:STDOUT: %c: %C = bind_name c, +// CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %C.ref.loc29: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @MakeC.%return: ref C = var +// CHECK:STDOUT: @MakeC.%return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %MakeAdaptC.decl: = fn_decl @MakeAdaptC [template = constants.%MakeAdaptC] { +// CHECK:STDOUT: %MakeAdaptC.decl: %MakeAdaptC.type = fn_decl @MakeAdaptC [template = constants.%MakeAdaptC] { // CHECK:STDOUT: %AdaptC.ref.loc31: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: @MakeAdaptC.%return: ref AdaptC = var +// CHECK:STDOUT: @MakeAdaptC.%return: ref %AdaptC = var // CHECK:STDOUT: } // CHECK:STDOUT: %AdaptC.ref.loc37: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %d.var: ref AdaptC = var d -// CHECK:STDOUT: %d: ref AdaptC = bind_name d, %d.var +// CHECK:STDOUT: %d.var: ref %AdaptC = var d +// CHECK:STDOUT: %d: ref %AdaptC = bind_name d, %d.var // CHECK:STDOUT: %C.ref.loc42: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %e.var: ref C = var e -// CHECK:STDOUT: %e: ref C = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %C = var e +// CHECK:STDOUT: %e: ref %C = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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: = field_decl a, element0 [template] +// 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc6_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -294,7 +294,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // 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: adapt_decl %C // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC @@ -302,19 +302,19 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeC() -> C; +// CHECK:STDOUT: fn @MakeC() -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeAdaptC() -> AdaptC; +// CHECK:STDOUT: fn @MakeAdaptC() -> %AdaptC; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %MakeC.ref: = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] -// CHECK:STDOUT: %.loc37: ref C = temporary_storage -// CHECK:STDOUT: %MakeC.call: init C = call %MakeC.ref() to %.loc37 +// CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] +// CHECK:STDOUT: %.loc37: ref %C = temporary_storage +// CHECK:STDOUT: %MakeC.call: init %C = call %MakeC.ref() to %.loc37 // CHECK:STDOUT: assign file.%d.var, -// CHECK:STDOUT: %MakeAdaptC.ref: = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] -// CHECK:STDOUT: %.loc42: ref AdaptC = temporary_storage -// CHECK:STDOUT: %MakeAdaptC.call: init AdaptC = call %MakeAdaptC.ref() to %.loc42 +// CHECK:STDOUT: %MakeAdaptC.ref: %MakeAdaptC.type = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] +// CHECK:STDOUT: %.loc42: ref %AdaptC = temporary_storage +// CHECK:STDOUT: %MakeAdaptC.call: init %AdaptC = call %MakeAdaptC.ref() to %.loc42 // CHECK:STDOUT: assign file.%e.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index a0174615ef83..fd762e64b5e0 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -23,15 +23,15 @@ fn F() -> i32 { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct: Class = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.3 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,10 +42,10 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_32, %.loc16_11.1 [template = i32] @@ -57,11 +57,11 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -75,17 +75,17 @@ fn F() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_17: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc17_25: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_26.1: {.a: i32, .b: i32} = struct_literal (%.loc17_17, %.loc17_25) +// CHECK:STDOUT: %.loc17_26.1: %.3 = 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.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.%.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.%.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: = name_ref a, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// 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: %.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 8be1a285757f..33b871024de2 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -30,20 +30,20 @@ fn MakeOuter() -> Outer { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Inner, i32 [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: %MakeInner.type: type = fn_type @MakeInner [template] -// CHECK:STDOUT: %MakeInner: = struct_value () [template] +// CHECK:STDOUT: %MakeInner: %MakeInner.type = struct_value () [template] // CHECK:STDOUT: %Outer: type = class_type @Outer [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.5: type = unbound_element_type Outer, Inner [template] -// CHECK:STDOUT: %.6: type = struct_type {.c: Inner, .d: Inner} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Outer, %Inner [template] +// CHECK:STDOUT: %.6: type = struct_type {.c: %Inner, .d: %Inner} [template] // CHECK:STDOUT: %MakeOuter.type: type = fn_type @MakeOuter [template] -// CHECK:STDOUT: %MakeOuter: = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.c: {.a: i32, .b: i32}*, .d: {.a: i32, .b: i32}*} [template] -// CHECK:STDOUT: %.8: type = ptr_type {.c: {.a: i32, .b: i32}*, .d: {.a: i32, .b: i32}*} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.c: Inner, .d: Inner} [template] +// CHECK:STDOUT: %MakeOuter: %MakeOuter.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = struct_type {.c: %.4, .d: %.4} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] +// CHECK:STDOUT: %.9: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,16 +56,16 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %MakeInner.decl: = fn_decl @MakeInner [template = constants.%MakeInner] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MakeInner.decl: %MakeInner.type = fn_decl @MakeInner [template = constants.%MakeInner] { // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: @MakeInner.%return: ref Inner = var +// CHECK:STDOUT: @MakeInner.%return: ref %Inner = var // CHECK:STDOUT: } // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} -// CHECK:STDOUT: %MakeOuter.decl: = fn_decl @MakeOuter [template = constants.%MakeOuter] { +// CHECK:STDOUT: %MakeOuter.decl: %MakeOuter.type = fn_decl @MakeOuter [template = constants.%MakeOuter] { // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, %Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: @MakeOuter.%return: ref Outer = var +// CHECK:STDOUT: @MakeOuter.%return: ref %Outer = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -73,11 +73,11 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner @@ -87,9 +87,9 @@ 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: = 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: = field_decl d, element1 [template] +// CHECK:STDOUT: %.loc20: %.5 = field_decl d, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer @@ -99,19 +99,19 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeInner() -> Inner; +// CHECK:STDOUT: fn @MakeInner() -> %Inner; // CHECK:STDOUT: -// CHECK:STDOUT: fn @MakeOuter() -> %return: Outer { +// CHECK:STDOUT: fn @MakeOuter() -> %return: %Outer { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %MakeInner.ref.loc24_16: = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] -// CHECK:STDOUT: %.loc24_45.1: ref Inner = class_element_access %return, element0 -// CHECK:STDOUT: %MakeInner.call.loc24_25: init Inner = call %MakeInner.ref.loc24_16() to %.loc24_45.1 -// CHECK:STDOUT: %MakeInner.ref.loc24_34: = 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: {.c: Inner, .d: Inner} = 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: %MakeInner.ref.loc24_16: %MakeInner.type = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] +// CHECK:STDOUT: %.loc24_45.1: ref %Inner = class_element_access %return, element0 +// CHECK:STDOUT: %MakeInner.call.loc24_25: init %Inner = call %MakeInner.ref.loc24_16() to %.loc24_45.1 +// 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: %.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 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 9baa856735a7..adf3451d82d8 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -64,35 +64,35 @@ fn CallGOnInitializingExpr() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type Class [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type Class, i32 [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: type = ptr_type {.k: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] -// CHECK:STDOUT: %Call: = struct_value () [template] +// CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: %CallAlias.type: type = fn_type @CallAlias [template] -// CHECK:STDOUT: %CallAlias: = struct_value () [template] +// CHECK:STDOUT: %CallAlias: %CallAlias.type = struct_value () [template] // CHECK:STDOUT: %CallOnConstBoundMethod.type: type = fn_type @CallOnConstBoundMethod [template] -// CHECK:STDOUT: %CallOnConstBoundMethod: = struct_value () [template] +// CHECK:STDOUT: %CallOnConstBoundMethod: %CallOnConstBoundMethod.type = struct_value () [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct: Class = struct_value (%.6) [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.6) [template] // CHECK:STDOUT: %CallWithAddr.type: type = fn_type @CallWithAddr [template] -// CHECK:STDOUT: %CallWithAddr: = struct_value () [template] +// CHECK:STDOUT: %CallWithAddr: %CallWithAddr.type = struct_value () [template] // CHECK:STDOUT: %CallFThroughPointer.type: type = fn_type @CallFThroughPointer [template] -// CHECK:STDOUT: %CallFThroughPointer: = struct_value () [template] +// CHECK:STDOUT: %CallFThroughPointer: %CallFThroughPointer.type = struct_value () [template] // CHECK:STDOUT: %CallGThroughPointer.type: type = fn_type @CallGThroughPointer [template] -// CHECK:STDOUT: %CallGThroughPointer: = struct_value () [template] +// CHECK:STDOUT: %CallGThroughPointer: %CallGThroughPointer.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %CallFOnInitializingExpr.type: type = fn_type @CallFOnInitializingExpr [template] -// CHECK:STDOUT: %CallFOnInitializingExpr: = struct_value () [template] +// CHECK:STDOUT: %CallFOnInitializingExpr: %CallFOnInitializingExpr.type = struct_value () [template] // CHECK:STDOUT: %CallGOnInitializingExpr.type: type = fn_type @CallGOnInitializingExpr [template] -// CHECK:STDOUT: %CallGOnInitializingExpr: = struct_value () [template] +// CHECK:STDOUT: %CallGOnInitializingExpr: %CallGOnInitializingExpr.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,88 +111,88 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc20_12.1: Class = param self -// CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc20_12.1 +// CHECK:STDOUT: %self.loc20_12.1: %Class = param self +// CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc20_12.1 // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_29.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_29.2: type = converted %int.make_type_32.loc20, %.loc20_29.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Class.ref.loc24: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc24_9.1: Class = param c -// CHECK:STDOUT: @Call.%c: Class = bind_name c, %c.loc24_9.1 +// CHECK:STDOUT: %c.loc24_9.1: %Class = param c +// CHECK:STDOUT: @Call.%c: %Class = bind_name c, %c.loc24_9.1 // CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_22.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] // CHECK:STDOUT: %.loc24_22.2: type = converted %int.make_type_32.loc24, %.loc24_22.1 [template = i32] // CHECK:STDOUT: @Call.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallAlias.decl: = fn_decl @CallAlias [template = constants.%CallAlias] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallAlias.decl: %CallAlias.type = fn_decl @CallAlias [template = constants.%CallAlias] { // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc30_14.1: Class = param c -// CHECK:STDOUT: @CallAlias.%c: Class = bind_name c, %c.loc30_14.1 +// CHECK:STDOUT: %c.loc30_14.1: %Class = param c +// CHECK:STDOUT: @CallAlias.%c: %Class = bind_name c, %c.loc30_14.1 // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_27.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] // CHECK:STDOUT: %.loc30_27.2: type = converted %int.make_type_32.loc30, %.loc30_27.1 [template = i32] // CHECK:STDOUT: @CallAlias.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallOnConstBoundMethod.decl: = fn_decl @CallOnConstBoundMethod [template = constants.%CallOnConstBoundMethod] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallOnConstBoundMethod.decl: %CallOnConstBoundMethod.type = fn_decl @CallOnConstBoundMethod [template = constants.%CallOnConstBoundMethod] { // CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_32.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_32.2: type = converted %int.make_type_32.loc34, %.loc34_32.1 [template = i32] // CHECK:STDOUT: @CallOnConstBoundMethod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallWithAddr.decl: = fn_decl @CallWithAddr [template = constants.%CallWithAddr] { +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallWithAddr.decl: %CallWithAddr.type = fn_decl @CallWithAddr [template = constants.%CallWithAddr] { // CHECK:STDOUT: %int.make_type_32.loc38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_22.1: type = value_of_initializer %int.make_type_32.loc38 [template = i32] // CHECK:STDOUT: %.loc38_22.2: type = converted %int.make_type_32.loc38, %.loc38_22.1 [template = i32] // CHECK:STDOUT: @CallWithAddr.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallFThroughPointer.decl: = fn_decl @CallFThroughPointer [template = constants.%CallFThroughPointer] { +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallFThroughPointer.decl: %CallFThroughPointer.type = fn_decl @CallFThroughPointer [template = constants.%CallFThroughPointer] { // CHECK:STDOUT: %Class.ref.loc43: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc43_32: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %p.loc43_24.1: Class* = param p -// CHECK:STDOUT: @CallFThroughPointer.%p: Class* = bind_name p, %p.loc43_24.1 +// CHECK:STDOUT: %.loc43_32: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %p.loc43_24.1: %.2 = param p +// CHECK:STDOUT: @CallFThroughPointer.%p: %.2 = bind_name p, %p.loc43_24.1 // CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc43_38.1: type = value_of_initializer %int.make_type_32.loc43 [template = i32] // CHECK:STDOUT: %.loc43_38.2: type = converted %int.make_type_32.loc43, %.loc43_38.1 [template = i32] // CHECK:STDOUT: @CallFThroughPointer.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallGThroughPointer.decl: = fn_decl @CallGThroughPointer [template = constants.%CallGThroughPointer] { +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallGThroughPointer.decl: %CallGThroughPointer.type = fn_decl @CallGThroughPointer [template = constants.%CallGThroughPointer] { // CHECK:STDOUT: %Class.ref.loc47: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc47_32: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %p.loc47_24.1: Class* = param p -// CHECK:STDOUT: @CallGThroughPointer.%p: Class* = bind_name p, %p.loc47_24.1 +// CHECK:STDOUT: %.loc47_32: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %p.loc47_24.1: %.2 = param p +// CHECK:STDOUT: @CallGThroughPointer.%p: %.2 = bind_name p, %p.loc47_24.1 // CHECK:STDOUT: %int.make_type_32.loc47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc47_38.1: type = value_of_initializer %int.make_type_32.loc47 [template = i32] // CHECK:STDOUT: %.loc47_38.2: type = converted %int.make_type_32.loc47, %.loc47_38.1 [template = i32] // CHECK:STDOUT: @CallGThroughPointer.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Class.ref.loc51: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: @Make.%return: ref Class = var +// CHECK:STDOUT: @Make.%return: ref %Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallFOnInitializingExpr.decl: = fn_decl @CallFOnInitializingExpr [template = constants.%CallFOnInitializingExpr] { +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallFOnInitializingExpr.decl: %CallFOnInitializingExpr.type = fn_decl @CallFOnInitializingExpr [template = constants.%CallFOnInitializingExpr] { // CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_33.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_33.2: type = converted %int.make_type_32.loc53, %.loc53_33.1 [template = i32] // CHECK:STDOUT: @CallFOnInitializingExpr.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %CallGOnInitializingExpr.decl: = fn_decl @CallGOnInitializingExpr [template = constants.%CallGOnInitializingExpr] { +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallGOnInitializingExpr.decl: %CallGOnInitializingExpr.type = fn_decl @CallGOnInitializingExpr [template = constants.%CallGOnInitializingExpr] { // CHECK:STDOUT: %int.make_type_32.loc57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_33.1: type = value_of_initializer %int.make_type_32.loc57 [template = i32] // CHECK:STDOUT: %.loc57_33.2: type = converted %int.make_type_32.loc57, %.loc57_33.1 [template = i32] @@ -201,32 +201,32 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc12_8.1: Class = param self -// CHECK:STDOUT: %self.loc12_8.2: Class = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %self.loc12_8.1: %Class = param self +// CHECK:STDOUT: %self.loc12_8.2: %Class = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_32.loc12, %.loc12_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc13_23: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc13_13.1: Class* = param self -// CHECK:STDOUT: %self.loc13_13.3: Class* = bind_name self, %self.loc13_13.1 -// CHECK:STDOUT: %.loc13_8: Class* = addr_pattern %self.loc13_13.3 +// CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %self.loc13_13.1: %.2 = param self +// CHECK:STDOUT: %self.loc13_13.3: %.2 = bind_name self, %self.loc13_13.1 +// CHECK:STDOUT: %.loc13_8: %.2 = addr_pattern %self.loc13_13.3 // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13, %.loc13_31.1 [template = i32] // CHECK:STDOUT: %return.var.loc13: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.ref: = name_ref F, %F.decl [template = constants.%F] -// CHECK:STDOUT: %A: = bind_alias A, %F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [template = constants.%F] +// CHECK:STDOUT: %A: %F.type = bind_alias A, %F.decl [template = constants.%F] // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32.loc17, %.loc17_10.1 [template = i32] -// CHECK:STDOUT: %.loc17_8: = field_decl k, element0 [template] +// CHECK:STDOUT: %.loc17_8: %.3 = field_decl k, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -238,21 +238,21 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: Class]() -> i32 { +// CHECK:STDOUT: fn @F[%self: %Class]() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class = name_ref self, %self -// CHECK:STDOUT: %k.ref: = name_ref k, @Class.%.loc17_8 [template = @Class.%.loc17_8] +// CHECK:STDOUT: %self.ref: %Class = name_ref self, %self +// CHECK:STDOUT: %k.ref: %.3 = 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 @Class.%self.loc13_13.3: Class*]() -> i32; +// CHECK:STDOUT: fn @G[addr @Class.%self.loc13_13.3: %.2]() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%c: Class) -> i32 { +// CHECK:STDOUT: fn @Call(%c: %Class) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: Class = name_ref c, %c -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %c.ref: %Class = name_ref c, %c +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc27_11: = bound_method %c.ref, %F.ref // CHECK:STDOUT: %F.call: init i32 = call %.loc27_11(%c.ref) // CHECK:STDOUT: %.loc27_15.1: i32 = value_of_initializer %F.call @@ -260,10 +260,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: return %.loc27_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallAlias(%c: Class) -> i32 { +// CHECK:STDOUT: fn @CallAlias(%c: %Class) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: Class = name_ref c, %c -// CHECK:STDOUT: %A.ref: = name_ref A, @Class.%A [template = constants.%F] +// CHECK:STDOUT: %c.ref: %Class = name_ref c, %c +// CHECK:STDOUT: %A.ref: %F.type = name_ref A, @Class.%A [template = constants.%F] // CHECK:STDOUT: %.loc31_11: = bound_method %c.ref, %A.ref // CHECK:STDOUT: %F.call: init i32 = call %.loc31_11(%c.ref) // CHECK:STDOUT: %.loc31_15.1: i32 = value_of_initializer %F.call @@ -274,17 +274,17 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @CallOnConstBoundMethod() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc35_17: i32 = int_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc35_18.1: {.k: i32} = struct_literal (%.loc35_17) +// CHECK:STDOUT: %.loc35_18.1: %.4 = 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.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.%.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 -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// 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 +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc35_29: = bound_method %.loc35_20.1, %F.ref -// CHECK:STDOUT: %.loc35_20.2: Class = bind_value %.loc35_20.1 +// CHECK:STDOUT: %.loc35_20.2: %Class = bind_value %.loc35_20.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc35_29(%.loc35_20.2) // CHECK:STDOUT: %.loc35_33.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc35_33.2: i32 = converted %F.call, %.loc35_33.1 @@ -294,55 +294,55 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @CallWithAddr() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: 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: %c.ref: ref Class = name_ref c, %c -// CHECK:STDOUT: %G.ref: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %c.var: ref %Class = var c +// CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var +// 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: Class* = addr_of %c.ref +// CHECK:STDOUT: %.loc40_10: %.2 = 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: Class*) -> i32 { +// CHECK:STDOUT: fn @CallFThroughPointer(%p: %.2) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc44_11.1: ref Class = deref %p.ref -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %p.ref: %.2 = 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 -// CHECK:STDOUT: %.loc44_11.2: Class = bind_value %.loc44_11.1 +// CHECK:STDOUT: %.loc44_11.2: %Class = bind_value %.loc44_11.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc44_14(%.loc44_11.2) // CHECK:STDOUT: %.loc44_18.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc44_18.2: i32 = converted %F.call, %.loc44_18.1 // CHECK:STDOUT: return %.loc44_18.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallGThroughPointer(%p: Class*) -> i32 { +// CHECK:STDOUT: fn @CallGThroughPointer(%p: %.2) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: Class* = name_ref p, %p -// CHECK:STDOUT: %.loc48_11.1: ref Class = deref %p.ref -// CHECK:STDOUT: %G.ref: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %p.ref: %.2 = 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: Class* = addr_of %.loc48_11.1 +// CHECK:STDOUT: %.loc48_11.2: %.2 = 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 // CHECK:STDOUT: return %.loc48_18.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> Class; +// CHECK:STDOUT: fn @Make() -> %Class; // CHECK:STDOUT: // CHECK:STDOUT: fn @CallFOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Make.ref: = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc54_14.1: ref Class = temporary_storage -// CHECK:STDOUT: %Make.call: init Class = call %Make.ref() to %.loc54_14.1 -// CHECK:STDOUT: %.loc54_14.2: ref Class = temporary %.loc54_14.1, %Make.call -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] +// CHECK:STDOUT: %.loc54_14.1: ref %Class = temporary_storage +// CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc54_14.1 +// CHECK:STDOUT: %.loc54_14.2: ref %Class = temporary %.loc54_14.1, %Make.call +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc54_16: = bound_method %.loc54_14.2, %F.ref -// CHECK:STDOUT: %.loc54_14.3: Class = bind_value %.loc54_14.2 +// CHECK:STDOUT: %.loc54_14.3: %Class = bind_value %.loc54_14.2 // CHECK:STDOUT: %F.call: init i32 = call %.loc54_16(%.loc54_14.3) // CHECK:STDOUT: %.loc54_20.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc54_20.2: i32 = converted %F.call, %.loc54_20.1 @@ -351,13 +351,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Make.ref: = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc58_14.1: ref Class = temporary_storage -// CHECK:STDOUT: %Make.call: init Class = call %Make.ref() to %.loc58_14.1 -// CHECK:STDOUT: %.loc58_14.2: ref Class = temporary %.loc58_14.1, %Make.call -// CHECK:STDOUT: %G.ref: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] +// CHECK:STDOUT: %.loc58_14.1: ref %Class = temporary_storage +// CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc58_14.1 +// 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: Class* = addr_of %.loc58_14.2 +// CHECK:STDOUT: %.loc58_14.3: %.2 = 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 5a4a92f50737..ea7c15d33432 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -55,24 +55,24 @@ fn F(a: Outer*) { // 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: %F.1: = struct_value () [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, Inner* [template] -// CHECK:STDOUT: %.4: type = ptr_type Outer [template] -// CHECK:STDOUT: %.5: type = unbound_element_type Inner, Outer* [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: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.6: type = struct_type {.pi: Inner*, .po: Outer*, .qi: Inner*} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = struct_type {.pi: %.2, .po: %.4, .qi: %.2} [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] -// CHECK:STDOUT: %.7: type = unbound_element_type Outer, Outer* [template] -// CHECK:STDOUT: %.8: type = unbound_element_type Outer, Inner* [template] -// CHECK:STDOUT: %.9: type = struct_type {.po: Outer*, .qo: Outer*, .pi: Inner*} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.po: Outer*, .qo: Outer*, .pi: Inner*} [template] -// CHECK:STDOUT: %.11: type = ptr_type {.pi: Inner*, .po: Outer*, .qi: Inner*} [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = unbound_element_type %Outer, %.4 [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %Outer, %.2 [template] +// CHECK:STDOUT: %.9: type = struct_type {.po: %.4, .qo: %.4, .pi: %.2} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] +// CHECK:STDOUT: %.11: type = ptr_type %.6 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,27 +83,27 @@ fn F(a: Outer*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, %Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %.loc41: type = ptr_type Outer [template = constants.%.4] -// CHECK:STDOUT: %a.loc41_6.1: Outer* = param a -// CHECK:STDOUT: @F.2.%a: Outer* = bind_name a, %a.loc41_6.1 +// CHECK:STDOUT: %.loc41: type = ptr_type %Outer [template = constants.%.4] +// CHECK:STDOUT: %a.loc41_6.1: %.4 = param a +// CHECK:STDOUT: @F.2.%a: %.4 = bind_name a, %a.loc41_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// 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: = field_decl po, element0 [template] +// CHECK:STDOUT: %.loc36_15: type = ptr_type %Outer [template = constants.%.4] +// 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: = field_decl qo, element1 [template] +// CHECK:STDOUT: %.loc37_16: type = ptr_type %Outer [template = constants.%.4] +// 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: = field_decl pi, element2 [template] +// CHECK:STDOUT: %.loc38_16: type = ptr_type %Inner [template = constants.%.2] +// CHECK:STDOUT: %.loc38_9: %.8 = field_decl pi, element2 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer @@ -117,15 +117,15 @@ 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: = field_decl pi, element0 [template] +// CHECK:STDOUT: %.loc19_17: type = ptr_type %Inner [template = constants.%.2] +// CHECK:STDOUT: %.loc19_11: %.3 = 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: = field_decl po, element1 [template] +// CHECK:STDOUT: %.loc20_18: type = ptr_type %Outer [template = constants.%.4] +// CHECK:STDOUT: %.loc20_11: %.5 = 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: = field_decl qi, element2 [template] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %.loc21_18: type = ptr_type %Inner [template = constants.%.2] +// CHECK:STDOUT: %.loc21_11: %.3 = field_decl qi, element2 [template] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner @@ -138,94 +138,94 @@ fn F(a: Outer*) { // CHECK:STDOUT: fn @F.1() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %o.var: ref Outer = var o -// CHECK:STDOUT: %o: ref Outer = bind_name o, %o.var +// CHECK:STDOUT: %o.var: ref %Outer = var o +// CHECK:STDOUT: %o: ref %Outer = bind_name o, %o.var // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %i.var: ref Inner = var i -// CHECK:STDOUT: %i: ref Inner = bind_name i, %i.var +// CHECK:STDOUT: %i.var: ref %Inner = var i +// CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %o.var: ref Outer = var o -// CHECK:STDOUT: %o: ref Outer = bind_name o, %o.var +// CHECK:STDOUT: %o.var: ref %Outer = var o +// CHECK:STDOUT: %o: ref %Outer = bind_name o, %o.var // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %i.var: ref Inner = var i -// CHECK:STDOUT: %i: ref Inner = bind_name i, %i.var +// CHECK:STDOUT: %i.var: ref %Inner = var i +// CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %o.var: ref Outer = var o -// CHECK:STDOUT: %o: ref Outer = bind_name o, %o.var +// CHECK:STDOUT: %o.var: ref %Outer = var o +// CHECK:STDOUT: %o: ref %Outer = bind_name o, %o.var // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %i.var: ref Inner = var i -// CHECK:STDOUT: %i: ref Inner = bind_name i, %i.var +// CHECK:STDOUT: %i.var: ref %Inner = var i +// CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%a: Outer*) { +// CHECK:STDOUT: fn @F.2(%a: %.4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Outer.ref: 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: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc42_26: ref Outer = deref %a.ref.loc42 -// CHECK:STDOUT: %pi.ref.loc42: = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc42_29.1: ref Inner* = class_element_access %.loc42_26, element2 -// CHECK:STDOUT: %.loc42_29.2: Inner* = bind_value %.loc42_29.1 -// CHECK:STDOUT: %b: Inner* = bind_name b, %.loc42_29.2 -// CHECK:STDOUT: %a.ref.loc44_3: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc44_4.1: ref Outer = deref %a.ref.loc44_3 -// CHECK:STDOUT: %po.ref.loc44: = name_ref po, @Outer.%.loc36_9 [template = @Outer.%.loc36_9] -// CHECK:STDOUT: %.loc44_4.2: ref Outer* = class_element_access %.loc44_4.1, element0 -// CHECK:STDOUT: %a.ref.loc44_11: Outer* = name_ref a, %a +// CHECK:STDOUT: %.loc42_21: type = ptr_type %Inner [template = constants.%.2] +// CHECK:STDOUT: %a.ref.loc42: %.4 = name_ref a, %a +// CHECK:STDOUT: %.loc42_26: ref %Outer = deref %a.ref.loc42 +// CHECK:STDOUT: %pi.ref.loc42: %.8 = 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: %.loc44_4.1: ref %Outer = deref %a.ref.loc44_3 +// CHECK:STDOUT: %po.ref.loc44: %.7 = 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: assign %.loc44_4.2, %a.ref.loc44_11 -// CHECK:STDOUT: %a.ref.loc45_3: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc45_4.1: ref Outer = deref %a.ref.loc45_3 -// CHECK:STDOUT: %qo.ref: = name_ref qo, @Outer.%.loc37_9 [template = @Outer.%.loc37_9] -// CHECK:STDOUT: %.loc45_4.2: ref Outer* = class_element_access %.loc45_4.1, element1 -// CHECK:STDOUT: %a.ref.loc45_11: Outer* = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc45_3: %.4 = name_ref a, %a +// CHECK:STDOUT: %.loc45_4.1: ref %Outer = deref %a.ref.loc45_3 +// CHECK:STDOUT: %qo.ref: %.7 = 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: assign %.loc45_4.2, %a.ref.loc45_11 -// CHECK:STDOUT: %a.ref.loc46_3: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc46_4.1: ref Outer = deref %a.ref.loc46_3 -// CHECK:STDOUT: %pi.ref.loc46_4: = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc46_4.2: ref Inner* = class_element_access %.loc46_4.1, element2 -// CHECK:STDOUT: %a.ref.loc46_11: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc46_12.1: ref Outer = deref %a.ref.loc46_11 -// CHECK:STDOUT: %pi.ref.loc46_12: = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc46_12.2: ref Inner* = class_element_access %.loc46_12.1, element2 -// CHECK:STDOUT: %.loc46_12.3: Inner* = bind_value %.loc46_12.2 +// CHECK:STDOUT: %a.ref.loc46_3: %.4 = name_ref a, %a +// CHECK:STDOUT: %.loc46_4.1: ref %Outer = deref %a.ref.loc46_3 +// CHECK:STDOUT: %pi.ref.loc46_4: %.8 = 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: %.loc46_12.1: ref %Outer = deref %a.ref.loc46_11 +// CHECK:STDOUT: %pi.ref.loc46_12: %.8 = 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: assign %.loc46_4.2, %.loc46_12.3 -// CHECK:STDOUT: %b.ref.loc47: Inner* = name_ref b, %b -// CHECK:STDOUT: %.loc47_4.1: ref Inner = deref %b.ref.loc47 -// CHECK:STDOUT: %po.ref.loc47: = name_ref po, @Inner.%.loc20_11 [template = @Inner.%.loc20_11] -// CHECK:STDOUT: %.loc47_4.2: ref Outer* = class_element_access %.loc47_4.1, element1 -// CHECK:STDOUT: %a.ref.loc47: Outer* = name_ref a, %a +// CHECK:STDOUT: %b.ref.loc47: %.2 = 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: assign %.loc47_4.2, %a.ref.loc47 -// CHECK:STDOUT: %b.ref.loc48: Inner* = name_ref b, %b -// CHECK:STDOUT: %.loc48_4.1: ref Inner = deref %b.ref.loc48 -// CHECK:STDOUT: %pi.ref.loc48_4: = name_ref pi, @Inner.%.loc19_11 [template = @Inner.%.loc19_11] -// CHECK:STDOUT: %.loc48_4.2: ref Inner* = class_element_access %.loc48_4.1, element0 -// CHECK:STDOUT: %a.ref.loc48: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc48_12.1: ref Outer = deref %a.ref.loc48 -// CHECK:STDOUT: %pi.ref.loc48_12: = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc48_12.2: ref Inner* = class_element_access %.loc48_12.1, element2 -// CHECK:STDOUT: %.loc48_12.3: Inner* = bind_value %.loc48_12.2 +// CHECK:STDOUT: %b.ref.loc48: %.2 = 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: %.loc48_12.1: ref %Outer = deref %a.ref.loc48 +// CHECK:STDOUT: %pi.ref.loc48_12: %.8 = 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: assign %.loc48_4.2, %.loc48_12.3 -// CHECK:STDOUT: %b.ref.loc49: Inner* = name_ref b, %b -// CHECK:STDOUT: %.loc49_4.1: ref Inner = deref %b.ref.loc49 -// CHECK:STDOUT: %qi.ref: = name_ref qi, @Inner.%.loc21_11 [template = @Inner.%.loc21_11] -// CHECK:STDOUT: %.loc49_4.2: ref Inner* = class_element_access %.loc49_4.1, element2 -// CHECK:STDOUT: %a.ref.loc49: Outer* = name_ref a, %a -// CHECK:STDOUT: %.loc49_12.1: ref Outer = deref %a.ref.loc49 -// CHECK:STDOUT: %pi.ref.loc49: = name_ref pi, @Outer.%.loc38_9 [template = @Outer.%.loc38_9] -// CHECK:STDOUT: %.loc49_12.2: ref Inner* = class_element_access %.loc49_12.1, element2 -// CHECK:STDOUT: %.loc49_12.3: Inner* = bind_value %.loc49_12.2 +// CHECK:STDOUT: %b.ref.loc49: %.2 = 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: %.loc49_12.1: ref %Outer = deref %a.ref.loc49 +// CHECK:STDOUT: %pi.ref.loc49: %.8 = 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: 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 9a8ba972b76a..a3ff82131f7c 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -29,16 +29,16 @@ fn G(o: Outer) { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Inner, i32 [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: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type {.n: i32} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type {} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,22 +50,22 @@ fn G(o: Outer) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Outer.ref.loc17: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %oi.loc17_6.1: Inner = param oi -// CHECK:STDOUT: @F.%oi: Inner = bind_name oi, %oi.loc17_6.1 +// CHECK:STDOUT: %oi.loc17_6.1: %Inner = param oi +// CHECK:STDOUT: @F.%oi: %Inner = bind_name oi, %oi.loc17_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_26.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_26.2: type = converted %int.make_type_32, %.loc17_26.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Outer.ref.loc21: type = name_ref Outer, %Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %o.loc21_6.1: Outer = param o -// CHECK:STDOUT: @G.%o: Outer = bind_name o, %o.loc21_6.1 +// CHECK:STDOUT: %o.loc21_6.1: %Outer = param o +// CHECK:STDOUT: @G.%o: %Outer = bind_name o, %o.loc21_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,7 +81,7 @@ 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: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc13_10: %.2 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner @@ -90,21 +90,21 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%oi: Inner) -> i32 { +// CHECK:STDOUT: fn @F(%oi: %Inner) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %oi.ref: Inner = name_ref oi, %oi -// CHECK:STDOUT: %n.ref: = name_ref n, @Inner.%.loc13_10 [template = @Inner.%.loc13_10] +// 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: %.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 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%o: Outer) { +// CHECK:STDOUT: fn @G(%o: %Outer) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %o.ref: Outer = name_ref o, %o +// CHECK:STDOUT: %o.ref: %Outer = name_ref o, %o // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %i.var: ref Inner = var i -// CHECK:STDOUT: %i: ref Inner = bind_name i, %i.var +// CHECK:STDOUT: %i.var: ref %Inner = var i +// CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/no_prelude/export_name.carbon b/toolchain/check/testdata/class/no_prelude/export_name.carbon index 6208e3711ac6..e9e4a297ebcd 100644 --- a/toolchain/check/testdata/class/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/class/no_prelude/export_name.carbon @@ -84,8 +84,8 @@ var c: C = {}; // 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 = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,8 +96,8 @@ var c: C = {}; // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+6, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+5, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -107,9 +107,9 @@ var c: C = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc6_13.2: init C = class_init (), file.%c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc6_14: init C = converted %.loc6_13.1, %.loc6_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc6_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc6_13.2: init %C = class_init (), file.%c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc6_14: init %C = converted %.loc6_13.1, %.loc6_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, %.loc6_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/import_access.carbon b/toolchain/check/testdata/class/no_prelude/import_access.carbon index 07c736ef0c86..857988dd0c74 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -218,7 +218,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: {} = struct_literal () +// CHECK:STDOUT: %.loc8: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -240,7 +240,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: {} = struct_literal () +// CHECK:STDOUT: %.loc10: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -265,7 +265,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: {} = struct_literal () +// CHECK:STDOUT: %.loc10: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -287,7 +287,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: {} = struct_literal () +// CHECK:STDOUT: %.loc8: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -309,7 +309,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: {} = struct_literal () +// CHECK:STDOUT: %.loc10: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -334,7 +334,7 @@ private class Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10: {} = struct_literal () +// CHECK:STDOUT: %.loc10: %.1 = struct_literal () // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -344,7 +344,7 @@ private class Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Forward: type = class_type @Forward [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } @@ -354,7 +354,7 @@ private class Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Forward = %Forward.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc8: type = ptr_type [template = ] // CHECK:STDOUT: %c.loc8_6.1: = param c @@ -378,14 +378,14 @@ private class Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc10: type = ptr_type [template = ] // CHECK:STDOUT: %c.loc10_6.1: = param c @@ -403,7 +403,7 @@ private class Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -412,7 +412,7 @@ private class Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc9: type = ptr_type [template = ] 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 6388796506e4..6e9e81fb9d01 100644 --- a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon +++ b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon @@ -106,7 +106,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -118,7 +118,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -221,7 +221,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -230,11 +230,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+1, loaded [template = constants.%C] -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir2, inst+3, loaded [template = constants.%F] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %F.type = import_ref ir2, inst+3, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -249,8 +249,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.2 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.2 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -262,7 +262,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -271,12 +271,12 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+6, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+5, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.3: %F.type = import_ref ir1, inst+5, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -290,8 +290,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.3 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.3 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -303,7 +303,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -312,12 +312,12 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+7, loaded [template = constants.%C] -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+6, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir2, inst+5, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.3: %F.type = import_ref ir2, inst+5, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -331,8 +331,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.3 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.3 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -345,7 +345,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -354,14 +354,14 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+2, loaded [template = constants.%D] -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+10, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+7, unloaded -// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+8, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.5: %F.type = import_ref ir1, inst+8, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -382,8 +382,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.5 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.5 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -396,7 +396,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -405,14 +405,14 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%D] -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref ir2, inst+10, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4 = import_ref ir2, inst+7, unloaded -// CHECK:STDOUT: %import_ref.5: = import_ref ir2, inst+8, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.5: %F.type = import_ref ir2, inst+8, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -433,8 +433,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.5 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.5 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index ffd110ed84bc..563fa0b13d03 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -26,20 +26,20 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = ptr_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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [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: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.5: type = unbound_element_type Class, i32 [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: type = ptr_type {.n: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %.8: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,31 +49,31 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc17_27: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %self.loc17_17.1: Class* = param self -// CHECK:STDOUT: @F.%self.loc17_17: Class* = bind_name self, %self.loc17_17.1 -// CHECK:STDOUT: @F.%.loc17: Class* = addr_pattern @F.%self.loc17_17 +// CHECK:STDOUT: %.loc17_27: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %self.loc17_17.1: %.1 = param self +// CHECK:STDOUT: @F.%self.loc17_17: %.1 = bind_name self, %self.loc17_17.1 +// CHECK:STDOUT: @F.%.loc17: %.1 = addr_pattern @F.%self.loc17_17 // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_38.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_38.2: type = converted %int.make_type_32.loc17, %.loc17_38.1 [template = i32] // CHECK:STDOUT: %self.loc17_30.1: i32 = param r#self // CHECK:STDOUT: @F.%self.loc17_30: i32 = bind_name r#self, %self.loc17_30.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc21_12.1: Class = param self -// CHECK:STDOUT: @G.%self.loc21_12: Class = bind_name self, %self.loc21_12.1 +// CHECK:STDOUT: %self.loc21_12.1: %Class = param self +// CHECK:STDOUT: @G.%self.loc21_12: %Class = bind_name self, %self.loc21_12.1 // CHECK:STDOUT: %int.make_type_32.loc21_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %int.make_type_32.loc21_32 [template = i32] // CHECK:STDOUT: %.loc21_32.2: type = converted %int.make_type_32.loc21_32, %.loc21_32.1 [template = i32] @@ -81,33 +81,33 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: @G.%self.loc21_24: i32 = bind_name r#self, %self.loc21_24.1 // 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: (type, type) = tuple_literal (%int.make_type_32.loc21_41, %int.make_type_32.loc21_46) +// CHECK:STDOUT: %.loc21_49.1: %.3 = 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: @G.%return: ref (i32, i32) = var +// CHECK:STDOUT: @G.%return: ref %.4 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc12_23: type = ptr_type Class [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: Class* = param self -// CHECK:STDOUT: %self.loc12_13.3: Class* = bind_name self, %self.loc12_13.1 -// CHECK:STDOUT: %.loc12_8: Class* = addr_pattern %self.loc12_13.3 +// CHECK:STDOUT: %.loc12_23: type = ptr_type %Class [template = constants.%.1] +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 +// CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_34.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_32.loc12, %.loc12_34.1 [template = i32] // CHECK:STDOUT: %self.loc12_26.1: i32 = param r#self // CHECK:STDOUT: %self.loc12_26.2: i32 = bind_name r#self, %self.loc12_26.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc13_8.1: Class = param self -// CHECK:STDOUT: %self.loc13_8.2: Class = bind_name self, %self.loc13_8.1 +// CHECK:STDOUT: %self.loc13_8.1: %Class = param self +// CHECK:STDOUT: %self.loc13_8.2: %Class = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %int.make_type_32.loc13_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %int.make_type_32.loc13_28 [template = i32] // CHECK:STDOUT: %.loc13_28.2: type = converted %int.make_type_32.loc13_28, %.loc13_28.1 [template = i32] @@ -115,18 +115,18 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %self.loc13_20.2: i32 = bind_name r#self, %self.loc13_20.1 // 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: (type, type) = tuple_literal (%int.make_type_32.loc13_37, %int.make_type_32.loc13_42) +// CHECK:STDOUT: %.loc13_45.1: %.3 = 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: %return.var: ref (i32, i32) = var +// CHECK:STDOUT: %return.var: ref %.4 = var // CHECK:STDOUT: } // 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: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc14_8: %.5 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -137,31 +137,31 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[addr %self.loc17_17: Class*](%self.loc17_30: i32) { +// CHECK:STDOUT: fn @F[addr %self.loc17_17: %.1](%self.loc17_30: i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref.loc18_5: Class* = name_ref self, %self.loc17_17 -// CHECK:STDOUT: %.loc18_4: ref Class = deref %self.ref.loc18_5 -// CHECK:STDOUT: %n.ref: = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// 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: %.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.loc21_12: Class](%self.loc21_24: i32) -> %return: (i32, i32) { +// CHECK:STDOUT: fn @G[%self.loc21_12: %Class](%self.loc21_24: i32) -> %return: %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref.loc22_11: Class = name_ref self, %self.loc21_12 -// CHECK:STDOUT: %n.ref: = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// 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: %.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: (i32, i32) = tuple_literal (%.loc22_15.2, %self.ref.loc22_19) +// CHECK:STDOUT: %.loc22_25.1: %.4 = 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 (i32, i32) = tuple_init (%.loc22_25.3, %.loc22_25.5) to %return -// CHECK:STDOUT: %.loc22_26: init (i32, i32) = converted %.loc22_25.1, %.loc22_25.6 +// 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: 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 841d7583991f..d8780e250cc4 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -29,14 +29,14 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // 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: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type Class [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %Class [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [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] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,18 +48,18 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %MemberNamedSelf.decl: type = class_decl @MemberNamedSelf [template = constants.%MemberNamedSelf] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc24_25: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] -// CHECK:STDOUT: %x.loc24_22.1: MemberNamedSelf = param x -// CHECK:STDOUT: @F.2.%x: MemberNamedSelf = bind_name x, %x.loc24_22.1 +// CHECK:STDOUT: %x.loc24_22.1: %MemberNamedSelf = param x +// CHECK:STDOUT: @F.2.%x: %MemberNamedSelf = bind_name x, %x.loc24_22.1 // CHECK:STDOUT: %Self.ref.loc24_34: type = name_ref r#Self, @MemberNamedSelf.%Self.decl [template = constants.%Self] -// CHECK:STDOUT: %y.loc24_31.1: r#Self = param y -// CHECK:STDOUT: @F.2.%y: r#Self = bind_name y, %y.loc24_31.1 +// CHECK:STDOUT: %y.loc24_31.1: %Self = param y +// CHECK:STDOUT: @F.2.%y: %Self = bind_name y, %y.loc24_31.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -68,13 +68,13 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: // CHECK:STDOUT: class @MemberNamedSelf { // CHECK:STDOUT: %Self.decl: type = class_decl @Self [template = constants.%Self] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc21_11: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] -// CHECK:STDOUT: %x.loc21_8.1: MemberNamedSelf = param x -// CHECK:STDOUT: %x.loc21_8.2: MemberNamedSelf = bind_name x, %x.loc21_8.1 +// CHECK:STDOUT: %x.loc21_8.1: %MemberNamedSelf = param x +// CHECK:STDOUT: %x.loc21_8.2: %MemberNamedSelf = bind_name x, %x.loc21_8.1 // CHECK:STDOUT: %Self.ref.loc21_20: type = name_ref r#Self, %Self.decl [template = constants.%Self] -// CHECK:STDOUT: %y.loc21_17.1: r#Self = param y -// CHECK:STDOUT: %y.loc21_17.2: r#Self = bind_name y, %y.loc21_17.1 +// CHECK:STDOUT: %y.loc21_17.1: %Self = param y +// CHECK:STDOUT: %y.loc21_17.2: %Self = bind_name y, %y.loc21_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -91,20 +91,20 @@ 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.%.3] -// CHECK:STDOUT: %Self.var: ref Class* = var r#Self -// CHECK:STDOUT: %Self: ref Class* = 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.%.3] -// CHECK:STDOUT: %p.var: ref Class* = var p -// CHECK:STDOUT: %p: ref Class* = bind_name p, %p.var -// CHECK:STDOUT: %Self.ref.loc14_20: ref Class* = name_ref r#Self, %Self -// CHECK:STDOUT: %.loc14_20: Class* = 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: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%x: MemberNamedSelf, %y: r#Self) { +// CHECK:STDOUT: fn @F.2(%x: %MemberNamedSelf, %y: %Self) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/redeclaration.carbon b/toolchain/check/testdata/class/redeclaration.carbon index 66401ea0ee77..179018f6e7df 100644 --- a/toolchain/check/testdata/class/redeclaration.carbon +++ b/toolchain/check/testdata/class/redeclaration.carbon @@ -22,11 +22,11 @@ fn Class.F[self: Self](b: bool) {} // 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: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,12 +37,12 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl.loc11: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %Class.decl.loc13: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc17_12.1: Class = param self -// CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc17_12.1 +// CHECK:STDOUT: %self.loc17_12.1: %Class = param self +// CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc17_12.1 // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_27.2: type = converted %bool.make_type, %.loc17_27.1 [template = bool] @@ -52,10 +52,10 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc14_8.1: Class = param self -// CHECK:STDOUT: %self.loc14_8.2: Class = bind_name self, %self.loc14_8.1 +// CHECK:STDOUT: %self.loc14_8.1: %Class = param self +// CHECK:STDOUT: %self.loc14_8.2: %Class = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_23.2: type = converted %bool.make_type, %.loc14_23.1 [template = bool] @@ -70,7 +70,7 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: Class](%b: bool) { +// CHECK:STDOUT: fn @F[%self: %Class](%b: bool) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/reenter_scope.carbon b/toolchain/check/testdata/class/reenter_scope.carbon index 097ae30927d5..d52ffc86fd8a 100644 --- a/toolchain/check/testdata/class/reenter_scope.carbon +++ b/toolchain/check/testdata/class/reenter_scope.carbon @@ -24,11 +24,11 @@ fn Class.F() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,10 +39,10 @@ fn Class.F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_17.2: type = converted %int.make_type_32, %.loc16_17.1 [template = i32] @@ -51,13 +51,13 @@ fn Class.F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // 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: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_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] @@ -75,9 +75,9 @@ fn Class.F() -> i32 { // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %G.ref.loc17: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref.loc17: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call.loc17: init i32 = call %G.ref.loc17() -// CHECK:STDOUT: %G.ref.loc18: = name_ref G, @Class.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref.loc18: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call.loc18: init i32 = call %G.ref.loc18() // CHECK:STDOUT: %.loc18_13.1: i32 = value_of_initializer %G.call.loc18 // CHECK:STDOUT: %.loc18_13.2: i32 = converted %G.call.loc18, %.loc18_13.1 diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 60ce50355e2c..e96eb75ab7eb 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -24,11 +24,11 @@ class Class { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: } @@ -40,18 +40,18 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // 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: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // 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] @@ -69,7 +69,7 @@ class Class { // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc13_21.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc13_21.2: i32 = converted %F.call, %.loc13_21.1 diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 8259171cbf6d..97c6243de8a8 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -54,38 +54,38 @@ class A { // 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: %BF: = struct_value () [template] +// CHECK:STDOUT: %BF: %BF.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type B, i32 [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: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %DF.type: type = fn_type @DF [template] -// CHECK:STDOUT: %DF: = struct_value () [template] -// CHECK:STDOUT: %.4: type = unbound_element_type D, i32 [template] +// CHECK:STDOUT: %DF: %DF.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %D, i32 [template] // CHECK:STDOUT: %.5: type = struct_type {.d: i32} [template] // CHECK:STDOUT: %CF.type: type = fn_type @CF [template] -// CHECK:STDOUT: %CF: = struct_value () [template] -// CHECK:STDOUT: %.6: type = unbound_element_type C, i32 [template] +// CHECK:STDOUT: %CF: %CF.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = unbound_element_type %C, i32 [template] // CHECK:STDOUT: %.7: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %AF.type: type = fn_type @AF [template] -// CHECK:STDOUT: %AF: = struct_value () [template] -// CHECK:STDOUT: %.8: type = unbound_element_type A, i32 [template] +// CHECK:STDOUT: %AF: %AF.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = unbound_element_type %A, i32 [template] // CHECK:STDOUT: %.9: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.a: i32} [template] +// CHECK:STDOUT: %.10: type = ptr_type %.9 [template] // CHECK:STDOUT: %.11: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct.1: A = struct_value (%.11) [template] -// CHECK:STDOUT: %.12: type = ptr_type {.b: i32} [template] +// CHECK:STDOUT: %struct.1: %A = struct_value (%.11) [template] +// CHECK:STDOUT: %.12: type = ptr_type %.3 [template] // CHECK:STDOUT: %.13: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.2: B = struct_value (%.13) [template] -// CHECK:STDOUT: %.14: type = ptr_type {.c: i32} [template] +// CHECK:STDOUT: %struct.2: %B = struct_value (%.13) [template] +// CHECK:STDOUT: %.14: type = ptr_type %.7 [template] // CHECK:STDOUT: %.15: i32 = int_literal 3 [template] -// CHECK:STDOUT: %struct.3: C = struct_value (%.15) [template] -// CHECK:STDOUT: %.16: type = ptr_type {.d: i32} [template] +// CHECK:STDOUT: %struct.3: %C = struct_value (%.15) [template] +// CHECK:STDOUT: %.16: type = ptr_type %.5 [template] // CHECK:STDOUT: %.17: i32 = int_literal 4 [template] -// CHECK:STDOUT: %struct.4: D = struct_value (%.17) [template] +// CHECK:STDOUT: %struct.4: %D = struct_value (%.17) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -95,20 +95,20 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %AF.decl: = fn_decl @AF [template = constants.%AF] {} +// CHECK:STDOUT: %AF.decl: %AF.type = fn_decl @AF [template = constants.%AF] {} // 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc46_8: %.8 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -119,11 +119,11 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %BF.decl: = fn_decl @BF [template = constants.%BF] {} +// CHECK:STDOUT: %BF.decl: %BF.type = fn_decl @BF [template = constants.%BF] {} // 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: = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc16_10: %.2 = field_decl b, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -134,12 +134,12 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %DF.decl: = fn_decl @DF [template = constants.%DF] {} -// CHECK:STDOUT: %CF.decl: = fn_decl @CF [template = constants.%CF] {} +// CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} +// CHECK:STDOUT: %CF.decl: %CF.type = fn_decl @CF [template = constants.%CF] {} // 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: = field_decl c, element0 [template] +// CHECK:STDOUT: %.loc42_10: %.6 = field_decl c, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -149,12 +149,12 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %DF.decl: = fn_decl @DF [template = constants.%DF] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} // 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: = field_decl d, element0 [template] +// CHECK:STDOUT: %.loc24_12: %.4 = field_decl d, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -172,53 +172,53 @@ class A { // CHECK:STDOUT: fn @DF() { // CHECK:STDOUT: !entry: // 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: %a.var: ref %A = var a +// CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: %.loc29_24: i32 = int_literal 1 [template = constants.%.11] -// CHECK:STDOUT: %.loc29_25.1: {.a: i32} = struct_literal (%.loc29_24) +// CHECK:STDOUT: %.loc29_25.1: %.9 = 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.%.11] -// 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: %.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: %b.var: ref %B = var b +// CHECK:STDOUT: %b: ref %B = bind_name b, %b.var // CHECK:STDOUT: %.loc30_24: i32 = int_literal 2 [template = constants.%.13] -// CHECK:STDOUT: %.loc30_25.1: {.b: i32} = struct_literal (%.loc30_24) +// CHECK:STDOUT: %.loc30_25.1: %.3 = 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.%.13] -// 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: %.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: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %.loc31_24: i32 = int_literal 3 [template = constants.%.15] -// CHECK:STDOUT: %.loc31_25.1: {.c: i32} = struct_literal (%.loc31_24) +// CHECK:STDOUT: %.loc31_25.1: %.7 = 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.%.15] -// 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: %.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: %d.var: ref %D = var d +// CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: %.loc32_24: i32 = int_literal 4 [template = constants.%.17] -// CHECK:STDOUT: %.loc32_25.1: {.d: i32} = struct_literal (%.loc32_24) +// 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.%.17] -// 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: %.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: = name_ref AF, @A.%AF.decl [template = constants.%AF] -// CHECK:STDOUT: %AF.call: init () = call %AF.ref() -// CHECK:STDOUT: %BF.ref: = name_ref BF, @B.%BF.decl [template = constants.%BF] -// CHECK:STDOUT: %BF.call: init () = call %BF.ref() -// CHECK:STDOUT: %CF.ref: = name_ref CF, @C.%CF.decl [template = constants.%CF] -// CHECK:STDOUT: %CF.call: init () = call %CF.ref() -// CHECK:STDOUT: %DF.ref: = name_ref DF, @D.%DF.decl [template = constants.%DF] -// CHECK:STDOUT: %DF.call: init () = call %DF.ref() +// 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: %BF.ref: %BF.type = name_ref BF, @B.%BF.decl [template = constants.%BF] +// CHECK:STDOUT: %BF.call: init %.1 = 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: %DF.ref: %DF.type = name_ref DF, @D.%DF.decl [template = constants.%DF] +// CHECK:STDOUT: %DF.call: init %.1 = 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 17a3503ffd18..93d38b2c6e6a 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -33,18 +33,18 @@ fn Run() { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,28 +56,28 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32, %.loc21_11.1 [template = i32] // CHECK:STDOUT: @F.2.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // 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: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // 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] @@ -100,7 +100,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc17_15.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc17_15.2: i32 = converted %F.call, %.loc17_15.1 @@ -120,7 +120,7 @@ fn Run() { // CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_32.loc26, %.loc26_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %F.ref.loc26: = name_ref F, file.%F.decl [template = constants.%F.2] +// CHECK:STDOUT: %F.ref.loc26: %F.type.2 = name_ref F, file.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc26: init i32 = call %F.ref.loc26() // CHECK:STDOUT: assign %a.var, %F.call.loc26 // CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] @@ -129,7 +129,7 @@ fn Run() { // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %F.ref.loc27: = name_ref F, @Class.%F.decl [template = constants.%F.1] +// CHECK:STDOUT: %F.ref.loc27: %F.type.1 = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %F.call.loc27: init i32 = call %F.ref.loc27() // CHECK:STDOUT: assign %b.var, %F.call.loc27 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index e049344fc7a7..90d4bb7b39fd 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -29,15 +29,15 @@ fn Class.G[addr self: Self*]() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type Class [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.3: type = unbound_element_type Class, i32 [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: type = ptr_type {.n: i32} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,26 +47,26 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc18: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc18_12.1: Class = param self -// CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc18_12.1 +// CHECK:STDOUT: %self.loc18_12.1: %Class = param self +// CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc18_12.1 // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_32.loc18, %.loc18_29.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc22: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc22_27: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc22_17.1: Class* = param self -// CHECK:STDOUT: @G.%self: Class* = bind_name self, %self.loc22_17.1 -// CHECK:STDOUT: @G.%.loc22: Class* = addr_pattern @G.%self +// CHECK:STDOUT: %.loc22_27: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %self.loc22_17.1: %.2 = param self +// CHECK:STDOUT: @G.%self: %.2 = bind_name self, %self.loc22_17.1 +// CHECK:STDOUT: @G.%.loc22: %.2 = addr_pattern @G.%self // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_35.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_35.2: type = converted %int.make_type_32.loc22, %.loc22_35.1 [template = i32] @@ -75,21 +75,21 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc12_8.1: Class = param self -// CHECK:STDOUT: %self.loc12_8.2: Class = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %self.loc12_8.1: %Class = param self +// CHECK:STDOUT: %self.loc12_8.2: %Class = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_32.loc12, %.loc12_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc13_23: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc13_13.1: Class* = param self -// CHECK:STDOUT: %self.loc13_13.3: Class* = bind_name self, %self.loc13_13.1 -// CHECK:STDOUT: %.loc13_8: Class* = addr_pattern %self.loc13_13.3 +// CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %self.loc13_13.1: %.2 = param self +// CHECK:STDOUT: %self.loc13_13.3: %.2 = bind_name self, %self.loc13_13.1 +// CHECK:STDOUT: %.loc13_8: %.2 = addr_pattern %self.loc13_13.3 // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13, %.loc13_31.1 [template = i32] @@ -98,7 +98,7 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32.loc15, %.loc15_10.1 [template = i32] -// CHECK:STDOUT: %.loc15_8: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc15_8: %.3 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -109,20 +109,20 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: Class]() -> i32 { +// CHECK:STDOUT: fn @F[%self: %Class]() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class = name_ref self, %self -// CHECK:STDOUT: %n.ref: = name_ref n, @Class.%.loc15_8 [template = @Class.%.loc15_8] +// CHECK:STDOUT: %self.ref: %Class = name_ref self, %self +// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc15_8 [template = @Class.%.loc15_8] // CHECK:STDOUT: %.loc19_14.1: ref i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc19_14.2: i32 = bind_value %.loc19_14.1 // CHECK:STDOUT: return %.loc19_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr %self: Class*]() -> i32 { +// CHECK:STDOUT: fn @G[addr %self: %.2]() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class* = name_ref self, %self -// CHECK:STDOUT: %.loc23_11: ref Class = deref %self.ref -// CHECK:STDOUT: %n.ref: = name_ref n, @Class.%.loc15_8 [template = @Class.%.loc15_8] +// CHECK:STDOUT: %self.ref: %.2 = name_ref self, %self +// CHECK:STDOUT: %.loc23_11: ref %Class = deref %self.ref +// CHECK:STDOUT: %n.ref: %.3 = name_ref n, @Class.%.loc15_8 [template = @Class.%.loc15_8] // CHECK:STDOUT: %.loc23_17.1: ref i32 = class_element_access %.loc23_11, element0 // CHECK:STDOUT: %.loc23_17.2: i32 = bind_value %.loc23_17.1 // CHECK:STDOUT: return %.loc23_17.2 diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index a31149bb5ebc..715405032345 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -38,24 +38,24 @@ fn Call(p: Derived*) -> i32 { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [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: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32} [template] -// CHECK:STDOUT: %.5: type = unbound_element_type Derived, Base [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: %.5: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %SelfBase.type: type = fn_type @SelfBase [template] -// CHECK:STDOUT: %SelfBase: = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type Base [template] +// CHECK:STDOUT: %SelfBase: %SelfBase.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %Base [template] // CHECK:STDOUT: %AddrSelfBase.type: type = fn_type @AddrSelfBase [template] -// CHECK:STDOUT: %AddrSelfBase: = struct_value () [template] -// CHECK:STDOUT: %.7: type = struct_type {.base: Base} [template] +// CHECK:STDOUT: %AddrSelfBase: %AddrSelfBase.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = struct_type {.base: %Base} [template] // CHECK:STDOUT: %.8: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.9: type = ptr_type Derived [template] +// CHECK:STDOUT: %.9: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] -// CHECK:STDOUT: %Call: = struct_value () [template] -// CHECK:STDOUT: %.10: type = struct_type {.base: {.a: i32}*} [template] -// CHECK:STDOUT: %.11: type = ptr_type {.base: Base} [template] +// CHECK:STDOUT: %Call: %Call.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = struct_type {.base: %.4} [template] +// CHECK:STDOUT: %.11: type = ptr_type %.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,32 +67,32 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %SelfBase.decl: = fn_decl @SelfBase [template = constants.%SelfBase] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %SelfBase.decl: %SelfBase.type = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, %Base.decl [template = constants.%Base] -// CHECK:STDOUT: %self.loc22_21.1: Base = param self -// CHECK:STDOUT: @SelfBase.%self: Base = bind_name self, %self.loc22_21.1 +// CHECK:STDOUT: %self.loc22_21.1: %Base = param self +// CHECK:STDOUT: @SelfBase.%self: %Base = bind_name self, %self.loc22_21.1 // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_38.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_38.2: type = converted %int.make_type_32.loc22, %.loc22_38.1 [template = i32] // CHECK:STDOUT: @SelfBase.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %AddrSelfBase.decl: = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { +// CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, %Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc26_40: type = ptr_type Base [template = constants.%.6] -// CHECK:STDOUT: %self.loc26_30.1: Base* = param self -// CHECK:STDOUT: @AddrSelfBase.%self: Base* = bind_name self, %self.loc26_30.1 -// CHECK:STDOUT: @AddrSelfBase.%.loc26: Base* = addr_pattern @AddrSelfBase.%self +// CHECK:STDOUT: %.loc26_40: type = ptr_type %Base [template = constants.%.6] +// CHECK:STDOUT: %self.loc26_30.1: %.6 = param self +// CHECK:STDOUT: @AddrSelfBase.%self: %.6 = bind_name self, %self.loc26_30.1 +// CHECK:STDOUT: @AddrSelfBase.%.loc26: %.6 = addr_pattern @AddrSelfBase.%self // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc30_19: type = ptr_type Derived [template = constants.%.9] -// CHECK:STDOUT: %p.loc30_9.1: Derived* = param p -// CHECK:STDOUT: @Call.%p: Derived* = bind_name p, %p.loc30_9.1 +// CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.9] +// CHECK:STDOUT: %p.loc30_9.1: %.9 = param p +// CHECK:STDOUT: @Call.%p: %.9 = bind_name p, %p.loc30_9.1 // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_25.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] // CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_32.loc30, %.loc30_25.1 [template = i32] @@ -104,7 +104,7 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = field_decl a, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -113,22 +113,22 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref.loc16: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc16: = base_decl Base, element0 [template] -// CHECK:STDOUT: %SelfBase.decl: = fn_decl @SelfBase [template = constants.%SelfBase] { +// CHECK:STDOUT: %.loc16: %.5 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %SelfBase.decl: %SelfBase.type = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %self.loc18_15.1: Base = param self -// CHECK:STDOUT: %self.loc18_15.2: Base = bind_name self, %self.loc18_15.1 +// CHECK:STDOUT: %self.loc18_15.1: %Base = param self +// CHECK:STDOUT: %self.loc18_15.2: %Base = bind_name self, %self.loc18_15.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_32.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_32.2: type = converted %int.make_type_32, %.loc18_32.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %AddrSelfBase.decl: = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { +// CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc19_34: type = ptr_type Base [template = constants.%.6] -// CHECK:STDOUT: %self.loc19_24.1: Base* = param self -// CHECK:STDOUT: %self.loc19_24.3: Base* = bind_name self, %self.loc19_24.1 -// CHECK:STDOUT: %.loc19_19: Base* = addr_pattern %self.loc19_24.3 +// CHECK:STDOUT: %.loc19_34: type = ptr_type %Base [template = constants.%.6] +// CHECK:STDOUT: %self.loc19_24.1: %.6 = param self +// CHECK:STDOUT: %self.loc19_24.3: %.6 = bind_name self, %self.loc19_24.1 +// CHECK:STDOUT: %.loc19_19: %.6 = addr_pattern %self.loc19_24.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -141,45 +141,45 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfBase[%self: Base]() -> i32 { +// CHECK:STDOUT: fn @SelfBase[%self: %Base]() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Base = name_ref self, %self -// CHECK:STDOUT: %a.ref: = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %self.ref: %Base = name_ref self, %self +// CHECK:STDOUT: %a.ref: %.2 = 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: Base*]() { +// CHECK:STDOUT: fn @AddrSelfBase[addr %self: %.6]() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Base* = name_ref self, %self -// CHECK:STDOUT: %.loc27_4: ref Base = deref %self.ref -// CHECK:STDOUT: %a.ref: = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %self.ref: %.6 = name_ref self, %self +// 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: %.loc27_10: ref i32 = class_element_access %.loc27_4, element0 // CHECK:STDOUT: %.loc27_15: i32 = int_literal 1 [template = constants.%.8] // CHECK:STDOUT: assign %.loc27_10, %.loc27_15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p: Derived*) -> i32 { +// CHECK:STDOUT: fn @Call(%p: %.9) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref.loc31: Derived* = name_ref p, %p -// CHECK:STDOUT: %.loc31_4.1: ref Derived = deref %p.ref.loc31 -// CHECK:STDOUT: %AddrSelfBase.ref: = name_ref AddrSelfBase, @Derived.%AddrSelfBase.decl [template = constants.%AddrSelfBase] +// CHECK:STDOUT: %p.ref.loc31: %.9 = 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: Derived* = addr_of %.loc31_4.1 -// CHECK:STDOUT: %.loc31_20.1: ref Derived = deref %.loc31_4.2 -// CHECK:STDOUT: %.loc31_20.2: ref Base = class_element_access %.loc31_20.1, element0 -// CHECK:STDOUT: %.loc31_20.3: Base* = addr_of %.loc31_20.2 -// CHECK:STDOUT: %.loc31_20.4: Base* = converted %.loc31_4.2, %.loc31_20.3 -// CHECK:STDOUT: %AddrSelfBase.call: init () = call %.loc31_7(%.loc31_20.4) -// CHECK:STDOUT: %p.ref.loc32: Derived* = name_ref p, %p -// CHECK:STDOUT: %.loc32_11: ref Derived = deref %p.ref.loc32 -// CHECK:STDOUT: %SelfBase.ref: = name_ref SelfBase, @Derived.%SelfBase.decl [template = constants.%SelfBase] +// CHECK:STDOUT: %.loc31_4.2: %.9 = addr_of %.loc31_4.1 +// CHECK:STDOUT: %.loc31_20.1: ref %Derived = deref %.loc31_4.2 +// CHECK:STDOUT: %.loc31_20.2: ref %Base = class_element_access %.loc31_20.1, element0 +// CHECK:STDOUT: %.loc31_20.3: %.6 = addr_of %.loc31_20.2 +// CHECK:STDOUT: %.loc31_20.4: %.6 = converted %.loc31_4.2, %.loc31_20.3 +// CHECK:STDOUT: %AddrSelfBase.call: init %.1 = call %.loc31_7(%.loc31_20.4) +// CHECK:STDOUT: %p.ref.loc32: %.9 = name_ref p, %p +// CHECK:STDOUT: %.loc32_11: 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, %SelfBase.ref -// CHECK:STDOUT: %.loc32_23.1: ref Base = class_element_access %.loc32_11, element0 -// CHECK:STDOUT: %.loc32_23.2: ref Base = converted %.loc32_11, %.loc32_23.1 -// CHECK:STDOUT: %.loc32_23.3: Base = bind_value %.loc32_23.2 +// CHECK:STDOUT: %.loc32_23.1: ref %Base = class_element_access %.loc32_11, element0 +// CHECK:STDOUT: %.loc32_23.2: ref %Base = converted %.loc32_11, %.loc32_23.1 +// CHECK:STDOUT: %.loc32_23.3: %Base = bind_value %.loc32_23.2 // CHECK:STDOUT: %SelfBase.call: init i32 = call %.loc32_14(%.loc32_23.3) // CHECK:STDOUT: %.loc32_25.1: i32 = value_of_initializer %SelfBase.call // CHECK:STDOUT: %.loc32_25.2: i32 = converted %SelfBase.call, %.loc32_25.1 diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index d7a4b3eeb6d2..f9f6b52a865b 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -28,15 +28,15 @@ fn Class.F[self: Self]() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] -// CHECK:STDOUT: %Make: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type Class [template] -// CHECK:STDOUT: %.3: type = unbound_element_type Class, Class* [template] -// CHECK:STDOUT: %.4: type = struct_type {.p: Class*} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.p: Class*} [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: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,12 +46,12 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc21_12.1: Class = param self -// CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc21_12.1 +// CHECK:STDOUT: %self.loc21_12.1: %Class = param self +// CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc21_12.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_29.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_29.2: type = converted %int.make_type_32, %.loc21_29.1 [template = i32] @@ -60,22 +60,22 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc12_8.1: Class = param self -// CHECK:STDOUT: %self.loc12_8.2: Class = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %self.loc12_8.1: %Class = param self +// CHECK:STDOUT: %self.loc12_8.2: %Class = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_32, %.loc12_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %return.var.loc13: ref Class = var +// CHECK:STDOUT: %return.var.loc13: ref %Class = var // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref.loc18: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %.loc18_14: type = ptr_type Class [template = constants.%.2] -// CHECK:STDOUT: %.loc18_8: = field_decl p, element0 [template] +// CHECK:STDOUT: %.loc18_14: type = ptr_type %Class [template = constants.%.2] +// CHECK:STDOUT: %.loc18_8: %.3 = field_decl p, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -86,34 +86,34 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[%self: Class]() -> i32 { +// CHECK:STDOUT: fn @F[%self: %Class]() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Class = name_ref self, %self -// CHECK:STDOUT: %p.ref: = name_ref p, @Class.%.loc18_8 [template = @Class.%.loc18_8] -// CHECK:STDOUT: %.loc22_16.1: ref Class* = class_element_access %self.ref, element0 -// CHECK:STDOUT: %.loc22_16.2: Class* = bind_value %.loc22_16.1 -// CHECK:STDOUT: %.loc22_11.1: ref Class = deref %.loc22_16.2 -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %self.ref: %Class = name_ref self, %self +// 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: %.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 -// CHECK:STDOUT: %.loc22_11.2: Class = bind_value %.loc22_11.1 +// CHECK:STDOUT: %.loc22_11.2: %Class = bind_value %.loc22_11.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc22_19(%.loc22_11.2) // CHECK:STDOUT: %.loc22_23.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc22_23.2: i32 = converted %F.call, %.loc22_23.1 // CHECK:STDOUT: return %.loc22_23.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make() -> @Class.%return.var.loc13: Class { +// CHECK:STDOUT: fn @Make() -> @Class.%return.var.loc13: %Class { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %s: ref Class = bind_name s, @Class.%return.var.loc13 -// 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: Class* = addr_of %s.ref.loc15_16 -// CHECK:STDOUT: %.loc15_17.1: {.p: Class*} = struct_literal (%.loc15_15) -// CHECK:STDOUT: %.loc15_17.2: ref Class* = class_element_access %s.ref.loc15_5, element0 -// CHECK:STDOUT: %.loc15_17.3: init Class* = 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: %s: ref %Class = bind_name s, @Class.%return.var.loc13 +// 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_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 // CHECK:STDOUT: return %s to @Class.%return.var.loc13 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index 260b54054bb6..b1f0f12f3459 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -23,13 +23,13 @@ fn Run() -> i32 { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,9 +40,9 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32, %.loc15_13.1 [template = i32] @@ -51,7 +51,7 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] @@ -70,10 +70,10 @@ fn Run() -> i32 { // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: 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: %c.ref: ref Class = name_ref c, %c -// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] +// CHECK:STDOUT: %c.var: ref %Class = var c +// CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var +// CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc17_15.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc17_15.2: i32 = converted %F.call, %.loc17_15.1 diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index 79eeafd2699c..fbd320eb4e33 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -21,16 +21,16 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type const i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type const i32* [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: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type i32 [template] -// CHECK:STDOUT: %.6: type = const_type i32* [template] +// CHECK:STDOUT: %.6: type = const_type %.5 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,55 +40,55 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // 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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_19: type = ptr_type const i32* [template = constants.%.4] -// CHECK:STDOUT: %p.loc11_6.1: const i32** = param p -// CHECK:STDOUT: @A.%p: const i32** = bind_name p, %p.loc11_6.1 +// CHECK:STDOUT: %.loc11_18: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_19: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %p.loc11_6.1: %.4 = param p +// CHECK:STDOUT: @A.%p: %.4 = bind_name p, %p.loc11_6.1 // 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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_35: type = ptr_type const i32* [template = constants.%.4] -// CHECK:STDOUT: @A.%return: ref const i32** = var +// CHECK:STDOUT: %.loc11_34: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc11_35: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: @A.%return: ref %.4 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // 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 i32* [template = constants.%.6] -// CHECK:STDOUT: %p.loc15_6.1: const (i32*) = param p -// CHECK:STDOUT: @B.%p: const (i32*) = bind_name p, %p.loc15_6.1 +// CHECK:STDOUT: %.loc15_9: type = const_type %.5 [template = constants.%.6] +// CHECK:STDOUT: %p.loc15_6.1: %.6 = param p +// CHECK:STDOUT: @B.%p: %.6 = bind_name p, %p.loc15_6.1 // 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 i32* [template = constants.%.6] -// CHECK:STDOUT: @B.%return: ref const (i32*) = var +// CHECK:STDOUT: %.loc15_26: type = const_type %.5 [template = constants.%.6] +// CHECK:STDOUT: @B.%return: ref %.6 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @A(%p: const i32**) -> const i32** { +// CHECK:STDOUT: fn @A(%p: %.4) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const i32** = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%p: const (i32*)) -> const (i32*) { +// CHECK:STDOUT: fn @B(%p: %.6) -> %.6 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const (i32*) = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.6 = 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 f147f3513f4b..0e014606c9e5 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -21,12 +21,12 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type const i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type const i32* [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: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,33 +35,33 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_19: type = ptr_type const i32* [template = constants.%.4] -// CHECK:STDOUT: %p.loc15_6.1: const i32** = param p -// CHECK:STDOUT: @F.%p: const i32** = bind_name p, %p.loc15_6.1 +// CHECK:STDOUT: %.loc15_18: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_19: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %p.loc15_6.1: %.4 = param p +// CHECK:STDOUT: @F.%p: %.4 = bind_name p, %p.loc15_6.1 // 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 const i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_42: type = ptr_type const i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_43: type = ptr_type const i32* [template = constants.%.4] -// CHECK:STDOUT: @F.%return: ref const i32** = var +// 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: @F.%return: ref %.4 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p: const i32**) -> const i32** { +// CHECK:STDOUT: fn @F(%p: %.4) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const i32** = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.4 = 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 f9a982fb5c50..d478620a4cec 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -24,14 +24,14 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type const i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type const i32* [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 i32* [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,32 +40,32 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // 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 const i32 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_26: type = ptr_type const i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_27: type = ptr_type const i32* [template = constants.%.4] -// CHECK:STDOUT: %p.loc15_6.1: const i32** = param p -// CHECK:STDOUT: @G.%p: const i32** = bind_name p, %p.loc15_6.1 +// 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: %p.loc15_6.1: %.4 = param p +// CHECK:STDOUT: @G.%p: %.4 = bind_name p, %p.loc15_6.1 // 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 i32* [template = constants.%.6] -// CHECK:STDOUT: @G.%return: ref i32** = var +// CHECK:STDOUT: %.loc15_37: type = ptr_type %.5 [template = constants.%.6] +// CHECK:STDOUT: @G.%return: ref %.6 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%p: const i32**) -> i32** { +// CHECK:STDOUT: fn @G(%p: %.4) -> %.6 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const i32** = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index 6ae2f9e87132..969fbd9af4ff 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -31,11 +31,11 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type const i32 [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,42 +46,42 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: .a_ptr_ref = %a_ptr_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // 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_11.3: type = const_type i32 [template = constants.%.2] -// CHECK:STDOUT: @F.%return: ref const i32 = var +// CHECK:STDOUT: @F.%return: ref %.2 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 const i32 = var a_ref -// CHECK:STDOUT: %a_ref: ref const i32 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %a_ptr_ref.var: ref const i32* = var a_ptr_ref -// CHECK:STDOUT: %a_ptr_ref: ref const i32* = bind_name a_ptr_ref, %a_ptr_ref.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> const i32; +// CHECK:STDOUT: fn @F() -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init const i32 = call %F.ref() +// 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: assign file.%a_ref.var, %F.call -// CHECK:STDOUT: %a_ref.ref: ref const i32 = name_ref a_ref, file.%a_ref -// CHECK:STDOUT: %.loc7: const i32* = addr_of %a_ref.ref +// 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: assign file.%a_ptr_ref.var, %.loc7 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -91,9 +91,9 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type const i32 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,36 +106,36 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: .a_ptr = %a_ptr // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+14, unloaded -// CHECK:STDOUT: %import_ref.2: ref const i32 = import_ref ir0, inst+23, loaded -// CHECK:STDOUT: %import_ref.3: ref const i32* = import_ref ir0, inst+35, loaded +// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref ir0, inst+23, loaded +// CHECK:STDOUT: %import_ref.3: ref %.3 = import_ref ir0, inst+35, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref const i32* = var a -// CHECK:STDOUT: %a: ref const i32* = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %a_ptr.var: ref const i32* = var a_ptr -// CHECK:STDOUT: %a_ptr: ref const i32* = bind_name a_ptr, %a_ptr.var +// 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: } // 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 const i32 = name_ref a_ref, file.%import_ref.2 -// CHECK:STDOUT: %.loc6: const i32* = addr_of %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, file.%import_ref.2 +// CHECK:STDOUT: %.loc6: %.3 = addr_of %a_ref.ref // CHECK:STDOUT: assign file.%a.var, %.loc6 -// CHECK:STDOUT: %a_ptr_ref.ref: ref const i32* = name_ref a_ptr_ref, file.%import_ref.3 -// CHECK:STDOUT: %.loc7: const i32* = bind_value %a_ptr_ref.ref +// CHECK:STDOUT: %a_ptr_ref.ref: ref %.3 = name_ref a_ptr_ref, file.%import_ref.3 +// CHECK:STDOUT: %.loc7: %.3 = 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/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index 250085a8db77..1e4a2f860500 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -21,35 +21,35 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %tuple.1: (i32, i32) = tuple_value (%.5, %.6) [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 {.a: i32, .b: i32, .c: i32} [template] +// CHECK:STDOUT: %.8: type = ptr_type %.7 [template] // CHECK:STDOUT: %.9: i32 = int_literal 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 {.b: i32, .a: i32, .c: i32} [template] -// CHECK:STDOUT: %struct.1: {.b: i32, .a: i32, .c: i32} = struct_value (%.6, %.5, %.9) [template] -// CHECK:STDOUT: %struct.2: {.a: i32, .b: i32, .c: i32} = struct_value (%.5, %.6, %.9) [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 [i32; 1] [template] +// CHECK:STDOUT: %.14: type = ptr_type %.13 [template] // CHECK:STDOUT: %.15: i32 = int_literal 0 [template] // CHECK:STDOUT: %.16: type = tuple_type (i32) [template] // CHECK:STDOUT: %.17: i32 = int_literal 5 [template] // CHECK:STDOUT: %.18: i32 = int_literal 7 [template] // CHECK:STDOUT: %.19: i32 = int_literal 9 [template] // CHECK:STDOUT: %.20: type = tuple_type (i32, i32, i32, i32) [template] -// CHECK:STDOUT: %.21: type = ptr_type (i32, i32, i32, i32) [template] -// CHECK:STDOUT: %tuple.2: (i32, i32, i32, i32) = tuple_value (%.17, %.18, %.5, %.19) [template] -// CHECK:STDOUT: %array: [i32; 1] = tuple_value (%.15) [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 {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct.3: {.a: i32, .b: i32} = struct_value (%.9, %.5) [template] +// CHECK:STDOUT: %.23: type = ptr_type %.22 [template] +// CHECK:STDOUT: %struct.3: %.22 = struct_value (%.9, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,56 +61,56 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: .struct_access = %struct_access // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_26.1: (type, type) = tuple_literal (%int.make_type_32.loc11_18, %int.make_type_32.loc11_23) +// CHECK:STDOUT: %.loc11_26.1: %.2 = 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 (i32, i32) = var tuple_copy -// CHECK:STDOUT: %tuple_copy: ref (i32, i32) = bind_name tuple_copy, %tuple_copy.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_32.1: type = value_of_initializer %int.make_type_32.loc13_32 [template = i32] // CHECK:STDOUT: %.loc13_32.2: type = converted %int.make_type_32.loc13_32, %.loc13_32.1 [template = i32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 {.a: i32, .b: i32, .c: i32} = var struct_copy -// CHECK:STDOUT: %struct_copy: ref {.a: i32, .b: i32, .c: i32} = bind_name struct_copy, %struct_copy.var -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_24: i32 = int_literal 1 [template = constants.%.5] // 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 [i32; 1] = var tuple_index -// CHECK:STDOUT: %tuple_index: ref [i32; 1] = bind_name tuple_index, %tuple_index.var -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_26: i32 = int_literal 1 [template = constants.%.5] // 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 [i32; 1] = var struct_access -// CHECK:STDOUT: %struct_access: ref [i32; 1] = bind_name struct_access, %struct_access.var -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -119,10 +119,10 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_31: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_34: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_35.1: (i32, i32) = tuple_literal (%.loc11_31, %.loc11_34) +// CHECK:STDOUT: %.loc11_35.1: %.3 = 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: (type, type) = tuple_literal (%int.make_type_32.loc11_41, %int.make_type_32.loc11_46) +// CHECK:STDOUT: %.loc11_49.1: %.2 = 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] @@ -132,13 +132,13 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc11_35.3: init i32 = initialize_from %.loc11_31 to %.loc11_35.2 [template = constants.%.5] // 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 (i32, i32) = tuple_init (%.loc11_35.3, %.loc11_35.5) to file.%tuple_copy.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_50: init (i32, i32) = converted %.loc11_35.1, %.loc11_35.6 [template = constants.%tuple.1] +// 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: assign file.%tuple_copy.var, %.loc11_50 // CHECK:STDOUT: %.loc13_54: i32 = int_literal 3 [template = constants.%.9] // CHECK:STDOUT: %.loc13_62: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc13_70: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_71: {.c: i32, .b: i32, .a: i32} = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) +// CHECK:STDOUT: %.loc13_71: %.10 = 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] @@ -149,8 +149,8 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // 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: {.b: i32, .a: i32, .c: i32} = struct_value (%.loc13_62, %.loc13_70, %.loc13_54) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.1: {.b: i32, .a: i32, .c: i32} = converted %.loc13_71, %struct.loc13 [template = constants.%struct.1] +// 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_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] @@ -160,49 +160,49 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc13_73.8: i32 = struct_access %.loc13_73.1, element2 [template = constants.%.9] // 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 {.a: i32, .b: i32, .c: i32} = 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 {.a: i32, .b: i32, .c: i32} = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] +// 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: assign file.%struct_copy.var, %.loc13_103 // CHECK:STDOUT: %.loc15_30: i32 = int_literal 0 [template = constants.%.15] -// CHECK:STDOUT: %.loc15_32.1: (i32,) = tuple_literal (%.loc15_30) +// CHECK:STDOUT: %.loc15_32.1: %.16 = tuple_literal (%.loc15_30) // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_44: i32 = int_literal 5 [template = constants.%.17] // CHECK:STDOUT: %.loc15_47: i32 = int_literal 7 [template = constants.%.18] // CHECK:STDOUT: %.loc15_50: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc15_53: i32 = int_literal 9 [template = constants.%.19] -// CHECK:STDOUT: %.loc15_54.1: (i32, i32, i32, i32) = tuple_literal (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) +// CHECK:STDOUT: %.loc15_54.1: %.20 = tuple_literal (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) // CHECK:STDOUT: %.loc15_56: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %tuple: (i32, i32, i32, i32) = tuple_value (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc15_54.2: (i32, i32, i32, i32) = converted %.loc15_54.1, %tuple [template = constants.%tuple.2] +// 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_57: i32 = tuple_index %.loc15_54.2, %.loc15_56 [template = constants.%.5] // 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_58: type = array_type %.loc15_57, i32 [template = constants.%.13] -// CHECK:STDOUT: %.loc15_5: ref [i32; 1] = splice_block file.%tuple_index.var {} +// CHECK:STDOUT: %.loc15_5: ref %.13 = splice_block file.%tuple_index.var {} // CHECK:STDOUT: %.loc15_32.2: i32 = int_literal 0 [template = constants.%.15] // 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 [i32; 1] = array_init (%.loc15_32.4) to %.loc15_5 [template = constants.%array] -// CHECK:STDOUT: %.loc15_34: init [i32; 1] = converted %.loc15_32.1, %.loc15_32.5 [template = constants.%array] +// 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: assign file.%tuple_index.var, %.loc15_34 // CHECK:STDOUT: %.loc17_32: i32 = int_literal 0 [template = constants.%.15] -// CHECK:STDOUT: %.loc17_34.1: (i32,) = tuple_literal (%.loc17_32) +// CHECK:STDOUT: %.loc17_34.1: %.16 = tuple_literal (%.loc17_32) // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_51: i32 = int_literal 3 [template = constants.%.9] // CHECK:STDOUT: %.loc17_59: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_60.1: {.a: i32, .b: i32} = struct_literal (%.loc17_51, %.loc17_59) -// CHECK:STDOUT: %struct.loc17: {.a: i32, .b: i32} = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_60.2: {.a: i32, .b: i32} = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] +// 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_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 [i32; 1] = splice_block file.%struct_access.var {} +// CHECK:STDOUT: %.loc17_5: ref %.13 = splice_block file.%struct_access.var {} // CHECK:STDOUT: %.loc17_34.2: i32 = int_literal 0 [template = constants.%.15] // 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 [i32; 1] = array_init (%.loc17_34.4) to %.loc17_5 [template = constants.%array] -// CHECK:STDOUT: %.loc17_36: init [i32; 1] = converted %.loc17_34.1, %.loc17_34.5 [template = constants.%array] +// 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: 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 0e0f44d46921..f805871b3372 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -20,10 +20,10 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: %.6: type = tuple_type (i32) [template] // CHECK:STDOUT: %.7: i32 = int_literal 5 [template] @@ -32,10 +32,10 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %.10: type = tuple_type (i32, i32, i32, i32) [template] // CHECK:STDOUT: %.11: i32 = int_literal 4 [template] // CHECK:STDOUT: %.12: type = array_type %.11, i32 [template] -// CHECK:STDOUT: %.13: type = ptr_type [i32; 4] [template] +// CHECK:STDOUT: %.13: type = ptr_type %.12 [template] // CHECK:STDOUT: %.14: i32 = int_literal 2 [template] // CHECK:STDOUT: %.15: i32 = int_literal 3 [template] -// CHECK:STDOUT: %array: [i32; 4] = tuple_value (%.7, %.8, %.2, %.9) [template] +// CHECK:STDOUT: %array: %.12 = tuple_value (%.7, %.8, %.2, %.9) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,16 +44,16 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: .array_index = %array_index // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_24: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = var array_index -// CHECK:STDOUT: %array_index: ref [i32; 1] = bind_name array_index, %array_index.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -61,19 +61,19 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_30: i32 = int_literal 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_32: (i32,) = tuple_literal (%.loc16_30) +// CHECK:STDOUT: %.loc16_32: %.6 = 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_literal 5 [template = constants.%.7] // CHECK:STDOUT: %.loc16_48: i32 = int_literal 7 [template = constants.%.8] // CHECK:STDOUT: %.loc16_51: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc16_54: i32 = int_literal 9 [template = constants.%.9] -// CHECK:STDOUT: %.loc16_55.1: (i32, i32, i32, i32) = tuple_literal (%.loc16_45, %.loc16_48, %.loc16_51, %.loc16_54) +// CHECK:STDOUT: %.loc16_55.1: %.10 = 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_literal 4 [template = constants.%.11] // 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 [i32; 4] = temporary_storage +// CHECK:STDOUT: %.loc16_55.2: ref %.12 = temporary_storage // CHECK:STDOUT: %.loc16_55.3: i32 = int_literal 0 [template = constants.%.5] // 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] @@ -86,10 +86,10 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %.loc16_55.12: i32 = int_literal 3 [template = constants.%.15] // 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 [i32; 4] = 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 [i32; 4] = converted %.loc16_55.1, %.loc16_55.15 [template = constants.%array] +// 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_literal 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc16_57.2: ref [i32; 4] = temporary %.loc16_55.2, %.loc16_57.1 +// CHECK:STDOUT: %.loc16_57.2: ref %.12 = 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 93d6fd3eca14..1a245c0cfbfb 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -21,10 +21,10 @@ fn G(N:! i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,15 +33,15 @@ fn G(N:! i32) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.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: %N.loc12_6.1: i32 = param N // CHECK:STDOUT: @G.%N: i32 = bind_symbolic_name N 0, %N.loc12_6.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index 300162c6ef63..11974c071a1a 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -21,17 +21,17 @@ fn F(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type T [symbolic] -// CHECK:STDOUT: %.3: type = const_type T [symbolic] +// 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 (T*, const T) [symbolic] -// CHECK:STDOUT: %.6: type = tuple_type (T*, T) [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type (T*, T) [symbolic] -// CHECK:STDOUT: %.8: type = struct_type {.a: T} [symbolic] +// CHECK:STDOUT: %.5: type = tuple_type (%.2, %.3) [symbolic] +// CHECK:STDOUT: %.6: type = tuple_type (%.2, %T) [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [symbolic] +// CHECK:STDOUT: %.8: type = struct_type {.a: %T} [symbolic] // CHECK:STDOUT: %.9: i32 = int_literal 5 [template] -// CHECK:STDOUT: %.10: type = array_type %.9, T [symbolic] -// CHECK:STDOUT: %.11: type = ptr_type [T; 5] [symbolic] +// CHECK:STDOUT: %.10: type = array_type %.9, %T [symbolic] +// CHECK:STDOUT: %.11: type = ptr_type %.10 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,7 +40,7 @@ fn F(T:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc12_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc12_6.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -49,22 +49,22 @@ fn F(T:! type) { // CHECK:STDOUT: fn @F(%T: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc13_11: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc13_12: type = ptr_type T [symbolic = constants.%.2] +// CHECK:STDOUT: %.loc13_12: type = ptr_type %T [symbolic = constants.%.2] // CHECK:STDOUT: %T.ref.loc13_21: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc13_15: type = const_type T [symbolic = constants.%.3] -// CHECK:STDOUT: %.loc13_22.1: (type, type) = tuple_literal (%.loc13_12, %.loc13_15) +// CHECK:STDOUT: %.loc13_15: type = const_type %T [symbolic = constants.%.3] +// CHECK:STDOUT: %.loc13_22.1: %.4 = tuple_literal (%.loc13_12, %.loc13_15) // CHECK:STDOUT: %.loc13_22.2: type = converted %.loc13_22.1, constants.%.5 [symbolic = constants.%.5] -// CHECK:STDOUT: %u.var: ref (T*, const T) = var u -// CHECK:STDOUT: %u: ref (T*, const T) = bind_name u, %u.var +// CHECK:STDOUT: %u.var: ref %.5 = var u +// CHECK:STDOUT: %u: ref %.5 = bind_name u, %u.var // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc14: type = struct_type {.a: T} [symbolic = constants.%.8] -// CHECK:STDOUT: %v.var: ref {.a: T} = var v -// CHECK:STDOUT: %v: ref {.a: T} = bind_name v, %v.var +// CHECK:STDOUT: %.loc14: type = struct_type {.a: %T} [symbolic = constants.%.8] +// CHECK:STDOUT: %v.var: ref %.8 = var v +// CHECK:STDOUT: %v: ref %.8 = bind_name v, %v.var // CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %.loc15_14: i32 = int_literal 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, T [symbolic = constants.%.10] -// CHECK:STDOUT: %w.var: ref [T; 5] = var w -// CHECK:STDOUT: %w: ref [T; 5] = bind_name w, %w.var +// CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, %T [symbolic = constants.%.10] +// CHECK:STDOUT: %w.var: ref %.10 = var w +// CHECK:STDOUT: %w: ref %.10 = 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 e2a531a43a3b..bfbefa68ccb5 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -25,16 +25,16 @@ fn H() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,36 +46,36 @@ fn H() -> i32 { // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.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: (type, type) = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17) +// CHECK:STDOUT: %.loc11_20.1: %.2 = 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: @F.%return: ref (i32, i32) = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // 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: (type, type) = tuple_literal (%int.make_type_32.loc13_12, %int.make_type_32.loc13_17) +// CHECK:STDOUT: %.loc13_20.1: %.2 = 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: @G.%return: ref (i32, i32) = var +// CHECK:STDOUT: @G.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // 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] @@ -85,42 +85,42 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> (i32, i32); +// CHECK:STDOUT: fn @F() -> %.3; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G() -> %return: (i32, i32) { +// CHECK:STDOUT: fn @G() -> %return: %.3 { // 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: (type, type) = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16) +// CHECK:STDOUT: %.loc14_19.1: %.2 = 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 (i32, i32) = var v -// CHECK:STDOUT: %v: ref (i32, i32) = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_7: ref (i32, i32) = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc14: init (i32, i32) = call %F.ref.loc14() to %.loc14_7 +// CHECK:STDOUT: %v.var: ref %.3 = var v +// CHECK:STDOUT: %v: ref %.3 = 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: assign %v.var, %F.call.loc14 -// CHECK:STDOUT: %v.ref: ref (i32, i32) = name_ref v, %v -// CHECK:STDOUT: %F.ref.loc15: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc15: ref (i32, i32) = splice_block %v.ref {} -// CHECK:STDOUT: %F.call.loc15: init (i32, i32) = call %F.ref.loc15() to %.loc15 +// CHECK:STDOUT: %v.ref: ref %.3 = 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: assign %v.ref, %F.call.loc15 -// CHECK:STDOUT: %F.ref.loc16: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc13: ref (i32, i32) = splice_block %return {} -// CHECK:STDOUT: %F.call.loc16: init (i32, i32) = call %F.ref.loc16() to %.loc13 +// CHECK:STDOUT: %F.ref.loc16: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %.loc13: ref %.3 = splice_block %return {} +// CHECK:STDOUT: %F.call.loc16: init %.3 = call %F.ref.loc16() to %.loc13 // CHECK:STDOUT: return %F.call.loc16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc20_11.1: ref (i32, i32) = temporary_storage -// CHECK:STDOUT: %G.call: init (i32, i32) = call %G.ref() to %.loc20_11.1 +// 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_literal 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc20_11.2: ref (i32, i32) = temporary %.loc20_11.1, %G.call +// CHECK:STDOUT: %.loc20_11.2: ref %.3 = temporary %.loc20_11.1, %G.call // CHECK:STDOUT: %.loc20_15.1: ref i32 = tuple_index %.loc20_11.2, %.loc20_14 // CHECK:STDOUT: %.loc20_15.2: i32 = bind_value %.loc20_15.1 // CHECK:STDOUT: return %.loc20_15.2 diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 08db8a734571..b112f6035c73 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -17,14 +17,14 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,10 +34,10 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] @@ -53,17 +53,17 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_32.loc11_27, %.loc11_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.4] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32.loc13, %.loc13_11.1 [template = i32] // CHECK:STDOUT: %.loc13_25: type = array_type %int.sadd, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr -// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index 51e933cf4b09..ffee11dcb718 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -15,9 +15,9 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,10 +26,10 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index 2f58be33f59c..7cacfc05da75 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -42,13 +42,13 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,10 +59,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: .C = %C.decl.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl.loc11: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl.loc11: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] @@ -78,10 +78,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11_25, %.loc11_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc11: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl.loc19: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %int.make_type_32.loc19_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_32.loc19_9 [template = i32] // CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_32.loc19_9, %.loc19_9.1 [template = i32] @@ -97,10 +97,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl.loc21: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc21_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_9.1: type = value_of_initializer %int.make_type_32.loc21_9 [template = i32] // CHECK:STDOUT: %.loc21_9.2: type = converted %int.make_type_32.loc21_9, %.loc21_9.1 [template = i32] @@ -116,10 +116,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %.loc21_25.2: type = converted %int.make_type_32.loc21_25, %.loc21_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc21: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl.loc29: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc29_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_9.1: type = value_of_initializer %int.make_type_32.loc29_9 [template = i32] // CHECK:STDOUT: %.loc29_9.2: type = converted %int.make_type_32.loc29_9, %.loc29_9.1 [template = i32] @@ -135,10 +135,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %.loc29_25.2: type = converted %int.make_type_32.loc29_25, %.loc29_25.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl.loc31: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl.loc31: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %int.make_type_32.loc31_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_9.1: type = value_of_initializer %int.make_type_32.loc31_9 [template = i32] // CHECK:STDOUT: %.loc31_9.2: type = converted %int.make_type_32.loc31_9, %.loc31_9.1 [template = i32] @@ -154,10 +154,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %.loc31_25.2: type = converted %int.make_type_32.loc31_25, %.loc31_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc31: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl.loc38: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.16: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.17: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl.loc38: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %int.make_type_32.loc38_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_9.1: type = value_of_initializer %int.make_type_32.loc38_9 [template = i32] // CHECK:STDOUT: %.loc38_9.2: type = converted %int.make_type_32.loc38_9, %.loc38_9.1 [template = i32] diff --git a/toolchain/check/testdata/function/builtin/fail_unknown.carbon b/toolchain/check/testdata/function/builtin/fail_unknown.carbon index 52723285cfcc..c0177099e130 100644 --- a/toolchain/check/testdata/function/builtin/fail_unknown.carbon +++ b/toolchain/check/testdata/function/builtin/fail_unknown.carbon @@ -18,7 +18,7 @@ fn UnknownBuiltin() = "unknown.builtin.name"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %UnknownBuiltin.type: type = fn_type @UnknownBuiltin [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %UnknownBuiltin: = struct_value () [template] +// CHECK:STDOUT: %UnknownBuiltin: %UnknownBuiltin.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,7 +27,7 @@ fn UnknownBuiltin() = "unknown.builtin.name"; // CHECK:STDOUT: .UnknownBuiltin = %UnknownBuiltin.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %UnknownBuiltin.decl: = fn_decl @UnknownBuiltin [template = constants.%UnknownBuiltin] {} +// CHECK:STDOUT: %UnknownBuiltin.decl: %UnknownBuiltin.type = fn_decl @UnknownBuiltin [template = constants.%UnknownBuiltin] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UnknownBuiltin(); diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index eed2d452141f..b01348683e6f 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -22,23 +22,23 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: = bound_method %.6, %F.2 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %.9: i32 = int_literal 3 [template] // CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] -// CHECK:STDOUT: %.11: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,51 +49,51 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32.loc15, %.loc15_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc15: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %I.ref.loc19: type = name_ref I, %I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc12_40 [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12_40 [template = constants.%.4] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc19_17: = bound_method %.loc19_16, %.1 [template = constants.%.7] // CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.8] // CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17(%.loc19_16, %.loc19_24) [template = constants.%.9] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32] // CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.10] -// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr -// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var +// CHECK:STDOUT: %arr.var: ref %.10 = var arr +// CHECK:STDOUT: %arr: ref %.10 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %Self.ref.loc12_14: I = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc12_8.1: Self = param self -// CHECK:STDOUT: %self.loc12_8.2: Self = bind_name self, %self.loc12_8.1 -// CHECK:STDOUT: %Self.ref.loc12_27: I = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %self.loc12_8.1: %Self = param self +// CHECK:STDOUT: %self.loc12_8.2: %Self = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %Self.ref.loc12_27: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_27.1: type = facet_type_access %Self.ref.loc12_27 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %other.loc12_20.1: Self = param other -// CHECK:STDOUT: %other.loc12_20.2: Self = bind_name other, %other.loc12_20.1 -// CHECK:STDOUT: %Self.ref.loc12_36: I = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %other.loc12_20.1: %Self = param other +// CHECK:STDOUT: %other.loc12_20.2: %Self = bind_name other, %other.loc12_20.1 +// CHECK:STDOUT: %Self.ref.loc12_36: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_36.1: type = facet_type_access %Self.ref.loc12_36 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_40: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_40: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -101,8 +101,8 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: impl @impl: i32 as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %int.make_type_32.loc16_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_14.1: type = value_of_initializer %int.make_type_32.loc16_14 [template = i32] // CHECK:STDOUT: %.loc16_14.2: type = converted %int.make_type_32.loc16_14, %.loc16_14.1 [template = i32] @@ -125,7 +125,7 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[@I.%self.loc12_8.2: Self](@I.%other.loc12_20.2: Self) -> Self; +// CHECK:STDOUT: fn @F.1[@I.%self.loc12_8.2: %Self](@I.%other.loc12_20.2: %Self) -> %Self; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: 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 d7a5dcb7dc34..ea0441235359 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 @@ -35,13 +35,13 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] -// CHECK:STDOUT: %Op: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.4: in Add> = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %Op: %Op.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, %Op.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,31 +49,31 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: .Int32 = %Int32.decl // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Int32.decl: = fn_decl @Int32 [template = constants.%Int32] { +// CHECK:STDOUT: %Int32.decl: %Int32.type = fn_decl @Int32 [template = constants.%Int32] { // CHECK:STDOUT: @Int32.%return: ref type = var // CHECK:STDOUT: } // CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Op.decl: = fn_decl @Op [template = constants.%Op] { -// CHECK:STDOUT: %Self.ref.loc7_15: Add = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] { +// CHECK:STDOUT: %Self.ref.loc7_15: %.2 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_15.1: type = facet_type_access %Self.ref.loc7_15 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_15.2: type = converted %Self.ref.loc7_15, %.loc7_15.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc7_9.1: Self = param self -// CHECK:STDOUT: %self.loc7_9.2: Self = bind_name self, %self.loc7_9.1 -// CHECK:STDOUT: %Self.ref.loc7_28: Add = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %self.loc7_9.1: %Self = param self +// CHECK:STDOUT: %self.loc7_9.2: %Self = bind_name self, %self.loc7_9.1 +// CHECK:STDOUT: %Self.ref.loc7_28: %.2 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_28.1: type = facet_type_access %Self.ref.loc7_28 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_28.2: type = converted %Self.ref.loc7_28, %.loc7_28.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %other.loc7_21.1: Self = param other -// CHECK:STDOUT: %other.loc7_21.2: Self = bind_name other, %other.loc7_21.1 -// CHECK:STDOUT: %Self.ref.loc7_37: Add = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %other.loc7_21.1: %Self = param other +// CHECK:STDOUT: %other.loc7_21.2: %Self = bind_name other, %other.loc7_21.1 +// CHECK:STDOUT: %Self.ref.loc7_37: %.2 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_37.1: type = facet_type_access %Self.ref.loc7_37 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_37.2: type = converted %Self.ref.loc7_37, %.loc7_37.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_41: in Add> = assoc_entity element0, %Op.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc7_41: %.3 = assoc_entity element0, %Op.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -83,35 +83,35 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op[@Add.%self.loc7_9.2: Self](@Add.%other.loc7_21.2: Self) -> Self; +// CHECK:STDOUT: fn @Op[@Add.%self.loc7_9.2: %Self](@Add.%other.loc7_21.2: %Self) -> %Self; // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.7: in Add> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Add, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.8 [template] // CHECK:STDOUT: %.8: = bound_method %.4, %Op.1 [template] // CHECK:STDOUT: %.9: i32 = int_literal 3 [template] // CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] -// CHECK:STDOUT: %.11: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.11: type = ptr_type %.10 [template] // CHECK:STDOUT: %.12: i32 = int_literal 4 [template] // CHECK:STDOUT: %.13: = bound_method %.9, %Op.1 [template] // CHECK:STDOUT: %.14: i32 = int_literal 7 [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.16: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.9, %.12, %.14) [template] +// CHECK:STDOUT: %array: %.10 = tuple_value (%.9, %.12, %.14) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -120,11 +120,11 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir1, inst+2, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref ir1, inst+6, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+8, unloaded -// CHECK:STDOUT: %import_ref.4: in Add> = import_ref ir1, inst+28, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+24, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.4: %.6 = import_ref ir1, inst+28, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: %Op.type.2 = import_ref ir1, inst+24, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_6.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] @@ -132,20 +132,20 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Add.ref: type = name_ref Add, %import_ref.2 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+2, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir1, inst+2, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %import_ref.7: type = import_ref ir1, inst+6, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+24, unloaded -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc10_18: = bound_method %.loc10_16, %.1 [template = constants.%.8] // CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18(%.loc10_16, %.loc10_20) [template = constants.%.9] // CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_11.2: type = converted %int.make_type_32.loc10, %.loc10_11.1 [template = i32] // CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.10] -// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr -// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var +// CHECK:STDOUT: %arr.var: ref %.10 = var arr +// CHECK:STDOUT: %arr: ref %.10 = bind_name arr, %arr.var // CHECK:STDOUT: %import_ref.9: type = import_ref ir1, inst+6, loaded [template = constants.%.2] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -156,8 +156,8 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: witness = (file.%import_ref.5) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as Add { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl: i32 as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, i32 [template = i32] // CHECK:STDOUT: %self.loc7_9.1: i32 = param self // CHECK:STDOUT: %self.loc7_9.2: i32 = bind_name self, %self.loc7_9.1 @@ -178,7 +178,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[@impl.%self.loc7_9.2: i32](@impl.%other.loc7_21.2: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self](%other: %Self) -> %Self; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: @@ -186,10 +186,10 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.12] // CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.9] // CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.12] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc10_34: = bound_method %.loc10_32, %.1 [template = constants.%.13] // CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34(%.loc10_32, %.loc10_36) [template = constants.%.14] -// CHECK:STDOUT: %.loc10_37.1: (i32, i32, i32) = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) +// CHECK:STDOUT: %.loc10_37.1: %.15 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) // CHECK:STDOUT: %.loc10_37.2: i32 = int_literal 0 [template = constants.%.16] // CHECK:STDOUT: %.loc10_37.3: ref i32 = array_index file.%arr.var, %.loc10_37.2 // CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.9] @@ -199,8 +199,8 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %.loc10_37.8: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc10_37.9: ref i32 = array_index file.%arr.var, %.loc10_37.8 // CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.14] -// CHECK:STDOUT: %.loc10_37.11: init [i32; 3] = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc10_38: init [i32; 3] = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array] +// CHECK:STDOUT: %.loc10_37.11: init %.10 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc10_38: init %.10 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc10_38 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon index e1a1697b4b10..2aa751b59b69 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -26,9 +26,9 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] -// CHECK:STDOUT: %TestAdd: = struct_value () [template] +// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,10 +36,10 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: .Int32 = %Int32.decl // CHECK:STDOUT: .TestAdd = %TestAdd.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Int32.decl: = fn_decl @Int32 [template = constants.%Int32] { +// CHECK:STDOUT: %Int32.decl: %Int32.type = fn_decl @Int32 [template = constants.%Int32] { // CHECK:STDOUT: @Int32.%return: ref type = var // CHECK:STDOUT: } -// CHECK:STDOUT: %TestAdd.decl: = fn_decl @TestAdd [template = constants.%TestAdd] { +// CHECK:STDOUT: %TestAdd.decl: %TestAdd.type = fn_decl @TestAdd [template = constants.%TestAdd] { // CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5_15 [template = i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5_15, %.loc5_15.1 [template = i32] @@ -66,17 +66,17 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] -// CHECK:STDOUT: %TestAdd: = struct_value () [template] +// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] -// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.2, %.3, %.4) [template] +// CHECK:STDOUT: %array: %.5 = tuple_value (%.2, %.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,19 +85,19 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir1, inst+2, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+20, loaded [template = constants.%TestAdd] -// CHECK:STDOUT: %TestAdd.ref: = name_ref TestAdd, %import_ref.2 [template = constants.%TestAdd] +// CHECK:STDOUT: %import_ref.2: %TestAdd.type = import_ref ir1, inst+20, loaded [template = constants.%TestAdd] +// CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, %import_ref.2 [template = constants.%TestAdd] // CHECK:STDOUT: %.loc4_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.4] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %.loc4_34: type = array_type %int.sadd, i32 [template = constants.%.5] -// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr -// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var +// CHECK:STDOUT: %arr.var: ref %.5 = var arr +// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -109,7 +109,7 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: %.loc4_39: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_42: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc4_45: i32 = int_literal 3 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_46.1: (i32, i32, i32) = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45) +// CHECK:STDOUT: %.loc4_46.1: %.7 = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45) // CHECK:STDOUT: %.loc4_46.2: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc4_46.3: ref i32 = array_index file.%arr.var, %.loc4_46.2 // CHECK:STDOUT: %.loc4_46.4: init i32 = initialize_from %.loc4_39 to %.loc4_46.3 [template = constants.%.2] @@ -119,8 +119,8 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: %.loc4_46.8: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc4_46.9: ref i32 = array_index file.%arr.var, %.loc4_46.8 // CHECK:STDOUT: %.loc4_46.10: init i32 = initialize_from %.loc4_45 to %.loc4_46.9 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_46.11: init [i32; 3] = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc4_47: init [i32; 3] = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array] +// CHECK:STDOUT: %.loc4_46.11: init %.5 = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc4_47: init %.5 = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_47 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index e00d1a0cbb8e..e903f9405a05 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -20,9 +20,9 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type String [template] // CHECK:STDOUT: %.3: String = string_literal "hello" [template] // CHECK:STDOUT: } @@ -33,8 +33,8 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 80438599b181..a17d16206c71 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -69,15 +69,15 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run0: = struct_value () [template] +// CHECK:STDOUT: %Run0: %Run0.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Run1.type: type = fn_type @Run1 [template] -// CHECK:STDOUT: %Run1: = struct_value () [template] +// CHECK:STDOUT: %Run1: %Run1.type = struct_value () [template] // CHECK:STDOUT: %Run2.type: type = fn_type @Run2 [template] -// CHECK:STDOUT: %Run2: = struct_value () [template] +// CHECK:STDOUT: %Run2: %Run2.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -91,18 +91,18 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run0.decl: = fn_decl @Run0 [template = constants.%Run0] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run1.decl: = fn_decl @Run1 [template = constants.%Run1] { +// CHECK:STDOUT: %Run0.decl: %Run0.type = fn_decl @Run0 [template = constants.%Run0] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run1.decl: %Run1.type = fn_decl @Run1 [template = constants.%Run1] { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_12.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_12.2: type = converted %int.make_type_32.loc12, %.loc12_12.1 [template = i32] // CHECK:STDOUT: %a.loc12_9.1: i32 = param a // CHECK:STDOUT: @Run1.%a: i32 = bind_name a, %a.loc12_9.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run2.decl: = fn_decl @Run2 [template = constants.%Run2] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run2.decl: %Run2.type = fn_decl @Run2 [template = constants.%Run2] { // CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32.loc13_12 [template = i32] // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32.loc13_12, %.loc13_12.1 [template = i32] @@ -114,7 +114,7 @@ fn Main() { // CHECK:STDOUT: %b.loc13_17.1: i32 = param b // CHECK:STDOUT: @Run2.%b: i32 = bind_name b, %b.loc13_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run0() { @@ -136,24 +136,24 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Run0.ref.loc23: = name_ref Run0, file.%Run0.decl [template = constants.%Run0] +// CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Run0.call.loc23: init () = call %Run0.ref.loc23() [template = ] -// CHECK:STDOUT: %Run0.ref.loc31: = name_ref Run0, file.%Run0.decl [template = constants.%Run0] +// CHECK:STDOUT: %Run0.call.loc23: init %.1 = call %Run0.ref.loc23() [template = ] +// CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] // CHECK:STDOUT: %.loc31_8: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc31_11: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Run0.call.loc31: init () = call %Run0.ref.loc31() [template = ] -// CHECK:STDOUT: %Run1.ref.loc40: = name_ref Run1, file.%Run1.decl [template = constants.%Run1] -// CHECK:STDOUT: %Run1.call.loc40: init () = call %Run1.ref.loc40() [template = ] -// CHECK:STDOUT: %Run1.ref.loc48: = name_ref Run1, file.%Run1.decl [template = constants.%Run1] +// CHECK:STDOUT: %Run0.call.loc31: init %.1 = call %Run0.ref.loc31() [template = ] +// CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] +// CHECK:STDOUT: %Run1.call.loc40: init %.1 = call %Run1.ref.loc40() [template = ] +// CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] // CHECK:STDOUT: %.loc48_8: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc48_11: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Run1.call.loc48: init () = call %Run1.ref.loc48() [template = ] -// CHECK:STDOUT: %Run2.ref.loc57: = name_ref Run2, file.%Run2.decl [template = constants.%Run2] -// CHECK:STDOUT: %Run2.call.loc57: init () = call %Run2.ref.loc57() [template = ] -// CHECK:STDOUT: %Run2.ref.loc64: = name_ref Run2, file.%Run2.decl [template = constants.%Run2] +// CHECK:STDOUT: %Run1.call.loc48: init %.1 = call %Run1.ref.loc48() [template = ] +// CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] +// CHECK:STDOUT: %Run2.call.loc57: init %.1 = call %Run2.ref.loc57() [template = ] +// CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] // CHECK:STDOUT: %.loc64: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %Run2.call.loc64: init () = call %Run2.ref.loc64() [template = ] +// CHECK:STDOUT: %Run2.call.loc64: init %.1 = call %Run2.ref.loc64() [template = ] // 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 78202531003c..83024b4fd3bf 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -25,11 +25,11 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -40,15 +40,15 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %a.loc11_6.1: i32 = param a // CHECK:STDOUT: @G.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -60,9 +60,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc20: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %G.call: init () = call %G.ref() [template = ] +// CHECK:STDOUT: %G.call: init %.1 = call %G.ref() [template = ] // CHECK:STDOUT: return // 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 8a5053c8e147..7c10eda29fcd 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -23,14 +23,14 @@ fn Run() { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 1 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,16 +40,16 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64] // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64] // CHECK:STDOUT: @Foo.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Float(%size: i32) -> type = "float.make_type"; @@ -67,7 +67,7 @@ fn Run() { // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32, %.loc17_10.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref() // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 876fd9a92bdd..c6a897a298dc 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -21,11 +21,11 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] -// CHECK:STDOUT: %Echo: = struct_value () [template] +// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,9 +36,9 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Echo.decl: = fn_decl @Echo [template = constants.%Echo] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { // CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11_12, %.loc11_12.1 [template = i32] @@ -49,8 +49,8 @@ fn Main() { // CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_32.loc11_20, %.loc11_20.1 [template = i32] // CHECK:STDOUT: @Echo.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -68,7 +68,7 @@ fn Main() { // CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %Echo.ref: = name_ref Echo, file.%Echo.decl [template = constants.%Echo] +// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] // CHECK:STDOUT: %.loc16_21: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Echo.call: init i32 = call %Echo.ref(%.loc16_21) // CHECK:STDOUT: assign %b.var, %Echo.call diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index a954a54d52be..61355b0e80d1 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -21,15 +21,15 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] // CHECK:STDOUT: } @@ -41,9 +41,9 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] @@ -55,8 +55,8 @@ fn Main() { // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -69,24 +69,24 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_15.1: (type,) = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc14_15.1: %.2 = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_32, %.loc14_15.2 [template = i32] // CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref (i32,) = var x -// CHECK:STDOUT: %x: ref (i32,) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var // CHECK:STDOUT: %.loc14_20: i32 = int_literal 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_22.1: (i32,) = tuple_literal (%.loc14_20) -// CHECK:STDOUT: %.loc14_22.2: init (i32,) = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_23: init (i32,) = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_22.1: %.3 = tuple_literal (%.loc14_20) +// CHECK:STDOUT: %.loc14_22.2: init %.3 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_23: init %.3 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple] // CHECK:STDOUT: assign %x.var, %.loc14_23 -// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %x.ref: ref (i32,) = name_ref x, %x +// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, %x // CHECK:STDOUT: %.loc16_9: i32 = int_literal 0 [template = constants.%.5] // CHECK:STDOUT: %.loc16_10.1: ref i32 = tuple_index %x.ref, %.loc16_9 // CHECK:STDOUT: %.loc16_13: i32 = int_literal 6 [template = constants.%.6] // CHECK:STDOUT: %.loc16_10.2: i32 = bind_value %.loc16_10.1 -// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc16_10.2, %.loc16_13) +// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc16_10.2, %.loc16_13) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/alias.carbon b/toolchain/check/testdata/function/call/no_prelude/alias.carbon index 8e5cd22b67c6..17513298f59f 100644 --- a/toolchain/check/testdata/function/call/no_prelude/alias.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/alias.carbon @@ -21,10 +21,10 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,32 +33,32 @@ fn Main() { // CHECK:STDOUT: .B = %B // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { -// CHECK:STDOUT: %.loc11_12.1: () = tuple_literal () +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %.loc11_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @A.%return: ref () = var +// CHECK:STDOUT: @A.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %A.ref: = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %B: = bind_alias B, %A.decl [template = constants.%A] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A] +// CHECK:STDOUT: %B: %A.type = bind_alias B, %A.decl [template = constants.%A] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @A() -> () { +// CHECK:STDOUT: fn @A() -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_24: () = tuple_literal () -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_25: () = converted %.loc11_24, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_24: %.1 = tuple_literal () +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] +// CHECK:STDOUT: %.loc11_25: %.1 = converted %.loc11_24, %tuple [template = constants.%tuple] // CHECK:STDOUT: return %.loc11_25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_11.1: () = tuple_literal () +// CHECK:STDOUT: %.loc16_11.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %B.ref() +// CHECK:STDOUT: %b.var: ref %.1 = var b +// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %B.ref: %A.type = name_ref B, file.%B [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %B.ref() // CHECK:STDOUT: assign %b.var, %A.call // CHECK:STDOUT: return // CHECK:STDOUT: } 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 13827e5fab59..c028fcf2e77c 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon @@ -22,10 +22,10 @@ fn Main() { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Echo: = struct_value () [template] +// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %struct: {} = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,31 +33,31 @@ fn Main() { // CHECK:STDOUT: .Echo = %Echo.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Echo.decl: = fn_decl @Echo [template = constants.%Echo] { -// CHECK:STDOUT: %.loc11_13.1: {} = struct_literal () +// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { +// CHECK:STDOUT: %.loc11_13.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.loc11_9.1: {} = param a -// CHECK:STDOUT: @Echo.%a: {} = bind_name a, %a.loc11_9.1 -// CHECK:STDOUT: %.loc11_20.1: {} = struct_literal () +// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a +// CHECK:STDOUT: @Echo.%a: %.1 = bind_name a, %a.loc11_9.1 +// CHECK:STDOUT: %.loc11_20.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @Echo.%return: ref {} = var +// CHECK:STDOUT: @Echo.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Echo(%a: {}) -> {} { +// CHECK:STDOUT: fn @Echo(%a: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: {} = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a // CHECK:STDOUT: return %a.ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Echo.ref: = name_ref Echo, file.%Echo.decl [template = constants.%Echo] -// CHECK:STDOUT: %.loc16_9: {} = struct_literal () -// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc16_7: {} = converted %.loc16_9, %struct [template = constants.%struct] -// CHECK:STDOUT: %Echo.call: init {} = call %Echo.ref(%.loc16_7) +// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] +// CHECK:STDOUT: %.loc16_9: %.1 = struct_literal () +// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc16_7: %.1 = converted %.loc16_9, %struct [template = constants.%struct] +// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 31391d20bb16..e9618a02b4d4 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon @@ -21,10 +21,10 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] -// CHECK:STDOUT: %Echo: = struct_value () [template] +// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,31 +32,31 @@ fn Main() { // CHECK:STDOUT: .Echo = %Echo.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Echo.decl: = fn_decl @Echo [template = constants.%Echo] { -// CHECK:STDOUT: %.loc11_13.1: () = tuple_literal () +// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { +// CHECK:STDOUT: %.loc11_13.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.loc11_9.1: () = param a -// CHECK:STDOUT: @Echo.%a: () = bind_name a, %a.loc11_9.1 -// CHECK:STDOUT: %.loc11_20.1: () = tuple_literal () +// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a +// CHECK:STDOUT: @Echo.%a: %.1 = bind_name a, %a.loc11_9.1 +// CHECK:STDOUT: %.loc11_20.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @Echo.%return: ref () = var +// CHECK:STDOUT: @Echo.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Echo(%a: ()) -> () { +// CHECK:STDOUT: fn @Echo(%a: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: () = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a // CHECK:STDOUT: return %a.ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Echo.ref: = name_ref Echo, file.%Echo.decl [template = constants.%Echo] -// CHECK:STDOUT: %.loc16_9: () = tuple_literal () -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_7: () = converted %.loc16_9, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %Echo.call: init () = call %Echo.ref(%.loc16_7) +// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] +// CHECK:STDOUT: %.loc16_9: %.1 = tuple_literal () +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] +// CHECK:STDOUT: %.loc16_7: %.1 = converted %.loc16_9, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 a82e557b09aa..9dc2240af600 100644 --- a/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon @@ -19,9 +19,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,8 +29,8 @@ fn Main() { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { @@ -40,8 +40,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref() +// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 b779381041a7..daab15b1412a 100644 --- a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon @@ -20,9 +20,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %MakeImplicitEmptyTuple.type: type = fn_type @MakeImplicitEmptyTuple [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %MakeImplicitEmptyTuple: = struct_value () [template] +// CHECK:STDOUT: %MakeImplicitEmptyTuple: %MakeImplicitEmptyTuple.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,8 +30,8 @@ fn Main() { // CHECK:STDOUT: .MakeImplicitEmptyTuple = %MakeImplicitEmptyTuple.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %MakeImplicitEmptyTuple.decl: = fn_decl @MakeImplicitEmptyTuple [template = constants.%MakeImplicitEmptyTuple] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %MakeImplicitEmptyTuple.decl: %MakeImplicitEmptyTuple.type = fn_decl @MakeImplicitEmptyTuple [template = constants.%MakeImplicitEmptyTuple] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeImplicitEmptyTuple() { @@ -41,12 +41,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: () = tuple_literal () +// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple] -// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init () = call %MakeImplicitEmptyTuple.ref() +// CHECK:STDOUT: %b.var: ref %.1 = var b +// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var +// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: %MakeImplicitEmptyTuple.type = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple] +// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init %.1 = call %MakeImplicitEmptyTuple.ref() // CHECK:STDOUT: assign %b.var, %MakeImplicitEmptyTuple.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 3d567514a7f1..64d5cc0fca08 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -19,11 +19,11 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -34,15 +34,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -54,9 +54,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc14) +// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 39cdf95a47ec..ea5f6832b1ec 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -20,11 +20,11 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,15 +35,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -55,12 +55,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref.loc14: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Foo.call.loc14: init () = call %Foo.ref.loc14(%.loc14) -// CHECK:STDOUT: %Foo.ref.loc15: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14) +// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc15: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Foo.call.loc15: init () = call %Foo.ref.loc15(%.loc15) +// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 8bbb396a5544..0c12197c001e 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -19,11 +19,11 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -35,9 +35,9 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] @@ -49,7 +49,7 @@ fn Main() { // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -61,10 +61,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc14_7, %.loc14_10) +// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14_7, %.loc14_10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 827b57141218..a19a63938d3c 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -20,11 +20,11 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -36,9 +36,9 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] @@ -50,7 +50,7 @@ fn Main() { // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -62,14 +62,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref.loc14: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %Foo.call.loc14: init () = call %Foo.ref.loc14(%.loc14_7, %.loc14_10) -// CHECK:STDOUT: %Foo.ref.loc15: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] +// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14_7, %.loc14_10) +// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc15_7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc15_10: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %Foo.call.loc15: init () = call %Foo.ref.loc15(%.loc15_7, %.loc15_10) +// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15_7, %.loc15_10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 eef8d30af78a..dff9468de87e 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -18,9 +18,9 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,9 +29,9 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14_9, %.loc14_9.1 [template = i32] diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index a243a74b4112..134c9ab1dd55 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -21,9 +21,9 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,9 +32,9 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32] // CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_32.loc17_9, %.loc17_9.1 [template = i32] diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index c471ceff0509..cee086ae1aa1 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -372,20 +372,20 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -398,10 +398,10 @@ import library "extern_api"; // CHECK:STDOUT: .NS = %NS // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32] // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32] @@ -412,27 +412,27 @@ import library "extern_api"; // CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_14.1: (type,) = tuple_literal (%int.make_type_32.loc6_10) +// CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc6_6.1: (i32,) = param c -// CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_6.1 +// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c +// CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_6.1 // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32] // CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: @C.%return: ref {.c: i32} = var +// CHECK:STDOUT: @C.%return: ref %.4 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} +// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -441,7 +441,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: fn @C(%c: %.3) -> %.4; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -452,20 +452,20 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -478,10 +478,10 @@ import library "extern_api"; // CHECK:STDOUT: .NS = %NS // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc5_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_16.1: type = value_of_initializer %int.make_type_32.loc5_16 [template = i32] // CHECK:STDOUT: %.loc5_16.2: type = converted %int.make_type_32.loc5_16, %.loc5_16.1 [template = i32] @@ -492,27 +492,27 @@ import library "extern_api"; // CHECK:STDOUT: %.loc5_24.2: type = converted %int.make_type_32.loc5_24, %.loc5_24.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %int.make_type_32.loc6_17: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_21.1: (type,) = tuple_literal (%int.make_type_32.loc6_17) +// CHECK:STDOUT: %.loc6_21.1: %.2 = tuple_literal (%int.make_type_32.loc6_17) // CHECK:STDOUT: %.loc6_21.2: type = value_of_initializer %int.make_type_32.loc6_17 [template = i32] // CHECK:STDOUT: %.loc6_21.3: type = converted %int.make_type_32.loc6_17, %.loc6_21.2 [template = i32] // CHECK:STDOUT: %.loc6_21.4: type = converted %.loc6_21.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc6_13.1: (i32,) = param c -// CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_13.1 +// CHECK:STDOUT: %c.loc6_13.1: %.3 = param c +// CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_13.1 // 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] // CHECK:STDOUT: %.loc6_32.2: type = converted %int.make_type_32.loc6_32, %.loc6_32.1 [template = i32] // CHECK:STDOUT: %.loc6_35: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: @C.%return: ref {.c: i32} = var +// CHECK:STDOUT: @C.%return: ref %.4 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} +// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -521,7 +521,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -532,21 +532,21 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -563,41 +563,41 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %import_ref.6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] +// CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] // CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref {.c: i32} = var c -// CHECK:STDOUT: %c: ref {.c: i32} = bind_name c, %c.var -// CHECK:STDOUT: %.loc9_9.1: () = tuple_literal () +// 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 () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal () +// 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 () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -606,7 +606,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: fn @C(%c: %.4) -> %.3; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -614,26 +614,26 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25: (i32,) = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc8_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_21: (i32,) = converted %.loc8_25, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc8_21) +// CHECK:STDOUT: %.loc8_25: %.4 = tuple_literal (%.loc8_23) +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_21: %.4 = converted %.loc8_25, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init () = call %D.ref() +// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D] +// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: = name_ref E, file.%import_ref.6 [template = constants.%E] -// CHECK:STDOUT: %E.call: init () = call %E.ref() +// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%import_ref.6 [template = constants.%E] +// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -643,22 +643,22 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.5) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -675,20 +675,20 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] +// CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32] @@ -699,49 +699,49 @@ import library "extern_api"; // CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32] // CHECK:STDOUT: %return.var.loc7: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.10: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// 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: (type,) = tuple_literal (%int.make_type_32.loc8_17) +// CHECK:STDOUT: %.loc8_21.1: %.2 = 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: %c.loc8_13.1: (i32,) = param c -// CHECK:STDOUT: %c.loc8_13.2: (i32,) = bind_name c, %c.loc8_13.1 +// CHECK:STDOUT: %c.loc8_13.1: %.3 = param c +// CHECK:STDOUT: %c.loc8_13.2: %.3 = bind_name c, %c.loc8_13.1 // 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: %return.var.loc8: ref {.c: i32} = var +// CHECK:STDOUT: %return.var.loc8: ref %.4 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} -// CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.11: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b.loc13: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.12: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // 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 {.c: i32} = var c -// CHECK:STDOUT: %c.loc14: ref {.c: i32} = bind_name c, %c.var -// CHECK:STDOUT: %.loc15_9.1: () = tuple_literal () +// CHECK:STDOUT: %c.var: ref %.4 = var c +// CHECK:STDOUT: %c.loc14: 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 () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc16_9.1: () = tuple_literal () +// 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 () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -750,7 +750,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -758,26 +758,26 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// 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: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: (i32,) = tuple_literal (%.loc14_23) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc14_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21: (i32,) = converted %.loc14_25, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc14_21) +// CHECK:STDOUT: %.loc14_25: %.3 = tuple_literal (%.loc14_23) +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_21: %.3 = converted %.loc14_25, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.call: init () = call %D.ref() +// 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: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: = name_ref E, file.%E.decl [template = constants.%E] -// CHECK:STDOUT: %E.call: init () = call %E.ref() +// 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: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -787,22 +787,22 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.5) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -819,20 +819,20 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] +// CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32] @@ -843,49 +843,49 @@ import library "extern_api"; // CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32] // CHECK:STDOUT: %return.var.loc7: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.10: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// 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: (type,) = tuple_literal (%int.make_type_32.loc8_17) +// CHECK:STDOUT: %.loc8_21.1: %.2 = 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: %c.loc8_13.1: (i32,) = param c -// CHECK:STDOUT: %c.loc8_13.2: (i32,) = bind_name c, %c.loc8_13.1 +// CHECK:STDOUT: %c.loc8_13.1: %.3 = param c +// CHECK:STDOUT: %c.loc8_13.2: %.3 = bind_name c, %c.loc8_13.1 // 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: %return.var.loc8: ref {.c: i32} = var +// CHECK:STDOUT: %return.var.loc8: ref %.4 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} -// CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.11: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b.loc13: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.12: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // 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 {.c: i32} = var c -// CHECK:STDOUT: %c.loc14: ref {.c: i32} = bind_name c, %c.var -// CHECK:STDOUT: %.loc15_9.1: () = tuple_literal () +// CHECK:STDOUT: %c.var: ref %.4 = var c +// CHECK:STDOUT: %c.loc14: 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 () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc16_9.1: () = tuple_literal () +// 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 () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -894,7 +894,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -902,26 +902,26 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// 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: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: (i32,) = tuple_literal (%.loc14_23) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc14_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21: (i32,) = converted %.loc14_25, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc14_21) +// CHECK:STDOUT: %.loc14_25: %.3 = tuple_literal (%.loc14_23) +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc14_21: %.3 = converted %.loc14_25, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.call: init () = call %D.ref() +// 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: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: = name_ref E, file.%E.decl [template = constants.%E] -// CHECK:STDOUT: %E.call: init () = call %E.ref() +// 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: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -931,21 +931,21 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -962,46 +962,46 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %import_ref.6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] +// CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir2, inst+46, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref ir2, inst+50, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc72_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc72_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc72_9.2: type = converted %.loc72_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.12: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc73_8.1: type = value_of_initializer %int.make_type_32.loc73 [template = i32] // CHECK:STDOUT: %.loc73_8.2: type = converted %int.make_type_32.loc73, %.loc73_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.13: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc74_13.1: type = value_of_initializer %int.make_type_32.loc74 [template = i32] // CHECK:STDOUT: %.loc74_13.2: type = converted %int.make_type_32.loc74, %.loc74_13.1 [template = i32] // CHECK:STDOUT: %.loc74_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref {.c: i32} = var c -// CHECK:STDOUT: %c: ref {.c: i32} = bind_name c, %c.var -// CHECK:STDOUT: %.loc75_9.1: () = tuple_literal () +// CHECK:STDOUT: %c.var: ref %.3 = var c +// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var +// CHECK:STDOUT: %.loc75_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc75_9.2: type = converted %.loc75_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc76_9.1: () = tuple_literal () +// CHECK:STDOUT: %d.var: ref %.1 = var d +// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var +// CHECK:STDOUT: %.loc76_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc76_9.2: type = converted %.loc76_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -1010,7 +1010,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: fn @C(%c: %.4) -> %.3; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1018,26 +1018,26 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc73: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc73) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc74_23: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc74_25: (i32,) = tuple_literal (%.loc74_23) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc74_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc74_21: (i32,) = converted %.loc74_25, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc74_21) +// CHECK:STDOUT: %.loc74_25: %.4 = tuple_literal (%.loc74_23) +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc74_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc74_21: %.4 = converted %.loc74_25, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc74_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init () = call %D.ref() +// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D] +// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: = name_ref E, file.%import_ref.6 [template = constants.%E] -// CHECK:STDOUT: %E.call: init () = call %E.ref() +// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%import_ref.6 [template = constants.%E] +// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1047,21 +1047,21 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1078,46 +1078,46 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %import_ref.6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] +// CHECK:STDOUT: %import_ref.6: %E.type = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir2, inst+46, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref ir2, inst+50, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc72_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc72_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc72_9.2: type = converted %.loc72_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.12: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc73_8.1: type = value_of_initializer %int.make_type_32.loc73 [template = i32] // CHECK:STDOUT: %.loc73_8.2: type = converted %int.make_type_32.loc73, %.loc73_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.13: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir5, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc74_13.1: type = value_of_initializer %int.make_type_32.loc74 [template = i32] // CHECK:STDOUT: %.loc74_13.2: type = converted %int.make_type_32.loc74, %.loc74_13.1 [template = i32] // CHECK:STDOUT: %.loc74_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref {.c: i32} = var c -// CHECK:STDOUT: %c: ref {.c: i32} = bind_name c, %c.var -// CHECK:STDOUT: %.loc75_9.1: () = tuple_literal () +// CHECK:STDOUT: %c.var: ref %.3 = var c +// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var +// CHECK:STDOUT: %.loc75_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc75_9.2: type = converted %.loc75_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %d.var: ref () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc76_9.1: () = tuple_literal () +// CHECK:STDOUT: %d.var: ref %.1 = var d +// CHECK:STDOUT: %d: ref %.1 = bind_name d, %d.var +// CHECK:STDOUT: %.loc76_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc76_9.2: type = converted %.loc76_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %e.var: ref () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -1126,7 +1126,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: extern fn @C(%c: %.4) -> %.3; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1134,26 +1134,26 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc73: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc73) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc74_23: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc74_25: (i32,) = tuple_literal (%.loc74_23) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc74_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc74_21: (i32,) = converted %.loc74_25, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc74_21) +// CHECK:STDOUT: %.loc74_25: %.4 = tuple_literal (%.loc74_23) +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc74_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc74_21: %.4 = converted %.loc74_25, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc74_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init () = call %D.ref() +// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D] +// CHECK:STDOUT: %D.call: init %.1 = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: = name_ref E, file.%import_ref.6 [template = constants.%E] -// CHECK:STDOUT: %E.call: init () = call %E.ref() +// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%import_ref.6 [template = constants.%E] +// CHECK:STDOUT: %E.call: init %.1 = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1163,7 +1163,7 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1176,7 +1176,7 @@ import library "extern_api"; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded @@ -1186,19 +1186,19 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1208,11 +1208,11 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1225,7 +1225,7 @@ import library "extern_api"; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded @@ -1235,12 +1235,12 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_32, %.loc18_11.1 [template = i32] @@ -1256,8 +1256,8 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1267,7 +1267,7 @@ import library "extern_api"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1280,7 +1280,7 @@ import library "extern_api"; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded @@ -1290,19 +1290,19 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+50, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: 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 a0b016f2b300..0dbdb52f1667 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon @@ -43,14 +43,14 @@ var f: () = F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -60,15 +60,15 @@ var f: () = F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+1, loaded [template = constants.%F] -// CHECK:STDOUT: %F: = export F, %import_ref [template = constants.%F] +// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %F: %F.type = export F, %import_ref [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -78,7 +78,7 @@ var f: () = F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -86,19 +86,19 @@ var f: () = F(); // CHECK:STDOUT: .F = %import_ref // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+6, loaded [template = constants.%F] -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+6, loaded [template = constants.%F] +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: assign file.%f.var, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index 29f2653c1c96..6e4e7b6b204d 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -61,14 +61,14 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -78,15 +78,15 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -96,15 +96,15 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -115,9 +115,9 @@ class C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -129,11 +129,11 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc11_15.1: C = param self -// CHECK:STDOUT: %self.loc11_15.2: C = bind_name self, %self.loc11_15.1 +// CHECK:STDOUT: %self.loc11_15.1: %C = param self +// CHECK:STDOUT: %self.loc11_15.2: %C = bind_name self, %self.loc11_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -144,5 +144,5 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[@C.%self.loc11_15.2: C](); +// CHECK:STDOUT: fn @G[@C.%self.loc11_15.2: %C](); // CHECK:STDOUT: 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 7dcc1b0e7b25..7476aa410e0e 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 @@ -82,15 +82,15 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %ReturnCUnused: = struct_value () [template] +// CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template] // CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template] -// CHECK:STDOUT: %ReturnCUsed: = struct_value () [template] +// CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template] // CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template] -// CHECK:STDOUT: %ReturnDUnused: = struct_value () [template] +// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template] // CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template] -// CHECK:STDOUT: %ReturnDUsed: = struct_value () [template] +// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] -// CHECK:STDOUT: %Call: = struct_value () [template] +// CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,23 +106,23 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %D.decl.loc5: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %ReturnCUnused.decl: = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] { +// CHECK:STDOUT: %ReturnCUnused.decl: %ReturnCUnused.type = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @ReturnCUnused.%return: ref C = var +// CHECK:STDOUT: @ReturnCUnused.%return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnCUsed.decl: = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] { +// CHECK:STDOUT: %ReturnCUsed.decl: %ReturnCUsed.type = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] { // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @ReturnCUsed.%return: ref C = var +// CHECK:STDOUT: @ReturnCUsed.%return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnDUnused.decl: = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] { +// CHECK:STDOUT: %ReturnDUnused.decl: %ReturnDUnused.type = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] { // CHECK:STDOUT: %D.ref.loc9: type = name_ref D, %D.decl.loc5 [template = constants.%D] -// CHECK:STDOUT: @ReturnDUnused.%return: ref D = var +// CHECK:STDOUT: @ReturnDUnused.%return: ref %D = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnDUsed.decl: = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] { +// CHECK:STDOUT: %ReturnDUsed.decl: %ReturnDUsed.type = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] { // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D.decl.loc5 [template = constants.%D] -// CHECK:STDOUT: @ReturnDUsed.%return: ref D = var +// CHECK:STDOUT: @ReturnDUsed.%return: ref %D = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] {} +// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] {} // CHECK:STDOUT: %D.decl.loc37: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -133,19 +133,19 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnCUnused() -> C; +// CHECK:STDOUT: fn @ReturnCUnused() -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnCUsed() -> C; +// CHECK:STDOUT: fn @ReturnCUsed() -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnDUnused() -> D; +// CHECK:STDOUT: fn @ReturnDUnused() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnDUsed() -> D; +// CHECK:STDOUT: fn @ReturnDUsed() -> %D; // CHECK:STDOUT: // CHECK:STDOUT: fn @Call() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ReturnCUsed.ref: = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed] +// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed] // CHECK:STDOUT: %ReturnCUsed.call: init = call %ReturnCUsed.ref() -// CHECK:STDOUT: %ReturnDUsed.ref: = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed] +// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed] // CHECK:STDOUT: %ReturnDUsed.call: init = call %ReturnDUsed.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -155,19 +155,19 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %CallFAndGIncomplete.type: type = fn_type @CallFAndGIncomplete [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %CallFAndGIncomplete: = struct_value () [template] +// CHECK:STDOUT: %CallFAndGIncomplete: %CallFAndGIncomplete.type = struct_value () [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template] -// CHECK:STDOUT: %ReturnCUnused: = struct_value () [template] +// CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template] // CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template] -// CHECK:STDOUT: %ReturnCUsed: = struct_value () [template] +// CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template] -// CHECK:STDOUT: %ReturnDUnused: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template] -// CHECK:STDOUT: %ReturnDUsed: = struct_value () [template] +// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,12 +183,12 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+1, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused] -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed] -// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused] -// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed] +// CHECK:STDOUT: %import_ref.3: %ReturnCUnused.type = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused] +// CHECK:STDOUT: %import_ref.4: %ReturnCUsed.type = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed] +// CHECK:STDOUT: %import_ref.5: %ReturnDUnused.type = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused] +// CHECK:STDOUT: %import_ref.6: %ReturnDUsed.type = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed] // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+26, unloaded -// CHECK:STDOUT: %CallFAndGIncomplete.decl: = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {} +// CHECK:STDOUT: %CallFAndGIncomplete.decl: %CallFAndGIncomplete.type = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {} // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -201,24 +201,24 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallFAndGIncomplete() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ReturnCUnused.ref: = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused] +// CHECK:STDOUT: %ReturnCUnused.ref: %ReturnCUnused.type = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused] // CHECK:STDOUT: %ReturnCUnused.call: init = call %ReturnCUnused.ref() -// CHECK:STDOUT: %ReturnCUsed.ref: = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed] +// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed] // CHECK:STDOUT: %ReturnCUsed.call: init = call %ReturnCUsed.ref() -// CHECK:STDOUT: %ReturnDUnused.ref: = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused] -// CHECK:STDOUT: %.loc24_16.1: ref D = temporary_storage -// CHECK:STDOUT: %ReturnDUnused.call: init D = call %ReturnDUnused.ref() to %.loc24_16.1 -// CHECK:STDOUT: %.loc24_16.2: ref D = temporary %.loc24_16.1, %ReturnDUnused.call -// CHECK:STDOUT: %ReturnDUsed.ref: = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed] +// CHECK:STDOUT: %ReturnDUnused.ref: %ReturnDUnused.type = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused] +// CHECK:STDOUT: %.loc24_16.1: ref %D = temporary_storage +// CHECK:STDOUT: %ReturnDUnused.call: init %D = call %ReturnDUnused.ref() to %.loc24_16.1 +// CHECK:STDOUT: %.loc24_16.2: ref %D = temporary %.loc24_16.1, %ReturnDUnused.call +// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed] // CHECK:STDOUT: %ReturnDUsed.call: init = call %ReturnDUsed.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnCUnused() -> C; +// CHECK:STDOUT: fn @ReturnCUnused() -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnCUsed() -> C; +// CHECK:STDOUT: fn @ReturnCUsed() -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnDUnused() -> D; +// CHECK:STDOUT: fn @ReturnDUnused() -> %D; // CHECK:STDOUT: -// CHECK:STDOUT: fn @ReturnDUsed() -> D; +// CHECK:STDOUT: fn @ReturnDUsed() -> %D; // CHECK:STDOUT: 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 61b1fafcfa3a..448e4ccde71c 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon @@ -99,19 +99,19 @@ extern private fn ExternOrderAndConflict() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %WrongOrder.type: type = fn_type @WrongOrder [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %WrongOrder: = struct_value () [template] +// CHECK:STDOUT: %WrongOrder: %WrongOrder.type = struct_value () [template] // CHECK:STDOUT: %DuplicateVirtual.type: type = fn_type @DuplicateVirtual [template] -// CHECK:STDOUT: %DuplicateVirtual: = struct_value () [template] +// CHECK:STDOUT: %DuplicateVirtual: %DuplicateVirtual.type = struct_value () [template] // CHECK:STDOUT: %TwoAccess.type: type = fn_type @TwoAccess [template] -// CHECK:STDOUT: %TwoAccess: = struct_value () [template] +// CHECK:STDOUT: %TwoAccess: %TwoAccess.type = struct_value () [template] // CHECK:STDOUT: %ModifiersConflict.type: type = fn_type @ModifiersConflict [template] -// CHECK:STDOUT: %ModifiersConflict: = struct_value () [template] +// CHECK:STDOUT: %ModifiersConflict: %ModifiersConflict.type = struct_value () [template] // CHECK:STDOUT: %InvalidModifier.type: type = fn_type @InvalidModifier [template] -// CHECK:STDOUT: %InvalidModifier: = struct_value () [template] +// CHECK:STDOUT: %InvalidModifier: %InvalidModifier.type = struct_value () [template] // CHECK:STDOUT: %ModifiersConflict2.type: type = fn_type @ModifiersConflict2 [template] -// CHECK:STDOUT: %ModifiersConflict2: = struct_value () [template] +// CHECK:STDOUT: %ModifiersConflict2: %ModifiersConflict2.type = struct_value () [template] // CHECK:STDOUT: %ExternOrderAndConflict.type: type = fn_type @ExternOrderAndConflict [template] -// CHECK:STDOUT: %ExternOrderAndConflict: = struct_value () [template] +// CHECK:STDOUT: %ExternOrderAndConflict: %ExternOrderAndConflict.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -124,13 +124,13 @@ extern private fn ExternOrderAndConflict() {} // CHECK:STDOUT: .ModifiersConflict2 = %ModifiersConflict2.decl // CHECK:STDOUT: .ExternOrderAndConflict = %ExternOrderAndConflict.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %WrongOrder.decl: = fn_decl @WrongOrder [template = constants.%WrongOrder] {} -// CHECK:STDOUT: %DuplicateVirtual.decl: = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {} -// CHECK:STDOUT: %TwoAccess.decl: = fn_decl @TwoAccess [template = constants.%TwoAccess] {} -// CHECK:STDOUT: %ModifiersConflict.decl: = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {} -// CHECK:STDOUT: %InvalidModifier.decl: = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {} -// CHECK:STDOUT: %ModifiersConflict2.decl: = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {} -// CHECK:STDOUT: %ExternOrderAndConflict.decl: = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {} +// CHECK:STDOUT: %WrongOrder.decl: %WrongOrder.type = fn_decl @WrongOrder [template = constants.%WrongOrder] {} +// CHECK:STDOUT: %DuplicateVirtual.decl: %DuplicateVirtual.type = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {} +// CHECK:STDOUT: %TwoAccess.decl: %TwoAccess.type = fn_decl @TwoAccess [template = constants.%TwoAccess] {} +// CHECK:STDOUT: %ModifiersConflict.decl: %ModifiersConflict.type = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {} +// CHECK:STDOUT: %InvalidModifier.decl: %InvalidModifier.type = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {} +// CHECK:STDOUT: %ModifiersConflict2.decl: %ModifiersConflict2.type = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {} +// CHECK:STDOUT: %ExternOrderAndConflict.decl: %ExternOrderAndConflict.type = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @WrongOrder(); 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 b93f4e3997a8..ef488e64ff51 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon @@ -62,17 +62,17 @@ fn E() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,40 +83,40 @@ fn E() {} // CHECK:STDOUT: .D = %D.decl.loc41 // CHECK:STDOUT: .E = %E.decl.loc51 // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl.loc11: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %A.decl.loc19: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %B.decl.loc21: = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %.loc21_10.1: () = tuple_literal () +// CHECK:STDOUT: %A.decl.loc11: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc21_6.1: () = param x -// CHECK:STDOUT: @B.%x: () = bind_name x, %x.loc21_6.1 +// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x +// CHECK:STDOUT: @B.%x: %.1 = bind_name x, %x.loc21_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl.loc29: = fn_decl @B [template = constants.%B] { -// CHECK:STDOUT: %.loc29_10.1: () = tuple_literal () +// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %.loc29_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc29_6.1: () = param x -// CHECK:STDOUT: %x.loc29_6.2: () = bind_name x, %x.loc29_6.1 +// CHECK:STDOUT: %x.loc29_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc29_6.2: %.1 = bind_name x, %x.loc29_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %.loc39_10.1: () = tuple_literal () +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.loc39_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc39_6.1: () = param x -// CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc39_6.1 +// CHECK:STDOUT: %x.loc39_6.1: %.1 = param x +// CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc39_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl.loc41: = fn_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %D.decl.loc49: = fn_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %E.decl.loc51: = fn_decl @E [template = constants.%E] {} -// CHECK:STDOUT: %E.decl.loc58: = fn_decl @E [template = constants.%E] {} +// CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl.loc49: %D.type = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %E.decl.loc51: %E.type = fn_decl @E [template = constants.%E] {} +// CHECK:STDOUT: %E.decl.loc58: %E.type = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%x: ()); +// CHECK:STDOUT: fn @B(%x: %.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @C(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%x: ()); +// CHECK:STDOUT: fn @.1(%x: %.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @D() { // CHECK:STDOUT: !entry: 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 3e9d54da1fe6..756254ffc94f 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 @@ -45,14 +45,14 @@ fn A => 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -62,14 +62,14 @@ fn A => 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -82,14 +82,14 @@ fn A => 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); 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 a5b4bb4c7df4..b9ba782d8ce0 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon @@ -68,14 +68,14 @@ extern fn A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -85,15 +85,15 @@ extern fn A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -103,14 +103,14 @@ extern fn A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -120,15 +120,15 @@ extern fn A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -138,14 +138,14 @@ extern fn A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -155,15 +155,15 @@ extern fn A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon b/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon index 509ae3788bdd..24734bfd30bd 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon @@ -17,9 +17,9 @@ fn G() { F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,16 +27,16 @@ fn G() { F(); } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index 76b0a12c9aa3..74dde87e4f1b 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -17,11 +17,11 @@ fn G(a: i32); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,16 +31,16 @@ fn G(a: i32); // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %a.loc11_6.1: i32 = param a // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_32.loc13, %.loc13_9.1 [template = i32] diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 71c300ebe963..35f7158a7996 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -99,19 +99,19 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,10 +123,10 @@ fn D() {} // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32] // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32] @@ -137,23 +137,23 @@ fn D() {} // CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc6_14.1: (type,) = tuple_literal (%int.make_type_32.loc6_10) +// CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc6_6.1: (i32,) = param c -// CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_6.1 +// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c +// CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_6.1 // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32] // CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4] -// CHECK:STDOUT: @C.%return: ref {.c: i32} = var +// CHECK:STDOUT: @C.%return: ref %.4 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -169,14 +169,14 @@ fn D() {} // CHECK:STDOUT: return %b.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32} { +// CHECK:STDOUT: fn @C(%c: %.3) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: (i32,) = name_ref c, %c +// CHECK:STDOUT: %c.ref: %.3 = name_ref c, %c // CHECK:STDOUT: %.loc6_47: i32 = int_literal 0 [template = constants.%.5] // CHECK:STDOUT: %.loc6_48: i32 = tuple_index %c.ref, %.loc6_47 -// CHECK:STDOUT: %.loc6_49: {.c: i32} = struct_literal (%.loc6_48) -// CHECK:STDOUT: %struct: {.c: i32} = struct_value (%.loc6_48) -// CHECK:STDOUT: %.loc6_50: {.c: i32} = converted %.loc6_49, %struct +// CHECK:STDOUT: %.loc6_49: %.4 = struct_literal (%.loc6_48) +// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc6_48) +// CHECK:STDOUT: %.loc6_50: %.4 = converted %.loc6_49, %struct // CHECK:STDOUT: return %.loc6_50 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -187,7 +187,7 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -196,7 +196,7 @@ fn D() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -206,17 +206,17 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -230,28 +230,28 @@ fn D() {} // CHECK:STDOUT: .b = %b // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+22, loaded [template = constants.%B] -// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+46, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+22, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+46, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+58, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.var: ref () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.6: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] // CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3] -// CHECK:STDOUT: %c.var: ref {.c: i32} = var c -// CHECK:STDOUT: %c: ref {.c: i32} = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %.3 = var c +// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -260,23 +260,23 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b: i32) -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32}; +// CHECK:STDOUT: fn @C(%c: %.4) -> %.3; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_25: (i32,) = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc8_23) [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_21: (i32,) = converted %.loc8_25, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc8_21) +// CHECK:STDOUT: %.loc8_25: %.4 = tuple_literal (%.loc8_23) +// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple] +// CHECK:STDOUT: %.loc8_21: %.4 = converted %.loc8_25, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_21) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -286,11 +286,11 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -301,15 +301,15 @@ fn D() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+22, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+22, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+46, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+58, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.5: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir4, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc27_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_9.1: type = value_of_initializer %int.make_type_32.loc27_9 [template = i32] // CHECK:STDOUT: %.loc27_9.2: type = converted %int.make_type_32.loc27_9, %.loc27_9.1 [template = i32] @@ -336,7 +336,7 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -344,10 +344,10 @@ fn D() {} // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .A = %A.decl.loc6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl.loc6: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %A.decl.loc7: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl.loc6: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl.loc7: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -360,7 +360,7 @@ fn D() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -374,10 +374,10 @@ fn D() {} // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+22, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+46, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+58, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+58, loaded [template = constants.%D] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %D.decl.loc6: = fn_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %D.decl.loc13: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl.loc6: %D.type = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl.loc13: %D.type = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @D() { diff --git a/toolchain/check/testdata/function/definition/import_access.carbon b/toolchain/check/testdata/function/definition/import_access.carbon index ac97b365f4b1..2178e35a95a4 100644 --- a/toolchain/check/testdata/function/definition/import_access.carbon +++ b/toolchain/check/testdata/function/definition/import_access.carbon @@ -152,7 +152,7 @@ private fn Redecl() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Def.type: type = fn_type @Def [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Def: = struct_value () [template] +// CHECK:STDOUT: %Def: %Def.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -161,7 +161,7 @@ private fn Redecl() {} // CHECK:STDOUT: .Def [private] = %Def.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Def.decl: = fn_decl @Def [template = constants.%Def] {} +// CHECK:STDOUT: %Def.decl: %Def.type = fn_decl @Def [template = constants.%Def] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Def() { @@ -174,7 +174,7 @@ private fn Redecl() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %ForwardWithDef.type: type = fn_type @ForwardWithDef [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %ForwardWithDef: = struct_value () [template] +// CHECK:STDOUT: %ForwardWithDef: %ForwardWithDef.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,8 +183,8 @@ private fn Redecl() {} // CHECK:STDOUT: .ForwardWithDef [private] = %ForwardWithDef.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ForwardWithDef.decl.loc4: = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {} -// CHECK:STDOUT: %ForwardWithDef.decl.loc6: = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {} +// CHECK:STDOUT: %ForwardWithDef.decl.loc4: %ForwardWithDef.type = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {} +// CHECK:STDOUT: %ForwardWithDef.decl.loc6: %ForwardWithDef.type = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ForwardWithDef() { @@ -197,7 +197,7 @@ private fn Redecl() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Forward: = struct_value () [template] +// CHECK:STDOUT: %Forward: %Forward.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -206,7 +206,7 @@ private fn Redecl() {} // CHECK:STDOUT: .Forward [private] = %Forward.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Forward.decl: = fn_decl @Forward [template = constants.%Forward] {} +// CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Forward(); @@ -223,10 +223,10 @@ private fn Redecl() {} // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -248,10 +248,10 @@ private fn Redecl() {} // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -275,10 +275,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -301,10 +301,10 @@ private fn Redecl() {} // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -326,10 +326,10 @@ private fn Redecl() {} // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -353,10 +353,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -372,7 +372,7 @@ private fn Redecl() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template] -// CHECK:STDOUT: %Forward: = struct_value () [template] +// CHECK:STDOUT: %Forward: %Forward.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -382,11 +382,11 @@ private fn Redecl() {} // CHECK:STDOUT: .Forward = %Forward.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var -// CHECK:STDOUT: %Forward.decl: = fn_decl @Forward [template = constants.%Forward] {} +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var +// CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Forward() { @@ -413,10 +413,10 @@ private fn Redecl() {} // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -440,10 +440,10 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %.loc9_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc9_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %f.var: ref () = var f -// CHECK:STDOUT: %f: ref () = bind_name f, %f.var +// CHECK:STDOUT: %f.var: ref %.1 = var f +// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -459,7 +459,7 @@ private fn Redecl() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Redecl.type: type = fn_type @Redecl [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Redecl: = struct_value () [template] +// CHECK:STDOUT: %Redecl: %Redecl.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -468,8 +468,8 @@ private fn Redecl() {} // CHECK:STDOUT: .Redecl [private] = %Redecl.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Redecl.decl.loc4: = fn_decl @Redecl [template = constants.%Redecl] {} -// CHECK:STDOUT: %Redecl.decl.loc6: = fn_decl @Redecl [template = constants.%Redecl] {} +// CHECK:STDOUT: %Redecl.decl.loc4: %Redecl.type = fn_decl @Redecl [template = constants.%Redecl] {} +// CHECK:STDOUT: %Redecl.decl.loc6: %Redecl.type = fn_decl @Redecl [template = constants.%Redecl] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Redecl() { diff --git a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon index 365c450a2f21..b814f08e31ec 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon @@ -65,14 +65,14 @@ extern fn F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -85,15 +85,15 @@ extern fn F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -106,16 +106,16 @@ extern fn F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc13: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc13: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -128,15 +128,15 @@ extern fn F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc11: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc11: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { 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 5261f1b63936..7b7cc4b02e41 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 @@ -69,32 +69,32 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.2 = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %.type.3: type = fn_type @.3 [template] -// CHECK:STDOUT: %.4: > = struct_value () [template] +// CHECK:STDOUT: %.4: %.type.3 = struct_value () [template] // CHECK:STDOUT: %I.type: type = fn_type @I [template] -// CHECK:STDOUT: %I: = struct_value () [template] +// CHECK:STDOUT: %I: %I.type = struct_value () [template] // CHECK:STDOUT: %.type.4: type = fn_type @.4 [template] -// CHECK:STDOUT: %.5: > = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %.5: %.type.4 = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %J.type: type = fn_type @J [template] -// CHECK:STDOUT: %J: = struct_value () [template] +// CHECK:STDOUT: %J: %J.type = struct_value () [template] // CHECK:STDOUT: %.type.5: type = fn_type @.5 [template] -// CHECK:STDOUT: %.6: > = struct_value () [template] +// CHECK:STDOUT: %.6: %.type.5 = struct_value () [template] // CHECK:STDOUT: %K.type: type = fn_type @K [template] -// CHECK:STDOUT: %K: = struct_value () [template] +// CHECK:STDOUT: %K: %K.type = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {} [template] // CHECK:STDOUT: %.type.6: type = fn_type @.6 [template] -// CHECK:STDOUT: %.8: > = struct_value () [template] -// CHECK:STDOUT: %struct: {} = struct_value () [template] +// CHECK:STDOUT: %.8: %.type.6 = struct_value () [template] +// CHECK:STDOUT: %struct: %.7 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,69 +106,69 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: .J = %J.decl // CHECK:STDOUT: .K = %K.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.decl.loc19: > = fn_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %.loc19_10.1: () = tuple_literal () +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.decl.loc19: %.type.1 = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.loc19_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc19_6.1: () = param x -// CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc19_6.1 +// CHECK:STDOUT: %x.loc19_6.1: %.1 = param x +// CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc19_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %.loc21_10.1: () = tuple_literal () +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc21_6.1: () = param x -// CHECK:STDOUT: @G.%x: () = bind_name x, %x.loc21_6.1 +// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x +// CHECK:STDOUT: @G.%x: %.1 = bind_name x, %x.loc21_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc29: > = fn_decl @.2 [template = constants.%.3] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { -// CHECK:STDOUT: %.loc31_10.1: () = tuple_literal () +// CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.3] {} +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %.loc31_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc31_6.1: () = param x -// CHECK:STDOUT: @H.%x: () = bind_name x, %x.loc31_6.1 +// CHECK:STDOUT: %x.loc31_6.1: %.1 = param x +// CHECK:STDOUT: @H.%x: %.1 = bind_name x, %x.loc31_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc36: > = fn_decl @.3 [template = constants.%.4] { +// CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.4] { // CHECK:STDOUT: %x.loc36_6.1: = param x // CHECK:STDOUT: @.3.%x: = bind_name x, %x.loc36_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: = fn_decl @I [template = constants.%I] {} -// CHECK:STDOUT: %.decl.loc46: > = fn_decl @.4 [template = constants.%.5] { -// CHECK:STDOUT: %.loc46_12.1: () = tuple_literal () +// CHECK:STDOUT: %I.decl: %I.type = fn_decl @I [template = constants.%I] {} +// CHECK:STDOUT: %.decl.loc46: %.type.4 = fn_decl @.4 [template = constants.%.5] { +// CHECK:STDOUT: %.loc46_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc46_12.2: type = converted %.loc46_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @.4.%return: ref () = var +// CHECK:STDOUT: @.4.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %J.decl: = fn_decl @J [template = constants.%J] { -// CHECK:STDOUT: %.loc48_12.1: () = tuple_literal () +// CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [template = constants.%J] { +// CHECK:STDOUT: %.loc48_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc48_12.2: type = converted %.loc48_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @J.%return: ref () = var +// CHECK:STDOUT: @J.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc56: > = fn_decl @.5 [template = constants.%.6] {} -// CHECK:STDOUT: %K.decl: = fn_decl @K [template = constants.%K] { -// CHECK:STDOUT: %.loc58_12.1: () = tuple_literal () +// CHECK:STDOUT: %.decl.loc56: %.type.5 = fn_decl @.5 [template = constants.%.6] {} +// CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [template = constants.%K] { +// CHECK:STDOUT: %.loc58_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc58_12.2: type = converted %.loc58_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: @K.%return: ref () = var +// CHECK:STDOUT: @K.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc65: > = fn_decl @.6 [template = constants.%.8] { -// CHECK:STDOUT: %.loc65_12.1: {} = struct_literal () +// CHECK:STDOUT: %.decl.loc65: %.type.6 = fn_decl @.6 [template = constants.%.8] { +// CHECK:STDOUT: %.loc65_12.1: %.7 = struct_literal () // CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%.7 [template = constants.%.7] -// CHECK:STDOUT: @.6.%return: ref {} = var +// CHECK:STDOUT: @.6.%return: ref %.7 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%x: ()) { +// CHECK:STDOUT: fn @.1(%x: %.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x: ()); +// CHECK:STDOUT: fn @G(%x: %.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @.2() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @H(%x: ()); +// CHECK:STDOUT: fn @H(%x: %.1); // CHECK:STDOUT: // CHECK:STDOUT: fn @.3(%x: ) { // CHECK:STDOUT: !entry: @@ -177,28 +177,28 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: fn @I(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @.4() -> () { +// CHECK:STDOUT: fn @.4() -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc46_24: () = tuple_literal () -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc46_25: () = converted %.loc46_24, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.loc46_24: %.1 = tuple_literal () +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] +// CHECK:STDOUT: %.loc46_25: %.1 = converted %.loc46_24, %tuple [template = constants.%tuple] // CHECK:STDOUT: return %.loc46_25 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @J() -> (); +// CHECK:STDOUT: fn @J() -> %.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @.5() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @K() -> (); +// CHECK:STDOUT: fn @K() -> %.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.6() -> {} { +// CHECK:STDOUT: fn @.6() -> %.7 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc65_24: {} = struct_literal () -// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc65_25: {} = converted %.loc65_24, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc65_24: %.7 = struct_literal () +// CHECK:STDOUT: %struct: %.7 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc65_25: %.7 = converted %.loc65_24, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc65_25 // CHECK:STDOUT: } // CHECK:STDOUT: 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 bf24a76fdce2..aa7fa5ecb601 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon @@ -22,15 +22,15 @@ fn F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc11 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc11: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %F.decl.loc18: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc11: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc18: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { 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 3fafd3ef453d..60c1e60479f6 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon @@ -17,15 +17,15 @@ fn Foo() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl.loc11 // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc11: = fn_decl @Foo [template = constants.%Foo] {} -// CHECK:STDOUT: %Foo.decl.loc13: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl.loc11: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl.loc13: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { 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 b5c20425becd..27de4fec5b57 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon @@ -129,14 +129,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -146,15 +146,15 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -167,14 +167,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -184,15 +184,15 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -205,14 +205,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -222,15 +222,15 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -243,14 +243,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -263,15 +263,15 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -281,14 +281,14 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -301,15 +301,15 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -322,7 +322,7 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -330,9 +330,9 @@ fn B() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %A.ref: = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %B: = bind_alias B, %A.decl [template = constants.%A] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A] +// CHECK:STDOUT: %B: %A.type = bind_alias B, %A.decl [template = constants.%A] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -342,9 +342,9 @@ fn B() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -353,8 +353,8 @@ fn B() {} // CHECK:STDOUT: .B = %import_ref.2 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+1, unloaded -// CHECK:STDOUT: %import_ref.2: = import_ref ir0, inst+6, loaded [template = constants.%A] -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %import_ref.2: %A.type = import_ref ir0, inst+6, loaded [template = constants.%A] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/function/definition/no_prelude/order.carbon b/toolchain/check/testdata/function/definition/no_prelude/order.carbon index 9ccb27778be2..1eb52a4558f9 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/order.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/order.carbon @@ -17,11 +17,11 @@ fn Baz() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] -// CHECK:STDOUT: %Bar: = struct_value () [template] +// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] -// CHECK:STDOUT: %Baz: = struct_value () [template] +// CHECK:STDOUT: %Baz: %Baz.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,9 +30,9 @@ fn Baz() {} // CHECK:STDOUT: .Bar = %Bar.decl // CHECK:STDOUT: .Baz = %Baz.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} -// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} -// CHECK:STDOUT: %Baz.decl: = fn_decl @Baz [template = constants.%Baz] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {} +// CHECK:STDOUT: %Baz.decl: %Baz.type = fn_decl @Baz [template = constants.%Baz] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { 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 d95487729750..ff33bf5b4ace 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon @@ -15,14 +15,14 @@ fn Foo() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index 523e306e3827..afd931f0096d 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -15,9 +15,9 @@ fn Foo(a: i32) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,8 +26,8 @@ fn Foo(a: i32) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index 9ccf35b13bcf..d76180211171 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -15,9 +15,9 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,8 +26,8 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index 9b6f0cb6c53d..c0ba7a7e4843 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -15,9 +15,9 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,9 +26,9 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 1341fbf1dcac..fd3b4b36adc5 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -15,9 +15,9 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,9 +26,9 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] 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 0b0821a92482..c4dd2aa0ae4e 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 @@ -18,10 +18,10 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,9 +30,9 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14_10 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14_10, %.loc14_10.1 [template = i32] 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 b3964af3043b..09ca3baaaba0 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 @@ -23,15 +23,15 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type T [symbolic] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc11_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc11_16.1: type = param U @@ -42,14 +42,14 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: fn @F(%T: type, %U: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc12: type = ptr_type T [symbolic = constants.%.2] -// CHECK:STDOUT: %p.var: ref T* = var p -// CHECK:STDOUT: %p: ref T* = bind_name p, %p.var +// CHECK:STDOUT: %.loc12: type = ptr_type %T [symbolic = constants.%.2] +// CHECK:STDOUT: %p.var: ref %.2 = var p +// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var // CHECK:STDOUT: %U.ref: type = name_ref U, %U [symbolic = constants.%U] -// CHECK:STDOUT: %p.ref: ref T* = name_ref p, %p -// CHECK:STDOUT: %.loc16_15: T* = bind_value %p.ref -// CHECK:STDOUT: %.loc16_14: ref T = deref %.loc16_15 -// CHECK:STDOUT: %n: U = bind_name n, +// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p +// CHECK:STDOUT: %.loc16_15: %.2 = bind_value %p.ref +// CHECK:STDOUT: %.loc16_14: ref %T = deref %.loc16_15 +// CHECK:STDOUT: %n: %U = bind_name n, // CHECK:STDOUT: return // 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 7dc868e23710..476e523435ed 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon @@ -19,15 +19,15 @@ fn F(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type T [symbolic] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc11_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -36,15 +36,15 @@ fn F(T:! type) { // CHECK:STDOUT: fn @F(%T: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc12: type = ptr_type T [symbolic = constants.%.2] -// CHECK:STDOUT: %p.var: ref T* = var p -// CHECK:STDOUT: %p: ref T* = bind_name p, %p.var +// CHECK:STDOUT: %.loc12: type = ptr_type %T [symbolic = constants.%.2] +// CHECK:STDOUT: %p.var: ref %.2 = var p +// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %p.ref: ref T* = name_ref p, %p -// CHECK:STDOUT: %.loc13_15: T* = bind_value %p.ref -// CHECK:STDOUT: %.loc13_14.1: ref T = deref %.loc13_15 -// CHECK:STDOUT: %.loc13_14.2: T = bind_value %.loc13_14.1 -// CHECK:STDOUT: %n: T = bind_name n, %.loc13_14.2 +// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p +// CHECK:STDOUT: %.loc13_15: %.2 = bind_value %p.ref +// CHECK:STDOUT: %.loc13_14.1: ref %T = deref %.loc13_15 +// CHECK:STDOUT: %.loc13_14.2: %T = bind_value %.loc13_14.1 +// CHECK:STDOUT: %n: %T = bind_name n, %.loc13_14.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 89c9be22d1e1..c5dfc1d922dc 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,30 +19,30 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc11_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, @F.%T [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc11_16.1: T = param n -// CHECK:STDOUT: @F.%n: T = bind_name n, %n.loc11_16.1 +// CHECK:STDOUT: %n.loc11_16.1: %T = param n +// CHECK:STDOUT: @F.%n: %T = bind_name n, %n.loc11_16.1 // CHECK:STDOUT: %T.ref.loc11_25: type = name_ref T, @F.%T [symbolic = constants.%T] -// CHECK:STDOUT: @F.%return: ref T = var +// CHECK:STDOUT: @F.%return: ref %T = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%T: type, %n: T) -> T { +// CHECK:STDOUT: fn @F(%T: type, %n: %T) -> %T { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %n.ref: T = name_ref n, %n -// CHECK:STDOUT: %m: T = bind_name m, %n.ref -// CHECK:STDOUT: %m.ref: T = name_ref m, %m +// CHECK:STDOUT: %n.ref: %T = name_ref n, %n +// CHECK:STDOUT: %m: %T = bind_name m, %n.ref +// CHECK:STDOUT: %m.ref: %T = name_ref m, %m // CHECK:STDOUT: return %m.ref // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index 6c8170f408c8..694b0ee83f09 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -105,10 +105,10 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -117,29 +117,29 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_6.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] -// CHECK:STDOUT: %return.var.loc4: ref T* = var +// CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: %return.var.loc4: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc6: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc6_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc6_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @F.%T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc6: type = ptr_type T [symbolic = constants.%.1] -// CHECK:STDOUT: @F.%return: ref T* = var +// CHECK:STDOUT: %.loc6: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%T: type) -> T* { +// CHECK:STDOUT: fn @F(%T: type) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl.loc4 [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %F.call: init T* = call %F.ref(%T.ref) -// CHECK:STDOUT: %.loc7_14.1: T* = value_of_initializer %F.call -// CHECK:STDOUT: %.loc7_14.2: T* = converted %F.call, %.loc7_14.1 +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(%T.ref) +// CHECK:STDOUT: %.loc7_14.1: %.1 = value_of_initializer %F.call +// CHECK:STDOUT: %.loc7_14.2: %.1 = converted %F.call, %.loc7_14.1 // CHECK:STDOUT: return %.loc7_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,13 +148,13 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type U [symbolic] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %U [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: > = struct_value () [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,33 +163,33 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc4_16.1: type = param U // CHECK:STDOUT: @F.%U: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = constants.%U] // CHECK:STDOUT: %T.ref: type = name_ref T, @F.%T [symbolic = constants.%T] -// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] -// CHECK:STDOUT: @F.%return: ref T* = var +// CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %T.loc13_6.1: type = param T // CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc13_16.1: type = param U // CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 1, %U.loc13_16.1 [symbolic = constants.%U] // CHECK:STDOUT: %U.ref: type = name_ref U, @.1.%U [symbolic = constants.%U] -// CHECK:STDOUT: %.loc13: type = ptr_type U [symbolic = constants.%.3] -// CHECK:STDOUT: @.1.%return: ref U* = var +// CHECK:STDOUT: %.loc13: type = ptr_type %U [symbolic = constants.%.3] +// CHECK:STDOUT: @.1.%return: ref %.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%T: type, %U: type) -> T*; +// CHECK:STDOUT: fn @F(%T: type, %U: type) -> %.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%T: type, %U: type) -> U* { +// CHECK:STDOUT: fn @.1(%T: type, %U: type) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %F.call: init T* = call %F.ref() [template = ] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,15 +198,15 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %T.2 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: > = struct_value () [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -215,33 +215,33 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T.1] // CHECK:STDOUT: %U.loc4_16.1: type = param U // CHECK:STDOUT: @F.%U: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = constants.%U.1] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, @F.%T [symbolic = constants.%T.1] -// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] -// CHECK:STDOUT: @F.%return: ref T* = var +// CHECK:STDOUT: %.loc4: type = ptr_type %T.1 [symbolic = constants.%.1] +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %U.loc13_6.1: type = param U // CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = constants.%U.2] // CHECK:STDOUT: %T.loc13_16.1: type = param T // CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 1, %T.loc13_16.1 [symbolic = constants.%T.2] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @.1.%T [symbolic = constants.%T.2] -// CHECK:STDOUT: %.loc13: type = ptr_type T [symbolic = constants.%.3] -// CHECK:STDOUT: @.1.%return: ref T* = var +// CHECK:STDOUT: %.loc13: type = ptr_type %T.2 [symbolic = constants.%.3] +// CHECK:STDOUT: @.1.%return: ref %.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%T: type, %U: type) -> T*; +// CHECK:STDOUT: fn @F(%T: type, %U: type) -> %.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> T* { +// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.2] -// CHECK:STDOUT: %F.call: init T* = call %F.ref() [template = ] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -250,15 +250,15 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T 1 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type U [symbolic] +// CHECK:STDOUT: %.3: type = ptr_type %U.2 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.4: > = struct_value () [template] +// CHECK:STDOUT: %.4: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -267,33 +267,33 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T.1] // CHECK:STDOUT: %U.loc4_16.1: type = param U // CHECK:STDOUT: @F.%U: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = constants.%U.1] // CHECK:STDOUT: %T.ref: type = name_ref T, @F.%T [symbolic = constants.%T.1] -// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] -// CHECK:STDOUT: @F.%return: ref T* = var +// CHECK:STDOUT: %.loc4: type = ptr_type %T.1 [symbolic = constants.%.1] +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %U.loc13_6.1: type = param U // CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = constants.%U.2] // CHECK:STDOUT: %T.loc13_16.1: type = param T // CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 1, %T.loc13_16.1 [symbolic = constants.%T.2] // CHECK:STDOUT: %U.ref: type = name_ref U, @.1.%U [symbolic = constants.%U.2] -// CHECK:STDOUT: %.loc13: type = ptr_type U [symbolic = constants.%.3] -// CHECK:STDOUT: @.1.%return: ref U* = var +// CHECK:STDOUT: %.loc13: type = ptr_type %U.2 [symbolic = constants.%.3] +// CHECK:STDOUT: @.1.%return: ref %.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%T: type, %U: type) -> T*; +// CHECK:STDOUT: fn @F(%T: type, %U: type) -> %.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> U* { +// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> %.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.2] -// CHECK:STDOUT: %F.call: init T* = call %F.ref() [template = ] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/global/class_obj.carbon b/toolchain/check/testdata/global/class_obj.carbon index 550d2ace12d4..920e8adfd034 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: type = tuple_type () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,8 +30,8 @@ var a: A = {}; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %A.ref: type = name_ref A, %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: %a.var: ref %A = var a +// CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -41,9 +41,9 @@ var a: A = {}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc12_13.2: init A = class_init (), file.%a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_14: init A = converted %.loc12_13.1, %.loc12_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc12_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc12_13.2: init %A = class_init (), file.%a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_14: init %A = converted %.loc12_13.1, %.loc12_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%a.var, %.loc12_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/class_with_fun.carbon b/toolchain/check/testdata/global/class_with_fun.carbon index 533295bf6dd7..a8b8ec31f461 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: %ret_a.type: type = fn_type @ret_a [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %ret_a: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %ret_a: %ret_a.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,13 +36,13 @@ var a: A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %ret_a.decl: = fn_decl @ret_a [template = constants.%ret_a] { +// CHECK:STDOUT: %ret_a.decl: %ret_a.type = fn_decl @ret_a [template = constants.%ret_a] { // CHECK:STDOUT: %A.ref.loc12: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: @ret_a.%return: ref A = var +// CHECK:STDOUT: @ret_a.%return: ref %A = var // CHECK:STDOUT: } // CHECK:STDOUT: %A.ref.loc16: type = name_ref A, %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: %a.var: ref %A = var a +// CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -50,19 +50,19 @@ var a: A = {}; // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ret_a() -> %return: A { +// CHECK:STDOUT: fn @ret_a() -> %return: %A { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11.1: {} = struct_literal () -// CHECK:STDOUT: %.loc13_11.2: init A = class_init (), %return [template = constants.%struct] -// CHECK:STDOUT: %.loc13_12: init A = converted %.loc13_11.1, %.loc13_11.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc13_11.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc13_11.2: init %A = class_init (), %return [template = constants.%struct] +// CHECK:STDOUT: %.loc13_12: init %A = converted %.loc13_11.1, %.loc13_11.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc13_12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc16_13.2: init A = class_init (), file.%a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc16_14: init A = converted %.loc16_13.1, %.loc16_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc16_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc16_13.2: init %A = class_init (), file.%a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc16_14: init %A = converted %.loc16_13.1, %.loc16_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%a.var, %.loc16_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/decl.carbon b/toolchain/check/testdata/global/decl.carbon index 21a868778901..443ab1b071d1 100644 --- a/toolchain/check/testdata/global/decl.carbon +++ b/toolchain/check/testdata/global/decl.carbon @@ -14,7 +14,7 @@ var a: i32; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -23,7 +23,7 @@ var a: i32; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32, %.loc10_8.1 [template = i32] diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index 1c7f61c22fc1..b2047a0d5b96 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -14,7 +14,7 @@ var a: i32 = 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -24,7 +24,7 @@ var a: i32 = 0; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32, %.loc10_8.1 [template = i32] diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index b80bf5d0efa3..d98b61bae907 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -19,9 +19,9 @@ var a: i32 = test_a(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %test_a.type: type = fn_type @test_a [template] -// CHECK:STDOUT: %test_a: = struct_value () [template] +// CHECK:STDOUT: %test_a: %test_a.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,14 +32,14 @@ var a: i32 = test_a(); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %test_a.decl: = fn_decl @test_a [template = constants.%test_a] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %test_a.decl: %test_a.type = fn_decl @test_a [template = constants.%test_a] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_32.loc11, %.loc11_16.1 [template = i32] // CHECK:STDOUT: @test_a.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] @@ -57,7 +57,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %test_a.ref: = name_ref test_a, file.%test_a.decl [template = constants.%test_a] +// CHECK:STDOUT: %test_a.ref: %test_a.type = name_ref test_a, file.%test_a.decl [template = constants.%test_a] // CHECK:STDOUT: %test_a.call: init i32 = call %test_a.ref() // CHECK:STDOUT: assign file.%a.var, %test_a.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/if/else.carbon b/toolchain/check/testdata/if/else.carbon index fd76cd29a11b..55585bfb9780 100644 --- a/toolchain/check/testdata/if/else.carbon +++ b/toolchain/check/testdata/if/else.carbon @@ -26,15 +26,15 @@ fn If(b: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %If.type: type = fn_type @If [template] -// CHECK:STDOUT: %If: = struct_value () [template] +// CHECK:STDOUT: %If: %If.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,11 +46,11 @@ fn If(b: bool) { // CHECK:STDOUT: .If = %If.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %If.decl: = fn_decl @If [template = constants.%If] { +// 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: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %If.decl: %If.type = fn_decl @If [template = constants.%If] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_10.2: type = converted %bool.make_type, %.loc15_10.1 [template = bool] @@ -82,18 +82,18 @@ fn If(b: bool) { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init () = call %G.ref() +// 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: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.done: -// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init () = call %H.ref() +// 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: 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 b360a0b8ca73..095f256815bd 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -44,17 +44,17 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %If1.type: type = fn_type @If1 [template] -// CHECK:STDOUT: %If1: = struct_value () [template] +// CHECK:STDOUT: %If1: %If1.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] -// CHECK:STDOUT: %If2: = struct_value () [template] +// CHECK:STDOUT: %If2: %If2.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] -// CHECK:STDOUT: %If3: = struct_value () [template] +// CHECK:STDOUT: %If3: %If3.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,9 +65,9 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: .If3 = %If3.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %If1.decl: = fn_decl @If1 [template = constants.%If1] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If1.decl: %If1.type = fn_decl @If1 [template = constants.%If1] { // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] @@ -78,9 +78,9 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_32.loc11, %.loc11_20.1 [template = i32] // CHECK:STDOUT: @If1.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %If2.decl: = fn_decl @If2 [template = constants.%If2] { +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If2.decl: %If2.type = fn_decl @If2 [template = constants.%If2] { // CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type.loc22, %.loc22_11.1 [template = bool] @@ -91,9 +91,9 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_32.loc22, %.loc22_20.1 [template = i32] // CHECK:STDOUT: @If2.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %If3.decl: = fn_decl @If3 [template = constants.%If3] { +// CHECK:STDOUT: %import_ref.5: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If3.decl: %If3.type = fn_decl @If3 [template = constants.%If3] { // CHECK:STDOUT: %bool.make_type.loc33: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type.loc33 [template = bool] // CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type.loc33, %.loc33_11.1 [template = bool] diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index f2fd15f96552..2d5e61112686 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -24,11 +24,11 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %VarScope.type: type = fn_type @VarScope [template] -// CHECK:STDOUT: %VarScope: = struct_value () [template] +// CHECK:STDOUT: %VarScope: %VarScope.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,9 +38,9 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: .VarScope = %VarScope.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %VarScope.decl: = fn_decl @VarScope [template = constants.%VarScope] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %VarScope.decl: %VarScope.type = fn_decl @VarScope [template = constants.%VarScope] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_16.2: type = converted %bool.make_type, %.loc11_16.1 [template = bool] @@ -51,7 +51,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32, %.loc11_25.1 [template = i32] // CHECK:STDOUT: @VarScope.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; diff --git a/toolchain/check/testdata/if/no_else.carbon b/toolchain/check/testdata/if/no_else.carbon index dcbd7ea5e0de..5b5a1816e64f 100644 --- a/toolchain/check/testdata/if/no_else.carbon +++ b/toolchain/check/testdata/if/no_else.carbon @@ -23,13 +23,13 @@ fn If(b: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %If.type: type = fn_type @If [template] -// CHECK:STDOUT: %If: = struct_value () [template] +// CHECK:STDOUT: %If: %If.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,10 +40,10 @@ fn If(b: bool) { // CHECK:STDOUT: .If = %If.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %If.decl: = fn_decl @If [template = constants.%If] { +// 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: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %If.decl: %If.type = fn_decl @If [template = constants.%If] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_10.2: type = converted %bool.make_type, %.loc14_10.1 [template = bool] @@ -70,13 +70,13 @@ fn If(b: bool) { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init () = call %G.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index fc222e6afc3e..73a82bf449d4 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -22,11 +22,11 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %If.type: type = fn_type @If [template] -// CHECK:STDOUT: %If: = struct_value () [template] +// CHECK:STDOUT: %If: %If.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -37,9 +37,9 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: .If = %If.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %If.decl: = fn_decl @If [template = constants.%If] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If.decl: %If.type = fn_decl @If [template = constants.%If] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_10.2: type = converted %bool.make_type, %.loc11_10.1 [template = bool] diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index fc03c8e28586..feb675f02733 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -18,17 +18,17 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: %.6: type = tuple_type (i32) [template] -// CHECK:STDOUT: %array: [i32; 1] = tuple_value (%.5) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,11 +37,11 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] @@ -62,7 +62,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_32.loc11_34, %.loc11_34.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -76,28 +76,28 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32, %.loc12_11.1 [template = i32] // CHECK:STDOUT: %.loc12_17: type = array_type %.loc12_16, i32 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref [i32; 1] = var x -// CHECK:STDOUT: %x: ref [i32; 1] = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var // CHECK:STDOUT: %.loc12_22: i32 = int_literal 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_24.1: (i32,) = tuple_literal (%.loc12_22) +// CHECK:STDOUT: %.loc12_24.1: %.6 = tuple_literal (%.loc12_22) // CHECK:STDOUT: %.loc12_24.2: i32 = int_literal 0 [template = constants.%.5] // 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 [i32; 1] = array_init (%.loc12_24.4) to %x.var [template = constants.%array] -// CHECK:STDOUT: %.loc12_25: init [i32; 1] = converted %.loc12_24.1, %.loc12_24.5 [template = constants.%array] +// 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: 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 [i32; 1] = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13_20: ref %.3 = 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 [i32; 1] = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13_30: ref %.3 = 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 bd2aa2895921..ac18fda51cf1 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -36,24 +36,24 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.5: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] -// CHECK:STDOUT: %Constant: = struct_value () [template] +// CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type i32 [template] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [template] -// CHECK:STDOUT: %PartiallyConstant: = struct_value () [template] +// CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,47 +67,47 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: .PartiallyConstant = %PartiallyConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // 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: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // 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: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_32.loc18, %.loc18_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Constant.decl: %Constant.type = fn_decl @Constant [template = constants.%Constant] { // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_18.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_18.2: type = converted %int.make_type_32.loc22, %.loc22_18.1 [template = i32] // CHECK:STDOUT: @Constant.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %PartiallyConstant.decl: = fn_decl @PartiallyConstant [template = constants.%PartiallyConstant] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %PartiallyConstant.decl: %PartiallyConstant.type = fn_decl @PartiallyConstant [template = constants.%PartiallyConstant] { // CHECK:STDOUT: %t.loc28_22.1: type = param t // CHECK:STDOUT: @PartiallyConstant.%t: type = bind_name t, %t.loc28_22.1 // CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] @@ -115,8 +115,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc28_34.2: type = converted %int.make_type_32.loc28, %.loc28_34.1 [template = i32] // CHECK:STDOUT: @PartiallyConstant.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -139,14 +139,14 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc15_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc15_24.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc15_24.2: i32 = converted %A.call, %.loc15_24.1 // CHECK:STDOUT: br !if.expr.result(%.loc15_24.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init i32 = call %B.ref() // CHECK:STDOUT: %.loc15_27.1: i32 = value_of_initializer %B.call // CHECK:STDOUT: %.loc15_27.2: i32 = converted %B.call, %.loc15_27.1 @@ -163,14 +163,14 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc19_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc19_25.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc19_25.2: i32 = converted %A.call, %.loc19_25.1 // CHECK:STDOUT: br !if.expr.result(%.loc19_25.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init i32 = call %B.ref() // CHECK:STDOUT: %.loc19_28.1: i32 = value_of_initializer %B.call // CHECK:STDOUT: %.loc19_28.2: i32 = converted %B.call, %.loc19_28.1 @@ -223,13 +223,13 @@ fn PartiallyConstant(t: type) -> i32 { // 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 i32* = var w -// CHECK:STDOUT: %w: ref i32* = bind_name w, %w.var +// CHECK:STDOUT: %w.var: ref %.6 = var w +// CHECK:STDOUT: %w: ref %.6 = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref i32 = name_ref v, %v -// CHECK:STDOUT: %.loc24_40: i32* = addr_of %v.ref +// CHECK:STDOUT: %.loc24_40: %.6 = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %.loc24_40 -// CHECK:STDOUT: %w.ref: ref i32* = name_ref w, %w -// CHECK:STDOUT: %.loc25_11: i32* = bind_value %w.ref +// CHECK:STDOUT: %w.ref: ref %.6 = name_ref w, %w +// CHECK:STDOUT: %.loc25_11: %.6 = 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 @@ -272,13 +272,13 @@ fn PartiallyConstant(t: type) -> i32 { // 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 i32* = var w -// CHECK:STDOUT: %w: ref i32* = bind_name w, %w.var +// CHECK:STDOUT: %w.var: ref %.6 = var w +// CHECK:STDOUT: %w: ref %.6 = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref i32 = name_ref v, %v -// CHECK:STDOUT: %.loc30_38: i32* = addr_of %v.ref +// CHECK:STDOUT: %.loc30_38: %.6 = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %.loc30_38 -// CHECK:STDOUT: %w.ref: ref i32* = name_ref w, %w -// CHECK:STDOUT: %.loc31_11: i32* = bind_value %w.ref +// CHECK:STDOUT: %w.ref: ref %.6 = name_ref w, %w +// CHECK:STDOUT: %.loc31_11: %.6 = 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 26a586ca380f..626e59b37aba 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -20,17 +20,17 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,23 +41,23 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // 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: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_9.2: type = converted %bool.make_type, %.loc14_9.1 [template = bool] @@ -92,14 +92,14 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc15_21.2: i32 = converted %A.call, %.loc15_21.1 // CHECK:STDOUT: br !if.expr.result(%.loc15_21.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init i32 = call %B.ref() // CHECK:STDOUT: %.loc15_24.1: i32 = value_of_initializer %B.call // CHECK:STDOUT: %.loc15_24.2: i32 = converted %B.call, %.loc15_24.1 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 d94e01737a92..9c1abddb013a 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -42,15 +42,15 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] -// CHECK:STDOUT: %.6: type = unbound_element_type C, i32 [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: } // CHECK:STDOUT: @@ -58,8 +58,8 @@ class C { // CHECK:STDOUT: %.loc23: i32 = block_arg [template = constants.%.3] // CHECK:STDOUT: %x: i32 = bind_name x, %.loc23 // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 0de787624ea8..1e47fdae4a90 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -44,11 +44,11 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %ConditionIsNonConstant.type: type = fn_type @ConditionIsNonConstant [template] -// CHECK:STDOUT: %ConditionIsNonConstant: = struct_value () [template] +// CHECK:STDOUT: %ConditionIsNonConstant: %ConditionIsNonConstant.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,16 +58,16 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: .ConditionIsNonConstant = %ConditionIsNonConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %ConditionIsNonConstant.decl: = fn_decl @ConditionIsNonConstant [template = constants.%ConditionIsNonConstant] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %ConditionIsNonConstant.decl: %ConditionIsNonConstant.type = fn_decl @ConditionIsNonConstant [template = constants.%ConditionIsNonConstant] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_30.2: type = converted %bool.make_type, %.loc4_30.1 [template = bool] // CHECK:STDOUT: %b.loc4_27.1: bool = param b // CHECK:STDOUT: @ConditionIsNonConstant.%b: bool = bind_name b, %b.loc4_27.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -105,10 +105,10 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %ChosenBranchIsNonConstant.type: type = fn_type @ChosenBranchIsNonConstant [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %ChosenBranchIsNonConstant: = struct_value () [template] +// CHECK:STDOUT: %ChosenBranchIsNonConstant: %ChosenBranchIsNonConstant.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: bool = bool_literal false [template] // CHECK:STDOUT: } @@ -119,12 +119,12 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: .ChosenBranchIsNonConstant = %ChosenBranchIsNonConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ChosenBranchIsNonConstant.decl: = fn_decl @ChosenBranchIsNonConstant [template = constants.%ChosenBranchIsNonConstant] { +// CHECK:STDOUT: %ChosenBranchIsNonConstant.decl: %ChosenBranchIsNonConstant.type = fn_decl @ChosenBranchIsNonConstant [template = constants.%ChosenBranchIsNonConstant] { // CHECK:STDOUT: %t.loc4_30.1: type = param t // CHECK:STDOUT: @ChosenBranchIsNonConstant.%t: type = bind_name t, %t.loc4_30.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ChosenBranchIsNonConstant(%t: type) { diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 1b24d5ebb69b..b5870e0fa3cc 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -17,11 +17,11 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] @@ -34,11 +34,11 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type.loc11_9 [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type.loc11_9, %.loc11_9.1 [template = bool] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 2e7e78536f83..73c2884e4deb 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -20,18 +20,18 @@ fn F(cond: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,9 +41,9 @@ fn F(cond: bool) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // 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] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_14, %.loc11_14.1 [template = i32] @@ -51,24 +51,24 @@ fn F(cond: bool) { // 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.loc11_6.1: {.a: i32, .b: i32} = param s -// CHECK:STDOUT: @G.%s: {.a: i32, .b: i32} = bind_name s, %s.loc11_6.1 +// CHECK:STDOUT: %s.loc11_6.1: %.2 = param s +// CHECK:STDOUT: @G.%s: %.2 = bind_name s, %s.loc11_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc13_12.2: type = converted %bool.make_type, %.loc13_12.1 [template = bool] // CHECK:STDOUT: %cond.loc13_6.1: bool = param cond // CHECK:STDOUT: @F.%cond: bool = bind_name cond, %cond.loc13_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%s: {.a: i32, .b: i32}); +// CHECK:STDOUT: fn @G(%s: %.2); // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: @@ -81,45 +81,45 @@ fn F(cond: bool) { // 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 {.a: i32, .b: i32} = var a -// CHECK:STDOUT: %a: ref {.a: i32, .b: i32} = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.2 = var a +// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var // CHECK:STDOUT: %.loc14_37: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc14_45: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_46.1: {.a: i32, .b: i32} = struct_literal (%.loc14_37, %.loc14_45) +// CHECK:STDOUT: %.loc14_46.1: %.2 = 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.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 {.a: i32, .b: i32} = struct_init (%.loc14_46.3, %.loc14_46.5) to %a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_47: init {.a: i32, .b: i32} = converted %.loc14_46.1, %.loc14_46.6 [template = constants.%struct] +// 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: assign %a.var, %.loc14_47 -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %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 {.a: i32, .b: i32} = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc15_18: ref %.2 = 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: {.a: i32, .b: i32} = struct_value (%.loc15_18.2, %.loc15_18.4) -// CHECK:STDOUT: %.loc15_18.5: {.a: i32, .b: i32} = converted %a.ref.loc15_18, %struct.loc15_18 +// 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: br !if.expr.result(%.loc15_18.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %a.ref.loc15_25: ref {.a: i32, .b: i32} = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc15_25: ref %.2 = 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: {.a: i32, .b: i32} = struct_value (%.loc15_25.2, %.loc15_25.4) -// CHECK:STDOUT: %.loc15_20: {.a: i32, .b: i32} = converted %a.ref.loc15_25, %struct.loc15_25 +// 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: br !if.expr.result(%.loc15_20) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc15_5: {.a: i32, .b: i32} = block_arg !if.expr.result -// CHECK:STDOUT: %G.call: init () = call %G.ref(%.loc15_5) +// CHECK:STDOUT: %.loc15_5: %.2 = block_arg !if.expr.result +// CHECK:STDOUT: %G.call: init %.1 = 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 92ac2f9ccefb..79bf7401455f 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -38,32 +38,32 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %G.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.6: in Simple> = assoc_entity element1, @Simple.%G.decl [template] +// CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Simple, %G.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Simple.%G.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] // CHECK:STDOUT: %.7: = interface_witness (%F.2, %G.2) [template] // CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] -// CHECK:STDOUT: %NonInstanceCall: = struct_value () [template] +// CHECK:STDOUT: %NonInstanceCall: %NonInstanceCall.type = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] -// CHECK:STDOUT: %InstanceCall: = struct_value () [template] +// CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type i32 [template] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [template] -// CHECK:STDOUT: %NonInstanceCallIndirect: = struct_value () [template] +// CHECK:STDOUT: %NonInstanceCallIndirect: %NonInstanceCallIndirect.type = struct_value () [template] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [template] -// CHECK:STDOUT: %InstanceCallIndirect: = struct_value () [template] +// CHECK:STDOUT: %InstanceCallIndirect: %InstanceCallIndirect.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,62 +77,62 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_6.2: type = converted %int.make_type_32.loc16, %.loc16_6.1 [template = i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %NonInstanceCall.decl: = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %NonInstanceCall.decl: %NonInstanceCall.type = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_32.loc21, %.loc21_23.1 [template = i32] // CHECK:STDOUT: %n.loc21_20.1: i32 = param n // CHECK:STDOUT: @NonInstanceCall.%n: i32 = bind_name n, %n.loc21_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %InstanceCall.decl: = fn_decl @InstanceCall [template = constants.%InstanceCall] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_20.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_20.2: type = converted %int.make_type_32.loc25, %.loc25_20.1 [template = i32] // CHECK:STDOUT: %n.loc25_17.1: i32 = param n // CHECK:STDOUT: @InstanceCall.%n: i32 = bind_name n, %n.loc25_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %NonInstanceCallIndirect.decl: = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_32.loc29, %.loc29_34.1 [template = i32] // CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.8] -// CHECK:STDOUT: %p.loc29_28.1: i32* = param p -// CHECK:STDOUT: @NonInstanceCallIndirect.%p: i32* = bind_name p, %p.loc29_28.1 +// CHECK:STDOUT: %p.loc29_28.1: %.8 = param p +// CHECK:STDOUT: @NonInstanceCallIndirect.%p: %.8 = bind_name p, %p.loc29_28.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %InstanceCallIndirect.decl: = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { // CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_32.loc33, %.loc33_31.1 [template = i32] // CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.8] -// CHECK:STDOUT: %p.loc33_25.1: i32* = param p -// CHECK:STDOUT: @InstanceCallIndirect.%p: i32* = bind_name p, %p.loc33_25.1 +// CHECK:STDOUT: %p.loc33_25.1: %.8 = param p +// CHECK:STDOUT: @InstanceCallIndirect.%p: %.8 = bind_name p, %p.loc33_25.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %Self.ref: Simple = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { +// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref, %.loc13_14.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc13_8.1: Self = param self -// CHECK:STDOUT: %self.loc13_8.2: Self = bind_name self, %self.loc13_8.1 +// CHECK:STDOUT: %self.loc13_8.1: %Self = param self +// CHECK:STDOUT: %self.loc13_8.2: %Self = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_21: in Simple> = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc13_21: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -141,9 +141,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as Simple { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] { +// CHECK:STDOUT: impl @impl: i32 as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_14.2: type = converted %int.make_type_32, %.loc18_14.1 [template = i32] @@ -160,7 +160,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G.1[@Simple.%self.loc13_8.2: Self](); +// CHECK:STDOUT: fn @G.1[@Simple.%self.loc13_8.2: %Self](); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: @@ -172,9 +172,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.%.1] -// CHECK:STDOUT: %F.ref: in Simple> = name_ref F, @Simple.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init () = call %.1() +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Simple.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.2 = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -182,34 +182,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.%.1] -// CHECK:STDOUT: %G.ref: in Simple> = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] +// CHECK:STDOUT: %G.ref: %.5 = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] +// CHECK:STDOUT: %.1: %G.type.1 = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc26: = bound_method %n.ref, %.1 -// CHECK:STDOUT: %G.call: init () = call %.loc26(%n.ref) +// CHECK:STDOUT: %G.call: init %.2 = call %.loc26(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p: i32*) { +// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p: %.8) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: i32* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: in Simple> = name_ref F, @Simple.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Simple.%.loc12 [template = constants.%.4] // CHECK:STDOUT: %.loc30: ref i32 = deref %p.ref -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init () = call %.1() +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.2 = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @InstanceCallIndirect(%p: i32*) { +// CHECK:STDOUT: fn @InstanceCallIndirect(%p: %.8) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: i32* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: in Simple> = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] +// CHECK:STDOUT: %G.ref: %.5 = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] // CHECK:STDOUT: %.loc34_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] +// CHECK:STDOUT: %.1: %G.type.1 = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc34_4.2: = bound_method %.loc34_4.1, %.1 // CHECK:STDOUT: %.loc34_4.3: i32 = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call: init () = call %.loc34_4.2(%.loc34_4.3) +// CHECK:STDOUT: %G.call: init %.2 = call %.loc34_4.2(%.loc34_4.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index 5bf41d415c13..09e72ad734d0 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -16,10 +16,10 @@ impl i32 as I; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,7 +29,7 @@ impl i32 as I; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -39,14 +39,14 @@ impl i32 as I; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as I; +// CHECK:STDOUT: impl @impl: i32 as %.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index ca95ca11b8dc..53a6bb7911f7 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -18,10 +18,10 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,7 +32,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_6.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -42,14 +42,14 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as Empty { +// CHECK:STDOUT: impl @impl: i32 as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 451e723e8b10..b5033f3bf243 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -27,20 +27,20 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] -// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = 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: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,17 +53,17 @@ fn G(c: C) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc21_6.1: C = param c -// CHECK:STDOUT: @G.%c: C = bind_name c, %c.loc21_6.1 +// CHECK:STDOUT: %c.loc21_6.1: %C = param c +// CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc21_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -71,8 +71,8 @@ fn G(c: C) { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -97,16 +97,16 @@ fn G(c: C) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%c: C) { +// CHECK:STDOUT: fn @G(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: in HasF> = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init () = call %.1() -// CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: in HasF> = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.2: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init () = call %.2() +// CHECK:STDOUT: %F.ref.loc22: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %.2 = call %.1() +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %F.ref.loc23: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %.2: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %.2 = call %.2() // 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 d6ceaafa9ef0..083b97ea90a8 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -27,18 +27,18 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %G.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, %G.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%G.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] -// CHECK:STDOUT: %G.2: = struct_value () [template] +// CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] -// CHECK:STDOUT: %InstanceCall: = struct_value () [template] +// CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,15 +49,15 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32.loc15, %.loc15_6.1 [template = i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %InstanceCall.decl: = fn_decl @InstanceCall [template = constants.%InstanceCall] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_32.loc22, %.loc22_20.1 [template = i32] @@ -67,15 +67,15 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %Self.ref: Simple = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { +// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %.loc12_14.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc12_8.1: Self = param self -// CHECK:STDOUT: %self.loc12_8.2: Self = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %self.loc12_8.1: %Self = param self +// CHECK:STDOUT: %self.loc12_8.2: %Self = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_21: in Simple> = assoc_entity element0, %G.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_21: %.3 = assoc_entity element0, %G.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -83,8 +83,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: witness = (%G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as Simple { -// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] { +// CHECK:STDOUT: impl @impl: i32 as %.1 { +// CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %Undeclared.ref: = name_ref Undeclared, [template = ] // CHECK:STDOUT: %self.loc19_8.1: = param self // CHECK:STDOUT: %self.loc19_8.2: = bind_name self, %self.loc19_8.1 @@ -96,7 +96,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G.1[@Simple.%self.loc12_8.2: Self](); +// CHECK:STDOUT: fn @G.1[@Simple.%self.loc12_8.2: %Self](); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: @@ -106,8 +106,8 @@ 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.%.1] -// CHECK:STDOUT: %G.ref: in Simple> = name_ref G, @Simple.%.loc12_21 [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = ] +// CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc12_21 [template = constants.%.4] +// CHECK:STDOUT: %.1: %G.type.1 = interface_witness_access @impl.%.1, element0 [template = ] // CHECK:STDOUT: %.loc23: = bound_method %n.ref, %.1 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 0320d7b29a37..f44dddf2b6de 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -34,15 +34,15 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.1: type = interface_type @GenericInterface [template] -// CHECK:STDOUT: %Self: GenericInterface = bind_symbolic_name Self 1 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @GenericInterface, [template] -// CHECK:STDOUT: %.4: in GenericInterface> = assoc_entity element0, @GenericInterface.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @GenericInterface, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @GenericInterface.%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: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -61,13 +61,13 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @GenericInterface { -// CHECK:STDOUT: %Self: GenericInterface = bind_symbolic_name Self 1 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 1 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_28.2 [symbolic = constants.%T] -// CHECK:STDOUT: %x.loc12_8.1: T = param x -// CHECK:STDOUT: %x.loc12_8.2: T = bind_name x, %x.loc12_8.1 +// CHECK:STDOUT: %x.loc12_8.1: %T = param x +// CHECK:STDOUT: %x.loc12_8.2: %T = bind_name x, %x.loc12_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: in GenericInterface> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -75,11 +75,11 @@ class C { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: impl @impl: %C as { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %T.ref: type = name_ref T, @C.%T.loc27_23.2 [symbolic = constants.%T] -// CHECK:STDOUT: %x.loc28_10.1: T = param x -// CHECK:STDOUT: %x.loc28_10.2: T = bind_name x, %x.loc28_10.1 +// CHECK:STDOUT: %x.loc28_10.1: %T = param x +// CHECK:STDOUT: %x.loc28_10.2: %T = bind_name x, %x.loc28_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -100,9 +100,9 @@ class C { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1(@GenericInterface.%x.loc12_8.2: T); +// CHECK:STDOUT: fn @F.1(@GenericInterface.%x.loc12_8.2: %T); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(@impl.%x.loc28_10.2: T) { +// CHECK:STDOUT: fn @F.2(@impl.%x.loc28_10.2: %T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 815891e319f3..31aa6adac4a9 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -19,10 +19,10 @@ extend impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,7 +33,7 @@ extend impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -43,14 +43,14 @@ extend impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as I { +// CHECK:STDOUT: impl @impl: i32 as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: 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 fef9cbeec22e..24758e50c7af 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -43,11 +43,11 @@ class E { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] @@ -65,29 +65,29 @@ class E { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %E.decl: type = class_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: i32 as I { +// CHECK:STDOUT: impl @impl.1: i32 as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: D as I; +// CHECK:STDOUT: impl @impl.2: %D as %.1; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3: E as I { +// CHECK:STDOUT: impl @impl.3: %E as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index e91a6d0e86f8..57ae2dced5cf 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -21,7 +21,7 @@ class C { // 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: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,10 +32,10 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as i32; +// CHECK:STDOUT: impl @impl: %C as i32; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index 27308c9480b3..b3a8d56b4948 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -24,7 +24,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } @@ -39,7 +39,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -48,7 +48,7 @@ interface I { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as I; +// CHECK:STDOUT: impl @impl: %C as %.1; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl { diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index 4bc05e5dc0df..de171440a40e 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -41,7 +41,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: interface @I; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as I; +// CHECK:STDOUT: impl @impl: %C as %.1; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl { diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 058a7cbaa9a5..c6650edcfa15 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -23,14 +23,14 @@ impl as Simple { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -47,9 +47,9 @@ impl as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -57,8 +57,8 @@ impl as Simple { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: as Simple { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: 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 645c88150ce2..570a82fbd231 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -19,12 +19,12 @@ impl bool as I {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.3: = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,7 +34,7 @@ impl bool as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %bool.make_type [template = bool] @@ -44,9 +44,9 @@ impl bool as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %T [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -54,7 +54,7 @@ impl bool as I {} // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: bool as I { +// CHECK:STDOUT: impl @impl: bool as %.1 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // 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 dc72e46b20e5..42b48845a1df 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -217,87 +217,87 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self.1: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %NoF: type = class_type @NoF [template] // CHECK:STDOUT: %.5: type = struct_type {} [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] -// CHECK:STDOUT: %PossiblyF: = struct_value () [template] +// CHECK:STDOUT: %PossiblyF: %PossiblyF.type = struct_value () [template] // CHECK:STDOUT: %FAlias: type = class_type @FAlias [template] // CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %F.3: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %F.4: = struct_value () [template] +// CHECK:STDOUT: %F.4: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] -// CHECK:STDOUT: %F.5: = struct_value () [template] +// CHECK:STDOUT: %F.5: %F.type.4 = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @J [template] -// CHECK:STDOUT: %Self.2: J = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] -// CHECK:STDOUT: %F.6: = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @J, [template] -// CHECK:STDOUT: %.8: in J> = assoc_entity element0, @J.%F.decl [template] +// CHECK:STDOUT: %F.6: %F.type.5 = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @J, %F.type.5 [template] +// CHECK:STDOUT: %.8: %.7 = 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: = struct_value () [template] +// CHECK:STDOUT: %F.7: %F.type.6 = struct_value () [template] // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [template] // CHECK:STDOUT: %F.type.7: type = fn_type @F.7 [template] -// CHECK:STDOUT: %F.8: = struct_value () [template] +// CHECK:STDOUT: %F.8: %F.type.7 = struct_value () [template] // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [template] // CHECK:STDOUT: %F.type.8: type = fn_type @F.8 [template] -// CHECK:STDOUT: %F.9: = struct_value () [template] +// CHECK:STDOUT: %F.9: %F.type.8 = struct_value () [template] // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [template] // CHECK:STDOUT: %F.type.9: type = fn_type @F.9 [template] -// CHECK:STDOUT: %F.10: = struct_value () [template] +// CHECK:STDOUT: %F.10: %F.type.9 = struct_value () [template] // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [template] // CHECK:STDOUT: %F.type.10: type = fn_type @F.10 [template] -// CHECK:STDOUT: %F.11: = struct_value () [template] +// CHECK:STDOUT: %F.11: %F.type.10 = struct_value () [template] // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [template] // CHECK:STDOUT: %F.type.11: type = fn_type @F.11 [template] -// CHECK:STDOUT: %F.12: = struct_value () [template] +// CHECK:STDOUT: %F.12: %F.type.11 = struct_value () [template] // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [template] // CHECK:STDOUT: %F.type.12: type = fn_type @F.12 [template] -// CHECK:STDOUT: %F.13: = struct_value () [template] +// CHECK:STDOUT: %F.13: %F.type.12 = struct_value () [template] // CHECK:STDOUT: %.9: type = interface_type @SelfNested [template] -// CHECK:STDOUT: %Self.3: SelfNested = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.10: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Self.3: %.9 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.10: type = ptr_type %Self.3 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.x: Self, .y: i32} [symbolic] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] +// CHECK:STDOUT: %.11: type = struct_type {.x: %Self.3, .y: i32} [symbolic] // CHECK:STDOUT: %.12: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.13: type = tuple_type (Self*, {.x: Self, .y: i32}) [symbolic] +// CHECK:STDOUT: %.13: type = tuple_type (%.10, %.11) [symbolic] // CHECK:STDOUT: %.14: i32 = int_literal 4 [template] -// CHECK:STDOUT: %.15: type = array_type %.14, Self [symbolic] +// CHECK:STDOUT: %.15: type = array_type %.14, %Self.3 [symbolic] // CHECK:STDOUT: %F.type.13: type = fn_type @F.13 [template] -// CHECK:STDOUT: %F.14: = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type @SelfNested, [template] -// CHECK:STDOUT: %.17: in SelfNested> = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %F.14: %F.type.13 = struct_value () [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type @SelfNested, %F.type.13 [template] +// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [template] -// CHECK:STDOUT: %.18: type = ptr_type SelfNestedBadParam [template] +// CHECK:STDOUT: %.18: type = ptr_type %SelfNestedBadParam [template] // CHECK:STDOUT: %.19: type = struct_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %.20: type = tuple_type (SelfNestedBadParam*, {.x: i32, .y: i32}) [template] -// CHECK:STDOUT: %.21: type = array_type %.14, SelfNestedBadParam [template] +// CHECK:STDOUT: %.20: type = tuple_type (%.18, %.19) [template] +// CHECK:STDOUT: %.21: type = array_type %.14, %SelfNestedBadParam [template] // CHECK:STDOUT: %F.type.14: type = fn_type @F.14 [template] -// CHECK:STDOUT: %F.15: = struct_value () [template] -// CHECK:STDOUT: %.22: type = struct_type {.x: SelfNestedBadParam, .y: i32} [template] -// CHECK:STDOUT: %.23: type = tuple_type (SelfNestedBadParam*, {.x: SelfNestedBadParam, .y: i32}) [template] +// CHECK:STDOUT: %F.15: %F.type.14 = struct_value () [template] +// CHECK:STDOUT: %.22: type = struct_type {.x: %SelfNestedBadParam, .y: i32} [template] +// CHECK:STDOUT: %.23: type = tuple_type (%.18, %.22) [template] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.24: type = ptr_type SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.25: type = struct_type {.x: SelfNestedBadReturnType, .y: i32} [template] -// CHECK:STDOUT: %.26: type = tuple_type (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32}) [template] +// CHECK:STDOUT: %.24: type = ptr_type %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.25: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template] +// CHECK:STDOUT: %.26: type = tuple_type (%.24, %.25) [template] // CHECK:STDOUT: %F.type.15: type = fn_type @F.15 [template] -// CHECK:STDOUT: %F.16: = struct_value () [template] -// CHECK:STDOUT: %.27: type = array_type %.14, SelfNestedBadReturnType [template] +// CHECK:STDOUT: %F.16: %F.type.15 = struct_value () [template] +// CHECK:STDOUT: %.27: type = array_type %.14, %SelfNestedBadReturnType [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -327,52 +327,52 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %NoF.decl: type = class_decl @NoF [template = constants.%NoF] {} // CHECK:STDOUT: %FNotFunction.decl: type = class_decl @FNotFunction [template = constants.%FNotFunction] {} -// CHECK:STDOUT: %PossiblyF.decl: = fn_decl @PossiblyF [template = constants.%PossiblyF] {} +// CHECK:STDOUT: %PossiblyF.decl: %PossiblyF.type = fn_decl @PossiblyF [template = constants.%PossiblyF] {} // CHECK:STDOUT: %FAlias.decl: type = class_decl @FAlias [template = constants.%FAlias] {} // CHECK:STDOUT: %FExtraParam.decl: type = class_decl @FExtraParam [template = constants.%FExtraParam] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FExtraImplicitParam.decl: type = class_decl @FExtraImplicitParam [template = constants.%FExtraImplicitParam] {} // CHECK:STDOUT: %FExtraReturnType.decl: type = class_decl @FExtraReturnType [template = constants.%FExtraReturnType] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.6] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FMissingParam.decl: type = class_decl @FMissingParam [template = constants.%FMissingParam] {} -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FMissingImplicitParam.decl: type = class_decl @FMissingImplicitParam [template = constants.%FMissingImplicitParam] {} -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FMissingReturnType.decl: type = class_decl @FMissingReturnType [template = constants.%FMissingReturnType] {} -// CHECK:STDOUT: %import_ref.10: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.11: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.10: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.11: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentParamType.decl: type = class_decl @FDifferentParamType [template = constants.%FDifferentParamType] {} -// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.13: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.12: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.13: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentImplicitParamType.decl: type = class_decl @FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] {} -// CHECK:STDOUT: %import_ref.14: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.15: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.14: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.15: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentReturnType.decl: type = class_decl @FDifferentReturnType [template = constants.%FDifferentReturnType] {} -// CHECK:STDOUT: %import_ref.16: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.17: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.16: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.17: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentParamName.decl: type = class_decl @FDifferentParamName [template = constants.%FDifferentParamName] {} -// CHECK:STDOUT: %import_ref.18: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.19: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.20: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.18: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.19: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.20: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%.9] {} -// CHECK:STDOUT: %import_ref.21: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SelfNestedBadParam.decl: type = class_decl @SelfNestedBadParam [template = constants.%SelfNestedBadParam] {} -// CHECK:STDOUT: %import_ref.22: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.23: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.22: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.23: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SelfNestedBadReturnType.decl: type = class_decl @SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] {} -// CHECK:STDOUT: %import_ref.24: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.24: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc11: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = 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: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -381,8 +381,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: J = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %F.decl: = fn_decl @F.5 [template = constants.%F.6] { +// CHECK:STDOUT: %Self: %.6 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %F.decl: %F.type.5 = fn_decl @F.5 [template = constants.%F.6] { // CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_26.1: type = value_of_initializer %bool.make_type.loc93_26 [template = bool] // CHECK:STDOUT: %.loc93_26.2: type = converted %bool.make_type.loc93_26, %.loc93_26.1 [template = bool] @@ -398,7 +398,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc93_44.2: type = converted %bool.make_type.loc93_44, %.loc93_44.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc93_48: in J> = assoc_entity element0, %F.decl [template = constants.%.8] +// CHECK:STDOUT: %.loc93_48: %.7 = assoc_entity element0, %F.decl [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -407,31 +407,31 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { -// CHECK:STDOUT: %Self: SelfNested = bind_symbolic_name Self 0 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %F.decl: = fn_decl @F.13 [template = constants.%F.14] { -// CHECK:STDOUT: %Self.ref.loc188_12: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.3] +// CHECK:STDOUT: %Self: %.9 = 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: %Self.ref.loc188_12: %.9 = name_ref Self, %Self [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_16.1: type = facet_type_access %Self.ref.loc188_12 [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_16.2: type = converted %Self.ref.loc188_12, %.loc188_16.1 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %.loc188_16.3: type = ptr_type Self [symbolic = constants.%.10] -// CHECK:STDOUT: %Self.ref.loc188_24: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.3] +// CHECK:STDOUT: %.loc188_16.3: type = ptr_type %Self.3 [symbolic = constants.%.10] +// CHECK:STDOUT: %Self.ref.loc188_24: %.9 = name_ref Self, %Self [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_24.1: type = facet_type_access %Self.ref.loc188_24 [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = 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: type = struct_type {.x: Self, .y: i32} [symbolic = constants.%.11] -// CHECK:STDOUT: %.loc188_38.1: (type, type) = tuple_literal (%.loc188_16.3, %.loc188_37) +// CHECK:STDOUT: %.loc188_37: type = struct_type {.x: %Self.3, .y: i32} [symbolic = constants.%.11] +// CHECK:STDOUT: %.loc188_38.1: %.12 = tuple_literal (%.loc188_16.3, %.loc188_37) // CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%.13 [symbolic = constants.%.13] -// CHECK:STDOUT: %x.loc188_8.1: (Self*, {.x: Self, .y: i32}) = param x -// CHECK:STDOUT: %x.loc188_8.2: (Self*, {.x: Self, .y: i32}) = bind_name x, %x.loc188_8.1 -// CHECK:STDOUT: %Self.ref.loc188_45: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.3] +// CHECK:STDOUT: %x.loc188_8.1: %.13 = param x +// CHECK:STDOUT: %x.loc188_8.2: %.13 = bind_name x, %x.loc188_8.1 +// CHECK:STDOUT: %Self.ref.loc188_45: %.9 = name_ref Self, %Self [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_51: i32 = int_literal 4 [template = constants.%.14] // CHECK:STDOUT: %.loc188_45.1: type = facet_type_access %Self.ref.loc188_45 [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_45.2: type = converted %Self.ref.loc188_45, %.loc188_45.1 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %.loc188_52: type = array_type %.loc188_51, Self [symbolic = constants.%.15] -// CHECK:STDOUT: %return.var: ref [Self; 4] = var +// CHECK:STDOUT: %.loc188_52: type = array_type %.loc188_51, %Self.3 [symbolic = constants.%.15] +// CHECK:STDOUT: %return.var: ref %.15 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc188_53: in SelfNested> = assoc_entity element0, %F.decl [template = constants.%.17] +// CHECK:STDOUT: %.loc188_53: %.16 = assoc_entity element0, %F.decl [template = constants.%.17] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -439,14 +439,14 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: NoF as I { +// CHECK:STDOUT: impl @impl.1: %NoF as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: FNotFunction as I { +// CHECK:STDOUT: impl @impl.2: %FNotFunction as %.1 { // CHECK:STDOUT: %F.decl: type = class_decl @F.16 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: @@ -455,9 +455,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3: FAlias as I { -// CHECK:STDOUT: %PossiblyF.ref: = name_ref PossiblyF, file.%PossiblyF.decl [template = constants.%PossiblyF] -// CHECK:STDOUT: %F: = bind_alias F, file.%PossiblyF.decl [template = constants.%PossiblyF] +// CHECK:STDOUT: impl @impl.3: %FAlias as %.1 { +// CHECK:STDOUT: %PossiblyF.ref: %PossiblyF.type = name_ref PossiblyF, file.%PossiblyF.decl [template = constants.%PossiblyF] +// CHECK:STDOUT: %F: %PossiblyF.type = bind_alias F, file.%PossiblyF.decl [template = constants.%PossiblyF] // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -465,8 +465,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4: FExtraParam as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.3] { +// CHECK:STDOUT: impl @impl.4: %FExtraParam as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.3] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc62_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc62_13.2: type = converted %bool.make_type, %.loc62_13.1 [template = bool] @@ -480,11 +480,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.5: FExtraImplicitParam as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.4] { +// CHECK:STDOUT: impl @impl.5: %FExtraImplicitParam as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.4] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] -// CHECK:STDOUT: %self.loc75_10.1: FExtraImplicitParam = param self -// CHECK:STDOUT: %self.loc75_10.2: FExtraImplicitParam = bind_name self, %self.loc75_10.1 +// CHECK:STDOUT: %self.loc75_10.1: %FExtraImplicitParam = param self +// CHECK:STDOUT: %self.loc75_10.2: %FExtraImplicitParam = bind_name self, %self.loc75_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: @@ -493,8 +493,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.6: FExtraReturnType as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.4 [template = constants.%F.5] { +// CHECK:STDOUT: impl @impl.6: %FExtraReturnType as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.4 = fn_decl @F.4 [template = constants.%F.5] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc89_15.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc89_15.2: type = converted %bool.make_type, %.loc89_15.1 [template = bool] @@ -507,8 +507,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.7: FMissingParam as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.6 [template = constants.%F.7] { +// CHECK:STDOUT: impl @impl.7: %FMissingParam as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.6 = fn_decl @F.6 [template = constants.%F.7] { // CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc104_16.1: type = value_of_initializer %bool.make_type.loc104_16 [template = bool] // CHECK:STDOUT: %.loc104_16.2: type = converted %bool.make_type.loc104_16, %.loc104_16.1 [template = bool] @@ -526,8 +526,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.8: FMissingImplicitParam as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.7 [template = constants.%F.8] { +// CHECK:STDOUT: impl @impl.8: %FMissingImplicitParam as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.7 = fn_decl @F.7 [template = constants.%F.8] { // CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc117_13.1: type = value_of_initializer %bool.make_type.loc117_13 [template = bool] // CHECK:STDOUT: %.loc117_13.2: type = converted %bool.make_type.loc117_13, %.loc117_13.1 [template = bool] @@ -545,8 +545,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.9: FMissingReturnType as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.8 [template = constants.%F.9] { +// CHECK:STDOUT: impl @impl.9: %FMissingReturnType as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.8 = fn_decl @F.8 [template = constants.%F.9] { // CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc130_16.1: type = value_of_initializer %bool.make_type.loc130_16 [template = bool] // CHECK:STDOUT: %.loc130_16.2: type = converted %bool.make_type.loc130_16, %.loc130_16.1 [template = bool] @@ -565,16 +565,16 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.10: FDifferentParamType as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.9 [template = constants.%F.10] { +// CHECK:STDOUT: impl @impl.10: %FDifferentParamType as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.9 = fn_decl @F.9 [template = constants.%F.10] { // CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_16.1: type = value_of_initializer %bool.make_type.loc143_16 [template = bool] // CHECK:STDOUT: %.loc143_16.2: type = converted %bool.make_type.loc143_16, %.loc143_16.1 [template = bool] // CHECK:STDOUT: %self.loc143_10.1: bool = param self // CHECK:STDOUT: %self.loc143_10.2: bool = bind_name self, %self.loc143_10.1 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] -// CHECK:STDOUT: %b.loc143_22.1: FDifferentParamType = param b -// CHECK:STDOUT: %b.loc143_22.2: FDifferentParamType = bind_name b, %b.loc143_22.1 +// CHECK:STDOUT: %b.loc143_22.1: %FDifferentParamType = param b +// CHECK:STDOUT: %b.loc143_22.2: %FDifferentParamType = bind_name b, %b.loc143_22.1 // CHECK:STDOUT: %bool.make_type.loc143_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_34.1: type = value_of_initializer %bool.make_type.loc143_34 [template = bool] // CHECK:STDOUT: %.loc143_34.2: type = converted %bool.make_type.loc143_34, %.loc143_34.1 [template = bool] @@ -587,11 +587,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.11: FDifferentImplicitParamType as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.10 [template = constants.%F.11] { +// CHECK:STDOUT: impl @impl.11: %FDifferentImplicitParamType as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.10 = fn_decl @F.10 [template = constants.%F.11] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] -// CHECK:STDOUT: %self.loc156_10.1: FDifferentImplicitParamType = param self -// CHECK:STDOUT: %self.loc156_10.2: FDifferentImplicitParamType = bind_name self, %self.loc156_10.1 +// CHECK:STDOUT: %self.loc156_10.1: %FDifferentImplicitParamType = param self +// CHECK:STDOUT: %self.loc156_10.2: %FDifferentImplicitParamType = bind_name self, %self.loc156_10.1 // CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc156_25.1: type = value_of_initializer %bool.make_type.loc156_25 [template = bool] // CHECK:STDOUT: %.loc156_25.2: type = converted %bool.make_type.loc156_25, %.loc156_25.1 [template = bool] @@ -609,8 +609,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.12: FDifferentReturnType as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.11 [template = constants.%F.12] { +// CHECK:STDOUT: impl @impl.12: %FDifferentReturnType as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.11 = fn_decl @F.11 [template = constants.%F.12] { // CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc169_16.1: type = value_of_initializer %bool.make_type.loc169_16 [template = bool] // CHECK:STDOUT: %.loc169_16.2: type = converted %bool.make_type.loc169_16, %.loc169_16.1 [template = bool] @@ -622,7 +622,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.loc169_22.1: bool = param b // CHECK:STDOUT: %b.loc169_22.2: bool = bind_name b, %b.loc169_22.1 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] -// CHECK:STDOUT: %return.var: ref FDifferentReturnType = var +// CHECK:STDOUT: %return.var: ref %FDifferentReturnType = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: @@ -631,8 +631,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.13: FDifferentParamName as J { -// CHECK:STDOUT: %F.decl: = fn_decl @F.12 [template = constants.%F.13] { +// CHECK:STDOUT: impl @impl.13: %FDifferentParamName as %.6 { +// CHECK:STDOUT: %F.decl: %F.type.12 = fn_decl @F.12 [template = constants.%F.13] { // CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_16.1: type = value_of_initializer %bool.make_type.loc183_16 [template = bool] // CHECK:STDOUT: %.loc183_16.2: type = converted %bool.make_type.loc183_16, %.loc183_16.1 [template = bool] @@ -655,10 +655,10 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.14: SelfNestedBadParam as SelfNested { -// CHECK:STDOUT: %F.decl: = fn_decl @F.14 [template = constants.%F.15] { +// CHECK:STDOUT: impl @impl.14: %SelfNestedBadParam as %.9 { +// CHECK:STDOUT: %F.decl: %F.type.14 = fn_decl @F.14 [template = constants.%F.15] { // 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.%.18] +// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.18] // 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] @@ -666,14 +666,14 @@ class SelfNestedBadReturnType { // 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.%.19] -// CHECK:STDOUT: %.loc200_53.1: (type, type) = tuple_literal (%.loc200_32, %.loc200_52) +// CHECK:STDOUT: %.loc200_53.1: %.12 = tuple_literal (%.loc200_32, %.loc200_52) // CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%.20 [template = constants.%.20] -// CHECK:STDOUT: %x.loc200_10.1: (SelfNestedBadParam*, {.x: i32, .y: i32}) = param x -// CHECK:STDOUT: %x.loc200_10.2: (SelfNestedBadParam*, {.x: i32, .y: i32}) = bind_name x, %x.loc200_10.1 +// CHECK:STDOUT: %x.loc200_10.1: %.20 = param x +// CHECK:STDOUT: %x.loc200_10.2: %.20 = bind_name x, %x.loc200_10.1 // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %.loc200_80: i32 = int_literal 4 [template = constants.%.14] -// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, SelfNestedBadParam [template = constants.%.21] -// CHECK:STDOUT: %return.var: ref [SelfNestedBadParam; 4] = var +// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.21] +// CHECK:STDOUT: %return.var: ref %.21 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: @@ -682,23 +682,23 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.15: SelfNestedBadReturnType as SelfNested { -// CHECK:STDOUT: %F.decl: = fn_decl @F.15 [template = constants.%F.16] { +// CHECK:STDOUT: impl @impl.15: %SelfNestedBadReturnType as %.9 { +// CHECK:STDOUT: %F.decl: %F.type.15 = fn_decl @F.15 [template = constants.%F.16] { // 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.%.24] +// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.24] // 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.%.25] -// CHECK:STDOUT: %.loc212_78.1: (type, type) = tuple_literal (%.loc212_37, %.loc212_77) +// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template = constants.%.25] +// CHECK:STDOUT: %.loc212_78.1: %.12 = tuple_literal (%.loc212_37, %.loc212_77) // CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%.26 [template = constants.%.26] -// CHECK:STDOUT: %x.loc212_10.1: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32}) = param x -// CHECK:STDOUT: %x.loc212_10.2: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32}) = bind_name x, %x.loc212_10.1 +// CHECK:STDOUT: %x.loc212_10.1: %.26 = param x +// CHECK:STDOUT: %x.loc212_10.2: %.26 = bind_name x, %x.loc212_10.1 // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %.loc212_105: i32 = int_literal 4 [template = constants.%.14] -// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, SelfNestedBadParam [template = constants.%.21] -// CHECK:STDOUT: %return.var: ref [SelfNestedBadParam; 4] = var +// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.21] +// CHECK:STDOUT: %return.var: ref %.21 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: @@ -852,7 +852,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(@impl.4.%b.loc62_10.2: bool); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3[@impl.5.%self.loc75_10.2: FExtraImplicitParam](); +// CHECK:STDOUT: fn @F.3[@impl.5.%self.loc75_10.2: %FExtraImplicitParam](); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.4() -> bool; // CHECK:STDOUT: @@ -864,19 +864,19 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.8[@impl.9.%self.loc130_10.2: bool](@impl.9.%b.loc130_22.2: bool); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.9[@impl.10.%self.loc143_10.2: bool](@impl.10.%b.loc143_22.2: FDifferentParamType) -> bool; +// CHECK:STDOUT: fn @F.9[@impl.10.%self.loc143_10.2: bool](@impl.10.%b.loc143_22.2: %FDifferentParamType) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.10[@impl.11.%self.loc156_10.2: FDifferentImplicitParamType](@impl.11.%b.loc156_22.2: bool) -> bool; +// CHECK:STDOUT: fn @F.10[@impl.11.%self.loc156_10.2: %FDifferentImplicitParamType](@impl.11.%b.loc156_22.2: bool) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.11[@impl.12.%self.loc169_10.2: bool](@impl.12.%b.loc169_22.2: bool) -> FDifferentReturnType; +// CHECK:STDOUT: fn @F.11[@impl.12.%self.loc169_10.2: bool](@impl.12.%b.loc169_22.2: bool) -> %FDifferentReturnType; // CHECK:STDOUT: // CHECK:STDOUT: fn @F.12[@impl.13.%self.loc183_10.2: bool](@impl.13.%not_b.loc183_22.2: bool) -> bool; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.13(@SelfNested.%x.loc188_8.2: (Self*, {.x: Self, .y: i32})) -> [Self; 4]; +// CHECK:STDOUT: fn @F.13(@SelfNested.%x.loc188_8.2: %.13) -> %.15; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.14(@impl.14.%x.loc200_10.2: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> [SelfNestedBadParam; 4]; +// CHECK:STDOUT: fn @F.14(@impl.14.%x.loc200_10.2: %.20) -> %.21; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.15(@impl.15.%x.loc212_10.2: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> [SelfNestedBadParam; 4]; +// CHECK:STDOUT: fn @F.15(@impl.15.%x.loc212_10.2: %.26) -> %.21; // 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 daeaf2488177..0f1a2001c742 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -22,7 +22,7 @@ impl i32 as false {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -31,7 +31,7 @@ impl i32 as false {} // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_6.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon index 77304f24e027..2c54429b28a9 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon @@ -19,7 +19,7 @@ impl true as I {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } @@ -38,14 +38,14 @@ impl true as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: as I { +// CHECK:STDOUT: impl @impl: as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 7e8743880362..fe1d091870de 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -24,10 +24,10 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,14 +38,14 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32.loc13, %.loc13_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] @@ -55,14 +55,14 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as I { +// CHECK:STDOUT: impl @impl: i32 as %.1 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } 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 cf904688ab84..0d5fb0302552 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -19,12 +19,12 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.3: = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,7 +34,7 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %bool.make_type [template = bool] @@ -44,9 +44,9 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc11: = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %T [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -54,7 +54,7 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: bool as I; +// CHECK:STDOUT: impl @impl: bool as %.1; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 4ba24c8d86ce..283e3af4bb14 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -25,19 +25,19 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = 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: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,9 +52,9 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -62,8 +62,8 @@ class C { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Simple { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -85,11 +85,11 @@ class C { // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: // 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: {} = 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: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var +// CHECK:STDOUT: %.loc19_19.1: %.6 = 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 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 517af5f83503..c3a67fc05e0d 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -20,15 +20,15 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -48,9 +48,9 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -58,8 +58,8 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: T as Simple { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %T as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index d404bb5c45d7..fb8f2bc4fee3 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -29,20 +29,20 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] -// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,17 +59,17 @@ fn G(c: C) { // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, %HasF.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc23_6.1: C = param c -// CHECK:STDOUT: @G.%c: C = bind_name c, %c.loc23_6.1 +// CHECK:STDOUT: %c.loc23_6.1: %C = param c +// CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc23_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -77,8 +77,8 @@ fn G(c: C) { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -88,8 +88,8 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: in HasF> = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %G: in HasF> = bind_alias G, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %G: %.3 = bind_alias G, @HasF.%.loc12 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -103,16 +103,16 @@ fn G(c: C) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%c: C) { +// CHECK:STDOUT: fn @G(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: in HasF> = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc24: init () = call %.1() -// CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: in HasF> = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.2: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc25: init () = call %.2() +// CHECK:STDOUT: %G.ref.loc24: %.3 = name_ref G, @C.%G [template = constants.%.4] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc24: init %.2 = call %.1() +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %G.ref.loc25: %.3 = name_ref G, @C.%G [template = constants.%.4] +// CHECK:STDOUT: %.2: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc25: init %.2 = call %.2() // 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 700c54109c54..9733947d94b0 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 @@ -32,17 +32,17 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type {} [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,17 +55,17 @@ fn F(c: C) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc19_6.1: C = param c -// CHECK:STDOUT: @F.2.%c: C = bind_name c, %c.loc19_6.1 +// CHECK:STDOUT: %c.loc19_6.1: %C = param c +// CHECK:STDOUT: @F.2.%c: %C = bind_name c, %c.loc19_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -75,8 +75,8 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %F: in I> = bind_alias F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F: %.3 = bind_alias F, @I.%.loc12 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -85,12 +85,12 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2(%c: C) { +// CHECK:STDOUT: fn @F.2(%c: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc24: in I> = name_ref F, @C.%F [template = constants.%.4] -// CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc28: in I> = name_ref F, @C.%F [template = constants.%.4] +// CHECK:STDOUT: %F.ref.loc24: %.3 = name_ref F, @C.%F [template = constants.%.4] +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %F.ref.loc28: %.3 = name_ref F, @C.%F [template = constants.%.4] // 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 5b04635a9b8f..1ce85dc0c2b4 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -32,20 +32,20 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -59,8 +59,8 @@ impl C as I { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // 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] @@ -73,9 +73,9 @@ impl C as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -83,8 +83,8 @@ impl C as I { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -109,7 +109,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: in I> = name_ref F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12 [template = constants.%.4] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index eca714a353da..e22670db3ce4 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -34,16 +34,16 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] -// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -63,9 +63,9 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc5: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc5: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -73,8 +73,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -100,17 +100,17 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, [template] -// CHECK:STDOUT: %.6: in HasF> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, %F.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.8 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -123,16 +123,16 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Impl: = namespace [template] {} // CHECK:STDOUT: %import_ref.1 = import_ref ir8, inst+14, unloaded -// CHECK:STDOUT: %import_ref.2: in HasF> = import_ref ir8, inst+11, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.2: %.5 = import_ref ir8, inst+11, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.3 = import_ref ir8, inst+4, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir8, inst+6, unloaded // CHECK:STDOUT: %import_ref.5: = import_ref ir8, inst+22, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6: type = import_ref ir8, inst+13, loaded [template = constants.%C] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, %Impl [template = %Impl] // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.6 [template = constants.%C] -// CHECK:STDOUT: %c.loc4_6.1: C = param c -// CHECK:STDOUT: @G.%c: C = bind_name c, %c.loc4_6.1 +// CHECK:STDOUT: %c.loc4_6.1: %C = param c +// CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.7: type = import_ref ir8, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.8 = import_ref ir8, inst+6, unloaded @@ -145,21 +145,21 @@ fn G(c: Impl.C) { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as HasF; +// CHECK:STDOUT: impl @impl: %C as %.2; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = file.%import_ref.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%c: C) { +// CHECK:STDOUT: fn @G(%c: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: C = name_ref c, %c +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %Impl.ref: = name_ref Impl, file.%Impl [template = file.%Impl] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%import_ref.7 [template = constants.%.2] -// CHECK:STDOUT: %F.ref: in HasF> = name_ref F, file.%import_ref.2 [template = constants.%.6] -// CHECK:STDOUT: %.1: = interface_witness_access file.%import_ref.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init () = call %.1() +// CHECK:STDOUT: %F.ref: %.5 = name_ref F, file.%import_ref.2 [template = constants.%.6] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access file.%import_ref.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.3 = call %.1() // CHECK:STDOUT: return // 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 36a4f2fd9200..53e313debdb2 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -29,21 +29,21 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %F.3: = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] +// CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,14 +56,14 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl.loc11: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %C.decl.loc17: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl.loc11 [template = constants.%C] -// CHECK:STDOUT: %c.loc23_6.1: C = param c -// CHECK:STDOUT: @F.3.%c: C = bind_name c, %c.loc23_6.1 +// CHECK:STDOUT: %c.loc23_6.1: %C = param c +// CHECK:STDOUT: @F.3.%c: %C = bind_name c, %c.loc23_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc23_15.2: type = converted %int.make_type_32, %.loc23_15.1 [template = i32] @@ -72,19 +72,19 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %Self.ref: I = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc14_8.1: Self = param self -// CHECK:STDOUT: %self.loc14_8.2: Self = bind_name self, %self.loc14_8.1 +// CHECK:STDOUT: %self.loc14_8.1: %Self = param self +// CHECK:STDOUT: %self.loc14_8.2: %Self = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_32, %.loc14_25.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_28: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc14_28: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -92,11 +92,11 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc19_10.1: C = param self -// CHECK:STDOUT: %self.loc19_10.2: C = bind_name self, %self.loc19_10.1 +// CHECK:STDOUT: %self.loc19_10.1: %C = param self +// CHECK:STDOUT: %self.loc19_10.2: %C = bind_name self, %self.loc19_10.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_27.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_27.2: type = converted %int.make_type_32, %.loc19_27.1 [template = i32] @@ -121,15 +121,15 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[@I.%self.loc14_8.2: Self]() -> i32; +// CHECK:STDOUT: fn @F.1[@I.%self.loc14_8.2: %Self]() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[@impl.%self.loc19_10.2: C]() -> i32; +// CHECK:STDOUT: fn @F.2[@impl.%self.loc19_10.2: %C]() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3(%c: C) -> i32 { +// CHECK:STDOUT: fn @F.3(%c: %C) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc14_28 [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14_28 [template = constants.%.4] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc24_11: = bound_method %c.ref, %.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc24_11(%c.ref) // CHECK:STDOUT: %.loc24_15.1: i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index bb31ef90b8f3..9bf62dd72810 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -34,16 +34,16 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] -// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -61,9 +61,9 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc5: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc5: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -71,8 +71,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -98,17 +98,17 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @HasF [template] -// CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.1 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, [template] -// CHECK:STDOUT: %.6: in HasF> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, %F.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.8 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -119,16 +119,16 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: %Impl: = namespace [template] {} // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+13, unloaded -// CHECK:STDOUT: %import_ref.2: in HasF> = import_ref ir1, inst+10, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.2: %.5 = import_ref ir1, inst+10, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+5, unloaded // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+21, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6: type = import_ref ir1, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, %Impl [template = %Impl] // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.6 [template = constants.%C] -// CHECK:STDOUT: %c.loc4_6.1: C = param c -// CHECK:STDOUT: @G.%c: C = bind_name c, %c.loc4_6.1 +// CHECK:STDOUT: %c.loc4_6.1: %C = param c +// CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.7: type = import_ref ir1, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+5, unloaded @@ -141,21 +141,21 @@ fn G(c: Impl.C) { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as HasF; +// CHECK:STDOUT: impl @impl: %C as %.2; // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = file.%import_ref.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%c: C) { +// CHECK:STDOUT: fn @G(%c: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: C = name_ref c, %c +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %Impl.ref: = name_ref Impl, file.%Impl [template = file.%Impl] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%import_ref.7 [template = constants.%.2] -// CHECK:STDOUT: %F.ref: in HasF> = name_ref F, file.%import_ref.2 [template = constants.%.6] -// CHECK:STDOUT: %.1: = interface_witness_access file.%import_ref.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init () = call %.1() +// CHECK:STDOUT: %F.ref: %.5 = name_ref F, file.%import_ref.2 [template = constants.%.6] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access file.%import_ref.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.3 = call %.1() // 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 7c2651b69e5c..ced230f49ccb 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -22,16 +22,16 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] -// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -49,9 +49,9 @@ impl C as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -59,8 +59,8 @@ impl C as Simple { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Simple { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index effb4687eec5..43635e505d50 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -34,12 +34,12 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Op: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.4: in Add> = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %Op: %Op.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, %Op.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,24 +50,24 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Op.decl: = fn_decl @Op [template = constants.%Op] { -// CHECK:STDOUT: %Self.ref.loc5_15: Add = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] { +// CHECK:STDOUT: %Self.ref.loc5_15: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_15.1: type = facet_type_access %Self.ref.loc5_15 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %.loc5_15.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc5_9.1: Self = param self -// CHECK:STDOUT: %self.loc5_9.2: Self = bind_name self, %self.loc5_9.1 -// CHECK:STDOUT: %Self.ref.loc5_28: Add = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %self.loc5_9.1: %Self = param self +// CHECK:STDOUT: %self.loc5_9.2: %Self = bind_name self, %self.loc5_9.1 +// CHECK:STDOUT: %Self.ref.loc5_28: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_28.1: type = facet_type_access %Self.ref.loc5_28 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %.loc5_28.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %other.loc5_21.1: Self = param other -// CHECK:STDOUT: %other.loc5_21.2: Self = bind_name other, %other.loc5_21.1 -// CHECK:STDOUT: %Self.ref.loc5_37: Add = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %other.loc5_21.1: %Self = param other +// CHECK:STDOUT: %other.loc5_21.2: %Self = bind_name other, %other.loc5_21.1 +// CHECK:STDOUT: %Self.ref.loc5_37: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_37.1: type = facet_type_access %Self.ref.loc5_37 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %.loc5_37.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_41: in Add> = assoc_entity element0, %Op.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc5_41: %.3 = assoc_entity element0, %Op.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -75,24 +75,24 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: witness = (%Op.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op[@Add.%self.loc5_9.2: Self](@Add.%other.loc5_21.2: Self) -> Self; +// CHECK:STDOUT: fn @Op[@Add.%self.loc5_9.2: %Self](@Add.%other.loc5_21.2: %Self) -> %Self; // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.5: in Add> = assoc_entity element0, file.%import_ref.5 [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type @Add, %Op.type.2 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, file.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -101,26 +101,26 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+1, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.2: in Add> = import_ref ir1, inst+24, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: %.4 = import_ref ir1, inst+24, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+19, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir1, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %.loc6_7.1: () = tuple_literal () +// 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: %Add.ref: type = name_ref Add, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %.loc10_10.1: () = tuple_literal () +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// 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: %x.loc10_6.1: () = param x -// CHECK:STDOUT: @F.%x: () = bind_name x, %x.loc10_6.1 -// CHECK:STDOUT: %.loc10_17.1: () = tuple_literal () +// CHECK:STDOUT: %x.loc10_6.1: %.1 = param x +// CHECK:STDOUT: @F.%x: %.1 = bind_name x, %x.loc10_6.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: %y.loc10_13.1: () = param y -// CHECK:STDOUT: @F.%y: () = bind_name y, %y.loc10_13.1 -// CHECK:STDOUT: %.loc10_24.1: () = tuple_literal () +// CHECK:STDOUT: %y.loc10_13.1: %.1 = param y +// CHECK:STDOUT: @F.%y: %.1 = bind_name y, %y.loc10_13.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: @F.%return: ref () = var +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+19, unloaded // CHECK:STDOUT: } @@ -132,16 +132,16 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: () as Add { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl: %.1 as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %self.loc7_9.1: () = param self -// CHECK:STDOUT: %self.loc7_9.2: () = bind_name self, %self.loc7_9.1 +// CHECK:STDOUT: %self.loc7_9.1: %.1 = param self +// CHECK:STDOUT: %self.loc7_9.2: %.1 = bind_name self, %self.loc7_9.1 // CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %other.loc7_21.1: () = param other -// CHECK:STDOUT: %other.loc7_21.2: () = bind_name other, %other.loc7_21.1 +// CHECK:STDOUT: %other.loc7_21.1: %.1 = param other +// CHECK:STDOUT: %other.loc7_21.2: %.1 = bind_name other, %other.loc7_21.1 // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %return.var: ref () = var +// CHECK:STDOUT: %return.var: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: @@ -150,29 +150,29 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.%self.loc7_9.2: ()](@impl.%other.loc7_21.2: ()) -> () { +// CHECK:STDOUT: fn @Op.1[@impl.%self.loc7_9.2: %.1](@impl.%other.loc7_21.2: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_52: () = tuple_literal () -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_53: () = converted %.loc7_52, %tuple [template = constants.%tuple] +// 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: return %.loc7_53 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self](%other: %Self) -> %Self; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%x: (), %y: ()) -> () { +// CHECK:STDOUT: fn @F(%x: %.1, %y: %.1) -> %.1 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: () = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.1 = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%import_ref.1 [template = constants.%.2] -// CHECK:STDOUT: %Op.ref: in Add> = name_ref Op, file.%import_ref.2 [template = constants.%.5] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.4 = name_ref Op, file.%import_ref.2 [template = constants.%.5] +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc11_11: = bound_method %x.ref, %.1 -// CHECK:STDOUT: %y.ref: () = name_ref y, %y -// CHECK:STDOUT: %Op.call: init () = call %.loc11_11(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc11_20.1: ref () = temporary_storage -// CHECK:STDOUT: %.loc11_20.2: ref () = temporary %.loc11_20.1, %Op.call -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_23: () = converted %Op.call, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %y.ref: %.1 = name_ref y, %y +// CHECK:STDOUT: %Op.call: init %.1 = call %.loc11_11(%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: return %.loc11_23 // 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 f0f116b279f9..93f160827cb4 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -26,20 +26,20 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @DefaultConstructible [template] -// CHECK:STDOUT: %Self: DefaultConstructible = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Make.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @DefaultConstructible, [template] -// CHECK:STDOUT: %.4: in DefaultConstructible> = assoc_entity element0, @DefaultConstructible.%Make.decl [template] +// CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @DefaultConstructible, %Make.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] -// CHECK:STDOUT: %Make.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,14 +54,14 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @DefaultConstructible { -// CHECK:STDOUT: %Self: DefaultConstructible = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Make.decl: = fn_decl @Make.1 [template = constants.%Make.1] { -// CHECK:STDOUT: %Self.ref: DefaultConstructible = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Make.decl: %Make.type.1 = fn_decl @Make.1 [template = constants.%Make.1] { +// CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_16.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_16.2: type = converted %Self.ref, %.loc12_16.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_20: in DefaultConstructible> = assoc_entity element0, %Make.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_20: %.3 = assoc_entity element0, %Make.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -69,10 +69,10 @@ class A { // CHECK:STDOUT: witness = (%Make.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as DefaultConstructible { -// CHECK:STDOUT: %Make.decl: = fn_decl @Make.2 [template = constants.%Make.2] { +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %Make.decl: %Make.type.2 = fn_decl @Make.2 [template = constants.%Make.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Make.decl) [template = constants.%.6] // CHECK:STDOUT: @@ -96,13 +96,13 @@ class A { // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make.1() -> Self; +// CHECK:STDOUT: fn @Make.1() -> %Self; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Make.2() -> @impl.%return.var: C { +// CHECK:STDOUT: fn @Make.2() -> @impl.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_33.1: {} = struct_literal () -// CHECK:STDOUT: %.loc21_33.2: init C = class_init (), @impl.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc21_34: init C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc21_33.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc21_33.2: init %C = class_init (), @impl.%return.var [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 @impl.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: 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 21bd3bc74204..3b464a1a2c35 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -40,45 +40,45 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @UseSelf [template] -// CHECK:STDOUT: %Self.1: UseSelf = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, [template] -// CHECK:STDOUT: %.4: in UseSelf> = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct.1: C = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.5 [template] +// CHECK:STDOUT: %struct.1: %C = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %struct.2: D = struct_value () [template] +// CHECK:STDOUT: %struct.2: %D = struct_value () [template] // CHECK:STDOUT: %.9: type = interface_type @SelfNested [template] -// CHECK:STDOUT: %Self.2: SelfNested = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.10: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %.11: type = struct_type {.x: Self, .y: ()} [symbolic] +// CHECK:STDOUT: %Self.2: %.9 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.10: type = ptr_type %Self.2 [symbolic] +// CHECK:STDOUT: %.11: type = struct_type {.x: %Self.2, .y: %.2} [symbolic] // CHECK:STDOUT: %.12: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.13: type = tuple_type (Self*, {.x: Self, .y: ()}) [symbolic] +// CHECK:STDOUT: %.13: type = tuple_type (%.10, %.11) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] -// CHECK:STDOUT: %F.4: = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type @SelfNested, [template] -// CHECK:STDOUT: %.15: in SelfNested> = assoc_entity element0, @SelfNested.%F.decl [template] -// CHECK:STDOUT: %.16: type = ptr_type C [template] -// CHECK:STDOUT: %.17: type = struct_type {.x: C, .y: ()} [template] -// CHECK:STDOUT: %.18: type = tuple_type (C*, {.x: C, .y: ()}) [template] +// CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] +// CHECK:STDOUT: %.14: type = assoc_entity_type @SelfNested, %F.type.4 [template] +// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.16: type = ptr_type %C [template] +// CHECK:STDOUT: %.17: type = struct_type {.x: %C, .y: %.2} [template] +// CHECK:STDOUT: %.18: type = tuple_type (%.16, %.17) [template] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] -// CHECK:STDOUT: %F.5: = struct_value () [template] +// CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [template] // CHECK:STDOUT: %.19: = interface_witness (%F.5) [template] -// CHECK:STDOUT: %.20: type = ptr_type D [template] -// CHECK:STDOUT: %.21: type = struct_type {.x: D, .y: ()} [template] -// CHECK:STDOUT: %.22: type = tuple_type (D*, {.x: D, .y: ()}) [template] +// CHECK:STDOUT: %.20: type = ptr_type %D [template] +// CHECK:STDOUT: %.21: type = struct_type {.x: %D, .y: %.2} [template] +// CHECK:STDOUT: %.22: type = tuple_type (%.20, %.21) [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] -// CHECK:STDOUT: %F.6: = struct_value () [template] +// CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] // CHECK:STDOUT: %.23: = interface_witness (%F.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -112,24 +112,24 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { -// CHECK:STDOUT: %Self: UseSelf = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %Self.ref.loc12_14: UseSelf = name_ref Self, %Self [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %.1 = 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: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %self.loc12_8.1: Self = param self -// CHECK:STDOUT: %self.loc12_8.2: Self = bind_name self, %self.loc12_8.1 -// CHECK:STDOUT: %Self.ref.loc12_23: UseSelf = name_ref Self, %Self [symbolic = constants.%Self.1] +// CHECK:STDOUT: %self.loc12_8.1: %Self.1 = param self +// CHECK:STDOUT: %self.loc12_8.2: %Self.1 = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %Self.ref.loc12_23: %.1 = name_ref Self, %Self [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_23.1: type = facet_type_access %Self.ref.loc12_23 [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_23.2: type = converted %Self.ref.loc12_23, %.loc12_23.1 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %x.loc12_20.1: Self = param x -// CHECK:STDOUT: %x.loc12_20.2: Self = bind_name x, %x.loc12_20.1 -// CHECK:STDOUT: %Self.ref.loc12_32: UseSelf = name_ref Self, %Self [symbolic = constants.%Self.1] +// CHECK:STDOUT: %x.loc12_20.1: %Self.1 = param x +// CHECK:STDOUT: %x.loc12_20.2: %Self.1 = bind_name x, %x.loc12_20.1 +// CHECK:STDOUT: %Self.ref.loc12_32: %.1 = name_ref Self, %Self [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_32.1: type = facet_type_access %Self.ref.loc12_32 [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_32.2: type = converted %Self.ref.loc12_32, %.loc12_32.1 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_36: in UseSelf> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_36: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -138,24 +138,24 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { -// CHECK:STDOUT: %Self: SelfNested = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %F.decl: = fn_decl @F.4 [template = constants.%F.4] { -// CHECK:STDOUT: %Self.ref.loc28_12: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.9 = 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: %Self.ref.loc28_12: %.9 = name_ref Self, %Self [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc28_16.1: type = facet_type_access %Self.ref.loc28_12 [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc28_16.2: type = converted %Self.ref.loc28_12, %.loc28_16.1 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %.loc28_16.3: type = ptr_type Self [symbolic = constants.%.10] -// CHECK:STDOUT: %Self.ref.loc28_24: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.2] +// CHECK:STDOUT: %.loc28_16.3: type = ptr_type %Self.2 [symbolic = constants.%.10] +// CHECK:STDOUT: %Self.ref.loc28_24: %.9 = name_ref Self, %Self [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc28_24.1: type = facet_type_access %Self.ref.loc28_24 [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc28_24.2: type = converted %Self.ref.loc28_24, %.loc28_24.1 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %.loc28_35.1: () = tuple_literal () +// CHECK:STDOUT: %.loc28_35.1: %.2 = tuple_literal () // CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc28_36: type = struct_type {.x: Self, .y: ()} [symbolic = constants.%.11] -// CHECK:STDOUT: %.loc28_37.1: (type, type) = tuple_literal (%.loc28_16.3, %.loc28_36) +// CHECK:STDOUT: %.loc28_36: type = struct_type {.x: %Self.2, .y: %.2} [symbolic = constants.%.11] +// CHECK:STDOUT: %.loc28_37.1: %.12 = tuple_literal (%.loc28_16.3, %.loc28_36) // CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%.13 [symbolic = constants.%.13] -// CHECK:STDOUT: %x.loc28_8.1: (Self*, {.x: Self, .y: ()}) = param x -// CHECK:STDOUT: %x.loc28_8.2: (Self*, {.x: Self, .y: ()}) = bind_name x, %x.loc28_8.1 +// CHECK:STDOUT: %x.loc28_8.1: %.13 = param x +// CHECK:STDOUT: %x.loc28_8.2: %.13 = bind_name x, %x.loc28_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28_39: in SelfNested> = assoc_entity element0, %F.decl [template = constants.%.15] +// CHECK:STDOUT: %.loc28_39: %.14 = assoc_entity element0, %F.decl [template = constants.%.15] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -163,16 +163,16 @@ impl D as SelfNested { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as UseSelf { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: impl @impl.1: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %C.ref.loc20_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc20_8.1: C = param self -// CHECK:STDOUT: %self.loc20_8.2: C = bind_name self, %self.loc20_8.1 +// CHECK:STDOUT: %self.loc20_8.1: %C = param self +// CHECK:STDOUT: %self.loc20_8.2: %C = bind_name self, %self.loc20_8.1 // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %x.loc20_17.1: C = param x -// CHECK:STDOUT: %x.loc20_17.2: C = bind_name x, %x.loc20_17.1 +// CHECK:STDOUT: %x.loc20_17.1: %C = param x +// CHECK:STDOUT: %x.loc20_17.2: %C = bind_name x, %x.loc20_17.1 // CHECK:STDOUT: %C.ref.loc20_26: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: @@ -181,16 +181,16 @@ impl D as SelfNested { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: D as UseSelf { -// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] { +// CHECK:STDOUT: impl @impl.2: %D as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %Self.ref.loc24_14: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %self.loc24_8.1: D = param self -// CHECK:STDOUT: %self.loc24_8.2: D = bind_name self, %self.loc24_8.1 +// CHECK:STDOUT: %self.loc24_8.1: %D = param self +// CHECK:STDOUT: %self.loc24_8.2: %D = bind_name self, %self.loc24_8.1 // CHECK:STDOUT: %Self.ref.loc24_23: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %x.loc24_20.1: D = param x -// CHECK:STDOUT: %x.loc24_20.2: D = bind_name x, %x.loc24_20.1 +// CHECK:STDOUT: %x.loc24_20.1: %D = param x +// CHECK:STDOUT: %x.loc24_20.2: %D = bind_name x, %x.loc24_20.1 // CHECK:STDOUT: %Self.ref.loc24_32: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %return.var: ref D = var +// CHECK:STDOUT: %return.var: ref %D = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: @@ -199,18 +199,18 @@ impl D as SelfNested { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3: C as SelfNested { -// CHECK:STDOUT: %F.decl: = fn_decl @F.5 [template = constants.%F.5] { +// CHECK:STDOUT: impl @impl.3: %C as %.9 { +// CHECK:STDOUT: %F.decl: %F.type.5 = fn_decl @F.5 [template = constants.%F.5] { // 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.%.16] +// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.16] // CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_29.1: () = tuple_literal () +// CHECK:STDOUT: %.loc32_29.1: %.2 = tuple_literal () // CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: C, .y: ()} [template = constants.%.17] -// CHECK:STDOUT: %.loc32_31.1: (type, type) = tuple_literal (%.loc32_13, %.loc32_30) +// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %.2} [template = constants.%.17] +// CHECK:STDOUT: %.loc32_31.1: %.12 = tuple_literal (%.loc32_13, %.loc32_30) // CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%.18 [template = constants.%.18] -// CHECK:STDOUT: %x.loc32_8.1: (C*, {.x: C, .y: ()}) = param x -// CHECK:STDOUT: %x.loc32_8.2: (C*, {.x: C, .y: ()}) = bind_name x, %x.loc32_8.1 +// CHECK:STDOUT: %x.loc32_8.1: %.18 = param x +// CHECK:STDOUT: %x.loc32_8.2: %.18 = bind_name x, %x.loc32_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.19] // CHECK:STDOUT: @@ -219,18 +219,18 @@ impl D as SelfNested { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4: D as SelfNested { -// CHECK:STDOUT: %F.decl: = fn_decl @F.6 [template = constants.%F.6] { +// CHECK:STDOUT: impl @impl.4: %D as %.9 { +// CHECK:STDOUT: %F.decl: %F.type.6 = fn_decl @F.6 [template = constants.%F.6] { // CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %.loc36_16: type = ptr_type D [template = constants.%.20] +// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.20] // CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %.loc36_35.1: () = tuple_literal () +// CHECK:STDOUT: %.loc36_35.1: %.2 = tuple_literal () // CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: D, .y: ()} [template = constants.%.21] -// CHECK:STDOUT: %.loc36_37.1: (type, type) = tuple_literal (%.loc36_16, %.loc36_36) +// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %.2} [template = constants.%.21] +// CHECK:STDOUT: %.loc36_37.1: %.12 = tuple_literal (%.loc36_16, %.loc36_36) // CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%.22 [template = constants.%.22] -// CHECK:STDOUT: %x.loc36_8.1: (D*, {.x: D, .y: ()}) = param x -// CHECK:STDOUT: %x.loc36_8.2: (D*, {.x: D, .y: ()}) = bind_name x, %x.loc36_8.1 +// CHECK:STDOUT: %x.loc36_8.1: %.22 = param x +// CHECK:STDOUT: %x.loc36_8.2: %.22 = bind_name x, %x.loc36_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.23] // CHECK:STDOUT: @@ -249,27 +249,27 @@ impl D as SelfNested { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.1[@UseSelf.%self.loc12_8.2: Self](@UseSelf.%x.loc12_20.2: Self) -> Self; +// CHECK:STDOUT: fn @F.1[@UseSelf.%self.loc12_8.2: %Self.1](@UseSelf.%x.loc12_20.2: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.2[@impl.1.%self.loc20_8.2: C](@impl.1.%x.loc20_17.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @F.2[@impl.1.%self.loc20_8.2: %C](@impl.1.%x.loc20_17.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_38.1: {} = struct_literal () -// CHECK:STDOUT: %.loc20_38.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc20_39: init C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc20_38.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc20_38.2: init %C = class_init (), @impl.1.%return.var [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 @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3[@impl.2.%self.loc24_8.2: D](@impl.2.%x.loc24_20.2: D) -> @impl.2.%return.var: D { +// CHECK:STDOUT: fn @F.3[@impl.2.%self.loc24_8.2: %D](@impl.2.%x.loc24_20.2: %D) -> @impl.2.%return.var: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24_47.1: {} = struct_literal () -// CHECK:STDOUT: %.loc24_47.2: init D = class_init (), @impl.2.%return.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc24_48: init D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc24_47.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc24_47.2: init %D = class_init (), @impl.2.%return.var [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 @impl.2.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.4(@SelfNested.%x.loc28_8.2: (Self*, {.x: Self, .y: ()})); +// CHECK:STDOUT: fn @F.4(@SelfNested.%x.loc28_8.2: %.13); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.5(@impl.3.%x.loc32_8.2: (C*, {.x: C, .y: ()})); +// CHECK:STDOUT: fn @F.5(@impl.3.%x.loc32_8.2: %.18); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.6(@impl.4.%x.loc36_8.2: (D*, {.x: D, .y: ()})); +// CHECK:STDOUT: fn @F.6(@impl.4.%x.loc36_8.2: %.22); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index 50346a3d092f..0cacc293d1ca 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -22,10 +22,10 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %.4: = interface_witness () [template] @@ -39,7 +39,7 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] @@ -47,8 +47,8 @@ impl i32 as I {} // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] @@ -58,14 +58,14 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: i32 as I { +// CHECK:STDOUT: impl @impl: i32 as %.1 { // CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index aa3bded178c4..ee9dc067dd64 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -18,16 +18,16 @@ var d: i32 = a[b]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 2] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 24 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal 1 [template] -// CHECK:STDOUT: %array: [i32; 2] = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,27 +39,27 @@ var d: i32 = a[b]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 2 [template = constants.%.2] // 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 [i32; 2] = var a -// CHECK:STDOUT: %a: ref [i32; 2] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_32.loc14, %.loc14_8.1 [template = i32] @@ -73,24 +73,24 @@ var d: i32 = a[b]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_24: i32 = int_literal 24 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.1: (i32, i32) = tuple_literal (%.loc11_20, %.loc11_24) +// CHECK:STDOUT: %.loc11_26.1: %.7 = tuple_literal (%.loc11_20, %.loc11_24) // CHECK:STDOUT: %.loc11_26.2: i32 = int_literal 0 [template = constants.%.8] // 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_literal 1 [template = constants.%.9] // 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 [i32; 2] = array_init (%.loc11_26.4, %.loc11_26.7) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_27: init [i32; 2] = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] +// 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: assign file.%a.var, %.loc11_27 // CHECK:STDOUT: %.loc12: i32 = int_literal 1 [template = constants.%.9] // CHECK:STDOUT: assign file.%b.var, %.loc12 -// CHECK:STDOUT: %a.ref.loc13: ref [i32; 2] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref.loc13: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc13_16: i32 = int_literal 0 [template = constants.%.8] // 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 [i32; 2] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref.loc14: ref %.3 = 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 dde290d146bc..eb89ca632c4f 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -33,23 +33,23 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: %.9: type = ptr_type i32 [template] // CHECK:STDOUT: %.10: i32 = int_literal 4 [template] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] -// CHECK:STDOUT: %ValueBinding: = struct_value () [template] +// CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,57 +60,57 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: .ValueBinding = %ValueBinding.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3] -// CHECK:STDOUT: @F.%return: ref [i32; 3] = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15: i32 = int_literal 3 [template = constants.%.2] // 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.loc13_6.1: [i32; 3] = param b -// CHECK:STDOUT: @G.%b: [i32; 3] = bind_name b, %b.loc13_6.1 +// CHECK:STDOUT: %b.loc13_6.1: %.3 = param b +// CHECK:STDOUT: @G.%b: %.3 = bind_name b, %b.loc13_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %ValueBinding.decl: = fn_decl @ValueBinding [template = constants.%ValueBinding] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ValueBinding.decl: %ValueBinding.type = fn_decl @ValueBinding [template = constants.%ValueBinding] { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_26: i32 = int_literal 3 [template = constants.%.2] // 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.loc21_17.1: [i32; 3] = param b -// CHECK:STDOUT: @ValueBinding.%b: [i32; 3] = bind_name b, %b.loc21_17.1 +// CHECK:STDOUT: %b.loc21_17.1: %.3 = param b +// CHECK:STDOUT: @ValueBinding.%b: %.3 = bind_name b, %b.loc21_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> [i32; 3]; +// CHECK:STDOUT: fn @F() -> %.3; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b: [i32; 3]) { +// CHECK:STDOUT: fn @G(%b: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_16: i32 = int_literal 3 [template = constants.%.2] // 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 [i32; 3] = var a -// CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: %.loc14_22: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc14_25: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc14_28: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_29.1: (i32, i32, i32) = tuple_literal (%.loc14_22, %.loc14_25, %.loc14_28) +// CHECK:STDOUT: %.loc14_29.1: %.7 = tuple_literal (%.loc14_22, %.loc14_25, %.loc14_28) // CHECK:STDOUT: %.loc14_29.2: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -120,21 +120,21 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc14_29.8: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc14_29.4, %.loc14_29.7, %.loc14_29.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc14_30: init [i32; 3] = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] +// 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: 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 i32* = var pa -// CHECK:STDOUT: %pa: ref i32* = bind_name pa, %pa.var -// CHECK:STDOUT: %a.ref.loc17: ref [i32; 3] = name_ref a, %a +// 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_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc17_22: ref i32 = array_index %a.ref.loc17, %.loc17_21 -// CHECK:STDOUT: %.loc17_18: i32* = addr_of %.loc17_22 +// CHECK:STDOUT: %.loc17_18: %.9 = addr_of %.loc17_22 // CHECK:STDOUT: assign %pa.var, %.loc17_18 -// CHECK:STDOUT: %a.ref.loc18: ref [i32; 3] = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc18: ref %.3 = name_ref a, %a // CHECK:STDOUT: %.loc18_5: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc18_6: ref i32 = array_index %a.ref.loc18, %.loc18_5 // CHECK:STDOUT: %.loc18_10: i32 = int_literal 4 [template = constants.%.10] @@ -142,19 +142,19 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ValueBinding(%b: [i32; 3]) { +// CHECK:STDOUT: fn @ValueBinding(%b: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_16: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32, %.loc22_11.1 [template = i32] // CHECK:STDOUT: %.loc22_17: type = array_type %.loc22_16, i32 [template = constants.%.3] -// CHECK:STDOUT: %a.var: ref [i32; 3] = var a -// CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var // CHECK:STDOUT: %.loc22_22: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc22_25: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc22_28: i32 = int_literal 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc22_29.1: (i32, i32, i32) = tuple_literal (%.loc22_22, %.loc22_25, %.loc22_28) +// CHECK:STDOUT: %.loc22_29.1: %.7 = tuple_literal (%.loc22_22, %.loc22_25, %.loc22_28) // CHECK:STDOUT: %.loc22_29.2: i32 = int_literal 0 [template = constants.%.8] // 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] @@ -164,22 +164,22 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc22_29.8: i32 = int_literal 2 [template = constants.%.6] // 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 [i32; 3] = array_init (%.loc22_29.4, %.loc22_29.7, %.loc22_29.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc22_30: init [i32; 3] = converted %.loc22_29.1, %.loc22_29.11 [template = constants.%array] +// 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: assign %a.var, %.loc22_30 -// CHECK:STDOUT: %a.ref: ref [i32; 3] = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, %a // CHECK:STDOUT: %.loc26_5: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc26_6: ref i32 = array_index %a.ref, %.loc26_5 -// CHECK:STDOUT: %b.ref: [i32; 3] = name_ref b, %b +// CHECK:STDOUT: %b.ref: %.3 = name_ref b, %b // CHECK:STDOUT: %.loc27_5: i32 = int_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc27_6.1: ref [i32; 3] = value_as_ref %b.ref +// CHECK:STDOUT: %.loc27_6.1: ref %.3 = 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: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc28_4.1: ref [i32; 3] = temporary_storage -// CHECK:STDOUT: %F.call: init [i32; 3] = call %F.ref() to %.loc28_4.1 +// 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_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc28_4.2: ref [i32; 3] = temporary %.loc28_4.1, %F.call +// CHECK:STDOUT: %.loc28_4.2: ref %.3 = 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 27da21c08f2a..6d1c83dd7d5c 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -26,14 +26,14 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: type = tuple_type (i32) [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 1] = tuple_value (%.5) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: %.8: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -45,21 +45,21 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = var a -// CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_8.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_8.2: type = converted %int.make_type_32.loc22, %.loc22_8.1 [template = i32] @@ -72,19 +72,19 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: i32 = int_literal 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: (i32,) = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_23.1: %.6 = tuple_literal (%.loc11_20) // CHECK:STDOUT: %.loc11_23.2: i32 = int_literal 0 [template = constants.%.7] // 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 [i32; 1] = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init [i32; 1] = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] +// 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: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref.loc17: ref [i32; 1] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc17_16: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref.loc22: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc22_16: i32 = int_literal 2147483647 [template = constants.%.8] // 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 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 be84189772fd..daf2d4958690 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -19,14 +19,14 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: type = tuple_type (i32) [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 1] = tuple_value (%.5) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: %.8: f64 = float_literal 2.6000000000000001 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -37,15 +37,15 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = var a -// CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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,14 +58,14 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: i32 = int_literal 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: (i32,) = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_23.1: %.6 = tuple_literal (%.loc11_20) // CHECK:STDOUT: %.loc11_23.2: i32 = int_literal 0 [template = constants.%.7] // 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 [i32; 1] = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init [i32; 1] = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] +// 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: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref: ref [i32; 1] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_16: f64 = float_literal 2.6000000000000001 [template = constants.%.8] // CHECK:STDOUT: %.loc15_19.1: ref i32 = array_index %a.ref, // CHECK:STDOUT: %.loc15_19.2: i32 = bind_value %.loc15_19.1 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 de8b94c4d306..c9c4241057f7 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 @@ -19,14 +19,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: type = tuple_type (i32) [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] -// CHECK:STDOUT: %array: [i32; 1] = tuple_value (%.5) [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,15 +36,15 @@ var b: i32 = a[1]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // 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 [i32; 1] = var a -// CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -57,14 +57,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: i32 = int_literal 12 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_23.1: (i32,) = tuple_literal (%.loc11_20) +// CHECK:STDOUT: %.loc11_23.1: %.6 = tuple_literal (%.loc11_20) // CHECK:STDOUT: %.loc11_23.2: i32 = int_literal 0 [template = constants.%.7] // 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 [i32; 1] = array_init (%.loc11_23.4) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc11_24: init [i32; 1] = converted %.loc11_23.1, %.loc11_23.5 [template = constants.%array] +// 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: assign file.%a.var, %.loc11_24 -// CHECK:STDOUT: %a.ref: ref [i32; 1] = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_16: i32 = int_literal 1 [template = constants.%.2] // 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 diff --git a/toolchain/check/testdata/index/fail_empty_tuple_access.carbon b/toolchain/check/testdata/index/fail_empty_tuple_access.carbon index e4e01e69427c..2bd355c72e32 100644 --- a/toolchain/check/testdata/index/fail_empty_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_empty_tuple_access.carbon @@ -22,9 +22,9 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,8 +35,8 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -46,11 +46,11 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: %.loc17_7: i32 = int_literal 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc17_4.1: ref () = temporary_storage -// CHECK:STDOUT: %.loc17_4.2: ref () = temporary %.loc17_4.1, %F.call +// CHECK:STDOUT: %.loc17_4.1: ref %.1 = temporary_storage +// CHECK:STDOUT: %.loc17_4.2: ref %.1 = temporary %.loc17_4.1, %F.call // CHECK:STDOUT: %.loc17_8: ref = tuple_index %.loc17_4.2, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 788caedf8ccf..efeab938874a 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -41,14 +41,14 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [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_literal 0 [template] // CHECK:STDOUT: %.7: i32 = int_literal 4 [template] @@ -61,51 +61,51 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3] -// CHECK:STDOUT: @F.%return: ref [i32; 3] = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15: i32 = int_literal 3 [template = constants.%.2] // 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.loc13_6.1: [i32; 3] = param b -// CHECK:STDOUT: @G.%b: [i32; 3] = bind_name b, %b.loc13_6.1 +// CHECK:STDOUT: %b.loc13_6.1: %.3 = param b +// CHECK:STDOUT: @G.%b: %.3 = bind_name b, %b.loc13_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> [i32; 3]; +// CHECK:STDOUT: fn @F() -> %.3; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%b: [i32; 3]) { +// CHECK:STDOUT: fn @G(%b: %.3) { // 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 i32* = var pb -// CHECK:STDOUT: %pb: ref i32* = bind_name pb, %pb.var -// CHECK:STDOUT: %b.ref.loc19: [i32; 3] = name_ref b, %b +// 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_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_22.1: ref [i32; 3] = value_as_ref %b.ref.loc19 +// CHECK:STDOUT: %.loc19_22.1: ref %.3 = 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: i32* = addr_of [template = ] +// CHECK:STDOUT: %.loc19_18: %.5 = addr_of [template = ] // CHECK:STDOUT: assign %pb.var, %.loc19_18 -// CHECK:STDOUT: %b.ref.loc24: [i32; 3] = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc24: %.3 = name_ref b, %b // CHECK:STDOUT: %.loc24_5: i32 = int_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_6.1: ref [i32; 3] = value_as_ref %b.ref.loc24 +// CHECK:STDOUT: %.loc24_6.1: ref %.3 = 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_literal 4 [template = constants.%.7] @@ -114,22 +114,22 @@ fn G(b: [i32; 3]) { // 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 i32* = var pf -// CHECK:STDOUT: %pf: ref i32* = bind_name pf, %pf.var -// CHECK:STDOUT: %F.ref.loc32: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc32_20.1: ref [i32; 3] = temporary_storage -// CHECK:STDOUT: %F.call.loc32: init [i32; 3] = call %F.ref.loc32() to %.loc32_20.1 +// CHECK:STDOUT: %pf.var: ref %.5 = var pf +// CHECK:STDOUT: %pf: ref %.5 = 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_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc32_20.2: ref [i32; 3] = temporary %.loc32_20.1, %F.call.loc32 +// CHECK:STDOUT: %.loc32_20.2: ref %.3 = 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: i32* = addr_of [template = ] +// CHECK:STDOUT: %.loc32_18: %.5 = addr_of [template = ] // CHECK:STDOUT: assign %pf.var, %.loc32_18 -// CHECK:STDOUT: %F.ref.loc36: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc36_4.1: ref [i32; 3] = temporary_storage -// CHECK:STDOUT: %F.call.loc36: init [i32; 3] = call %F.ref.loc36() to %.loc36_4.1 +// 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_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc36_4.2: ref [i32; 3] = temporary %.loc36_4.1, %F.call.loc36 +// CHECK:STDOUT: %.loc36_4.2: ref %.3 = 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_literal 4 [template = constants.%.7] diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index ca61bbb3c97e..7de4c31d2b2e 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -38,15 +38,15 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.3, %.4) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] +// CHECK:STDOUT: %struct: %.5 = struct_value (%.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,33 +61,33 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %N: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32.loc16, %.loc16_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_32.loc23, %.loc23_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_8.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_8.2: type = converted %int.make_type_32.loc29, %.loc29_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_8.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_8.2: type = converted %int.make_type_32.loc34, %.loc34_8.1 [template = i32] // CHECK:STDOUT: %d.var: ref i32 = var d // CHECK:STDOUT: %d: ref i32 = bind_name d, %d.var -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -99,15 +99,15 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %N.ref: = name_ref N, file.%N [template = file.%N] // CHECK:STDOUT: %.loc16: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: assign file.%a.var, -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: %.loc29_20: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: %.loc29_28: i32 = int_literal 2 [template = constants.%.4] -// CHECK:STDOUT: %.loc29_29.1: {.a: i32, .b: i32} = struct_literal (%.loc29_20, %.loc29_28) +// CHECK:STDOUT: %.loc29_29.1: %.5 = struct_literal (%.loc29_20, %.loc29_28) // CHECK:STDOUT: %.loc29_31: i32 = int_literal 0 [template = constants.%.2] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.loc29_20, %.loc29_28) [template = constants.%struct] -// CHECK:STDOUT: %.loc29_29.2: {.a: i32, .b: i32} = converted %.loc29_29.1, %struct [template = constants.%struct] +// 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: 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] diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index 2169ab51317a..3790836f3b0f 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -20,9 +20,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,8 +32,8 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 0706ae028b7c..b46ce2822cb2 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -19,20 +19,20 @@ var b: i32 = a[-10]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 10 [template] // CHECK:STDOUT: %.8: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self: Negate = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] -// CHECK:STDOUT: %Op: = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type @Negate, [template] -// CHECK:STDOUT: %.10: in Negate> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %Op: %Op.type = struct_value () [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type @Negate, %Op.type [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, file.%import_ref.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,19 +42,19 @@ var b: i32 = a[-10]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -62,7 +62,7 @@ var b: i32 = a[-10]; // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var // CHECK:STDOUT: %import_ref.4: type = import_ref ir4, inst+67, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+69, unloaded -// CHECK:STDOUT: %import_ref.6: in Negate> = import_ref ir4, inst+84, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.6: %.9 = import_ref ir4, inst+84, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.7 = import_ref ir4, inst+80, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir4, inst+80, unloaded // CHECK:STDOUT: } @@ -76,21 +76,21 @@ var b: i32 = a[-10]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op[%self: Self]() -> Self; +// CHECK:STDOUT: fn @Op[%self: %Self]() -> %Self; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_27.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init (i32, i32) = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_17: i32 = int_literal 10 [template = constants.%.7] // CHECK:STDOUT: %.loc15_19: ref = tuple_index %a.ref, // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon index aeed7401d8d4..ce37e253fabc 100644 --- a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon @@ -20,13 +20,13 @@ var c: i32 = a[b]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: i32 = int_literal 3 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,25 +38,25 @@ var c: i32 = a[b]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32.loc16, %.loc16_8.1 [template = i32] @@ -70,17 +70,17 @@ var c: i32 = a[b]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc11_25: i32 = int_literal 3 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_26.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_25) +// CHECK:STDOUT: %.loc11_26.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_26.3, %.loc11_26.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27: init (i32, i32) = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_27 // CHECK:STDOUT: %.loc12: i32 = int_literal 0 [template = constants.%.7] // CHECK:STDOUT: assign file.%b.var, %.loc12 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %b.ref: ref i32 = name_ref b, file.%b // CHECK:STDOUT: %.loc16_16: i32 = bind_value %b.ref // CHECK:STDOUT: %.loc16_17: ref = tuple_index %a.ref, diff --git a/toolchain/check/testdata/index/fail_non_tuple_access.carbon b/toolchain/check/testdata/index/fail_non_tuple_access.carbon index 09c09adb663d..5d012165aba6 100644 --- a/toolchain/check/testdata/index/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_non_tuple_access.carbon @@ -20,7 +20,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: } @@ -31,7 +31,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon index a702fa9c5654..496ddb4f514d 100644 --- a/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon @@ -19,16 +19,16 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 34 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] // CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.7) [template] +// CHECK:STDOUT: %struct: %.8 = struct_value (%.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,19 +38,19 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -64,19 +64,19 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 34 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_28.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: init (i32, i32) = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_29 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_26: i32 = int_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_27.1: {.index: i32} = struct_literal (%.loc15_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc15_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_27.2: {.index: i32} = converted %.loc15_27.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.1: %.8 = struct_literal (%.loc15_26) +// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc15_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.2: %.8 = converted %.loc15_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc15_28: i32 = struct_access %.loc15_27.2, element0 [template = constants.%.7] // CHECK:STDOUT: %.loc15_34: ref = tuple_index %a.ref, // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/index/fail_tuple_index_error.carbon b/toolchain/check/testdata/index/fail_tuple_index_error.carbon index 7bfff555803e..31c3f13ba089 100644 --- a/toolchain/check/testdata/index/fail_tuple_index_error.carbon +++ b/toolchain/check/testdata/index/fail_tuple_index_error.carbon @@ -19,13 +19,13 @@ var b: i32 = a[oops]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,19 +35,19 @@ var b: i32 = a[oops]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -61,15 +61,15 @@ var b: i32 = a[oops]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_27.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init (i32, i32) = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %oops.ref: = name_ref oops, [template = ] // CHECK:STDOUT: %.loc15: ref = tuple_index %a.ref, // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/index/fail_tuple_large_index.carbon b/toolchain/check/testdata/index/fail_tuple_large_index.carbon index 3cf186d9bd5b..d0352d715f7e 100644 --- a/toolchain/check/testdata/index/fail_tuple_large_index.carbon +++ b/toolchain/check/testdata/index/fail_tuple_large_index.carbon @@ -25,11 +25,11 @@ var d: i32 = b[0x7FFF_FFFF]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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_literal 12 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: } @@ -43,29 +43,29 @@ var d: i32 = b[0x7FFF_FFFF]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_13.1: (type,) = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_13.1: %.2 = 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 (i32,) = var a -// CHECK:STDOUT: %a: ref (i32,) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_13.1: (type,) = tuple_literal (%int.make_type_32.loc12) +// CHECK:STDOUT: %.loc12_13.1: %.2 = 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 (i32,) = var b -// CHECK:STDOUT: %b: ref (i32,) = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %b.var: ref %.3 = var b +// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_32.loc21, %.loc21_8.1 [template = i32] @@ -78,21 +78,21 @@ var d: i32 = b[0x7FFF_FFFF]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_18: i32 = int_literal 12 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_21.1: (i32,) = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: init (i32,) = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_22: init (i32,) = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_22 -// CHECK:STDOUT: %a.ref: ref (i32,) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = 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 (i32,) = tuple_init (%.loc12_17.2) to file.%b.var -// CHECK:STDOUT: %.loc12_18: init (i32,) = converted %a.ref, %.loc12_17.3 +// 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: assign file.%b.var, %.loc12_18 -// CHECK:STDOUT: %b.ref.loc17: ref (i32,) = name_ref b, file.%b +// CHECK:STDOUT: %b.ref.loc17: ref %.3 = name_ref b, file.%b // CHECK:STDOUT: %.loc17_16: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc17_17: ref = tuple_index %b.ref.loc17, // CHECK:STDOUT: assign file.%c.var, -// CHECK:STDOUT: %b.ref.loc21: ref (i32,) = name_ref b, file.%b +// CHECK:STDOUT: %b.ref.loc21: ref %.3 = name_ref b, file.%b // CHECK:STDOUT: %.loc21_16: i32 = int_literal 2147483647 [template = constants.%.6] // CHECK:STDOUT: %.loc21_27: ref = tuple_index %b.ref.loc21, // CHECK:STDOUT: assign file.%d.var, diff --git a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon index 88312e57c306..f8771359aa6b 100644 --- a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon @@ -19,13 +19,13 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: f64 = float_literal 2.6000000000000001 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,19 +36,19 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -62,15 +62,15 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_27.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init (i32, i32) = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_16: f64 = float_literal 2.6000000000000001 [template = constants.%.7] // CHECK:STDOUT: %.loc15_19: ref = tuple_index %a.ref, // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon index 2b921149c9f2..62b348a54936 100644 --- a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon @@ -19,13 +19,13 @@ var b: i32 = a[2]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 6 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,19 +36,19 @@ var b: i32 = a[2]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -62,15 +62,15 @@ var b: i32 = a[2]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 6 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_27.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_27.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_27.3, %.loc11_27.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_28: init (i32, i32) = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_28 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_16: i32 = int_literal 2 [template = constants.%.7] // CHECK:STDOUT: %.loc15_17: ref = tuple_index %a.ref, // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/index/index_not_literal.carbon b/toolchain/check/testdata/index/index_not_literal.carbon index 1d8daf9b91f1..a2349cba367d 100644 --- a/toolchain/check/testdata/index/index_not_literal.carbon +++ b/toolchain/check/testdata/index/index_not_literal.carbon @@ -16,16 +16,16 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 12 [template] // CHECK:STDOUT: %.6: i32 = int_literal 34 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 1 [template] // CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.7) [template] +// CHECK:STDOUT: %struct: %.8 = struct_value (%.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,19 +35,19 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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 (i32, i32) = var a -// CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -61,19 +61,19 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_22: i32 = int_literal 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 34 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28.1: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_26) +// CHECK:STDOUT: %.loc11_28.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc11_28.3, %.loc11_28.5) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: init (i32, i32) = converted %.loc11_28.1, %.loc11_28.6 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_29 -// CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc12_26: i32 = int_literal 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_27.1: {.index: i32} = struct_literal (%.loc12_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc12_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_27.2: {.index: i32} = converted %.loc12_27.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.1: %.8 = struct_literal (%.loc12_26) +// CHECK:STDOUT: %struct: %.8 = struct_value (%.loc12_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.2: %.8 = converted %.loc12_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc12_28: i32 = struct_access %.loc12_27.2, element0 [template = constants.%.7] // CHECK:STDOUT: %.loc12_34.1: ref i32 = tuple_index %a.ref, %.loc12_28 // CHECK:STDOUT: %.loc12_34.2: i32 = bind_value %.loc12_34.1 diff --git a/toolchain/check/testdata/index/tuple_element_access.carbon b/toolchain/check/testdata/index/tuple_element_access.carbon index 97263cc6b52a..fa58a0b34676 100644 --- a/toolchain/check/testdata/index/tuple_element_access.carbon +++ b/toolchain/check/testdata/index/tuple_element_access.carbon @@ -17,11 +17,11 @@ var c: i32 = b[0]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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_literal 12 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,23 +33,23 @@ var c: i32 = b[0]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_13.1: (type,) = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_13.1: %.2 = 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 (i32,) = var a -// CHECK:STDOUT: %a: ref (i32,) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_13.1: (type,) = tuple_literal (%int.make_type_32.loc12) +// CHECK:STDOUT: %.loc12_13.1: %.2 = 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 (i32,) = var b -// CHECK:STDOUT: %b: ref (i32,) = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %b.var: ref %.3 = var b +// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.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] @@ -62,17 +62,17 @@ var c: i32 = b[0]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_18: i32 = int_literal 12 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_21.1: (i32,) = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: init (i32,) = tuple_init (%.loc11_18) to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_22: init (i32,) = converted %.loc11_21.1, %.loc11_21.2 [template = constants.%tuple] +// 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: assign file.%a.var, %.loc11_22 -// CHECK:STDOUT: %a.ref: ref (i32,) = name_ref a, file.%a +// CHECK:STDOUT: %a.ref: ref %.3 = 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 (i32,) = tuple_init (%.loc12_17.2) to file.%b.var -// CHECK:STDOUT: %.loc12_18: init (i32,) = converted %a.ref, %.loc12_17.3 +// 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: assign file.%b.var, %.loc12_18 -// CHECK:STDOUT: %b.ref: ref (i32,) = name_ref b, file.%b +// CHECK:STDOUT: %b.ref: ref %.3 = name_ref b, file.%b // CHECK:STDOUT: %.loc13_16: i32 = int_literal 0 [template = constants.%.5] // CHECK:STDOUT: %.loc13_17.1: ref i32 = tuple_index %b.ref, %.loc13_16 // CHECK:STDOUT: %.loc13_17.2: i32 = bind_value %.loc13_17.1 diff --git a/toolchain/check/testdata/index/tuple_return_value_access.carbon b/toolchain/check/testdata/index/tuple_return_value_access.carbon index ec94ec66ab43..9035cd18d462 100644 --- a/toolchain/check/testdata/index/tuple_return_value_access.carbon +++ b/toolchain/check/testdata/index/tuple_return_value_access.carbon @@ -19,15 +19,15 @@ fn Run() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,17 +37,17 @@ fn Run() -> i32 { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_16.1: (type,) = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_16.1: %.2 = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_32.loc11, %.loc11_16.2 [template = i32] // CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: @F.%return: ref (i32,) = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] { // 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] @@ -57,22 +57,22 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> (i32,) { +// CHECK:STDOUT: fn @F() -> %.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_28: i32 = int_literal 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_30: (i32,) = tuple_literal (%.loc11_28) -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc11_28) [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_31: (i32,) = converted %.loc11_30, %tuple [template = constants.%tuple] +// 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: return %.loc11_31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init (i32,) = call %F.ref() +// 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_literal 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_11.1: ref (i32,) = temporary_storage -// CHECK:STDOUT: %.loc14_11.2: ref (i32,) = temporary %.loc14_11.1, %F.call +// CHECK:STDOUT: %.loc14_11.1: ref %.3 = temporary_storage +// CHECK:STDOUT: %.loc14_11.2: ref %.3 = temporary %.loc14_11.1, %F.call // CHECK:STDOUT: %.loc14_15.1: ref i32 = tuple_index %.loc14_11.2, %.loc14_14 // CHECK:STDOUT: %.loc14_15.2: i32 = bind_value %.loc14_15.1 // CHECK:STDOUT: return %.loc14_15.2 diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index 3c16798ea28d..1e85310f0c38 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -17,14 +17,14 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.3: = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @I, i32 [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,18 +34,18 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %T [template = constants.%.3] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %T [template = constants.%.3] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // 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: = assoc_entity element1, %N [template = constants.%.6] +// CHECK:STDOUT: %.loc13_14: %.5 = assoc_entity element1, %N [template = constants.%.6] // 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 05d256f88018..4898d391db3b 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -19,10 +19,10 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: i32 = int_literal 42 [template] // CHECK:STDOUT: %.3: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,10 +35,10 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc15_18: i32 = int_literal 42 [template = constants.%.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc15_20: = assoc_entity element0, %T [template = constants.%.4] +// CHECK:STDOUT: %.loc15_20: %.3 = assoc_entity element0, %T [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self 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 047e1a171dc6..bc0a65435653 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -24,17 +24,17 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %.7: i32 = int_literal 42 [template] // CHECK:STDOUT: %.8: type = assoc_entity_type @I, i32 [template] -// CHECK:STDOUT: %.9: = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,29 +44,29 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = 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: (type, type) = tuple_literal (%int.make_type_32.loc16_27, %int.make_type_32.loc16_32) +// CHECK:STDOUT: %.loc16_35: %.3 = 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.%.4 [template = constants.%.4] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16_36.6: = assoc_entity element0, %T [template = constants.%.6] +// CHECK:STDOUT: %.loc16_36.6: %.5 = assoc_entity element0, %T [template = constants.%.6] // 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_literal 42 [template = constants.%.7] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc20_27: = assoc_entity element1, %N [template = constants.%.9] +// CHECK:STDOUT: %.loc20_27: %.8 = assoc_entity element1, %N [template = constants.%.9] // 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 b18290b0017b..89bb18e686b1 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 @@ -25,18 +25,18 @@ interface Interface { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.6: in Interface> = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, %G.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,16 +46,16 @@ interface Interface { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.loc16: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc16: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc21_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_19.1: type = value_of_initializer %int.make_type_32.loc21_19 [template = i32] // CHECK:STDOUT: %.loc21_19.2: type = converted %int.make_type_32.loc21_19, %.loc21_19.1 [template = i32] @@ -71,7 +71,7 @@ interface Interface { // CHECK:STDOUT: %.loc21_35.2: type = converted %int.make_type_32.loc21_35, %.loc21_35.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21_39: in Interface> = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc21_39: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] // 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 14b000de2774..92e4438c1731 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 @@ -43,22 +43,22 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.6: in Interface> = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, %G.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.7: > = struct_value () [template] +// CHECK:STDOUT: %.7: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.8: > = struct_value () [template] +// CHECK:STDOUT: %.8: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,14 +68,14 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl.loc32: > = fn_decl @.1 [template = constants.%.7] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl.loc40: > = fn_decl @.2 [template = constants.%.8] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl.loc32: %.type.1 = fn_decl @.1 [template = constants.%.7] {} +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl.loc40: %.type.2 = fn_decl @.2 [template = constants.%.8] { // CHECK:STDOUT: %int.make_type_32.loc40_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_19.1: type = value_of_initializer %int.make_type_32.loc40_19 [template = i32] // CHECK:STDOUT: %.loc40_19.2: type = converted %int.make_type_32.loc40_19, %.loc40_19.1 [template = i32] @@ -94,10 +94,10 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.loc16: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc16: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc22_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_19.1: type = value_of_initializer %int.make_type_32.loc22_19 [template = i32] // CHECK:STDOUT: %.loc22_19.2: type = converted %int.make_type_32.loc22_19, %.loc22_19.1 [template = i32] @@ -113,7 +113,7 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %.loc22_35.2: type = converted %int.make_type_32.loc22_35, %.loc22_35.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22_38: in Interface> = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc22_38: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/as_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type.carbon index fb500d746d2b..5463f53c1afb 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type.carbon @@ -16,10 +16,10 @@ fn F(e: Empty) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,22 +28,22 @@ fn F(e: Empty) {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] -// CHECK:STDOUT: %e.loc13_6.1: Empty = param e -// CHECK:STDOUT: @F.%e: Empty = bind_name e, %e.loc13_6.1 +// CHECK:STDOUT: %e.loc13_6.1: %.1 = param e +// CHECK:STDOUT: @F.%e: %.1 = bind_name e, %e.loc13_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%e: Empty) { +// CHECK:STDOUT: fn @F(%e: %.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // 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 e669f1a86c9d..f068af9bee07 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 @@ -18,11 +18,11 @@ fn F(T:! Empty) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %T: Empty = bind_symbolic_name T 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,28 +31,28 @@ fn F(T:! Empty) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] -// CHECK:STDOUT: %T.loc13_6.1: Empty = param T -// CHECK:STDOUT: @F.%T: Empty = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = constants.%T] +// CHECK:STDOUT: %T.loc13_6.1: %.1 = param T +// CHECK:STDOUT: @F.%T: %.1 = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%T: Empty) { +// CHECK:STDOUT: fn @F(%T: %.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: Empty = name_ref T, %T [symbolic = constants.%T] +// CHECK:STDOUT: %T.ref: %.1 = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %.loc14_10.1: type = facet_type_access %T.ref [symbolic = constants.%T] // CHECK:STDOUT: %.loc14_10.2: type = converted %T.ref, %.loc14_10.1 [symbolic = constants.%T] -// CHECK:STDOUT: %x.var: ref T = var x -// CHECK:STDOUT: %x: ref T = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %T = var x +// CHECK:STDOUT: %x: ref %T = bind_name x, %x.var // CHECK:STDOUT: return // 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 ed5645caf52b..7862ec213874 100644 --- a/toolchain/check/testdata/interface/no_prelude/basic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/basic.carbon @@ -21,14 +21,14 @@ interface ForwardDeclared { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self.1: Empty = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = interface_type @ForwardDeclared [template] -// CHECK:STDOUT: %Self.2: ForwardDeclared = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type @ForwardDeclared, [template] -// CHECK:STDOUT: %.5: in ForwardDeclared> = assoc_entity element0, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type @ForwardDeclared, %F.type [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @ForwardDeclared.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,7 +42,7 @@ interface ForwardDeclared { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -50,9 +50,9 @@ interface ForwardDeclared { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { -// CHECK:STDOUT: %Self: ForwardDeclared = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.loc17: in ForwardDeclared> = assoc_entity element0, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc17: %.4 = assoc_entity element0, %F.decl [template = constants.%.5] // 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 ac372a2e5caf..629d855785a6 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -28,18 +28,18 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.6 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,9 +50,9 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc14: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -60,8 +60,8 @@ class C { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as I { -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: impl @impl: %C as %.1 { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -84,17 +84,17 @@ class C { // CHECK:STDOUT: fn @F.1() { // CHECK:STDOUT: !entry: // 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: {} = 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: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var +// CHECK:STDOUT: %.loc16_19.1: %.6 = 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: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc14 [template = constants.%.4] -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init () = call %.1() +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14 [template = constants.%.4] +// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.2 = call %.1() // 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 532a1ba81bf0..b3f5a3172ad6 100644 --- a/toolchain/check/testdata/interface/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/interface/no_prelude/export_name.carbon @@ -42,7 +42,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,7 +53,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -64,7 +64,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -86,10 +86,10 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %UseEmpty: = struct_value () [template] +// CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -99,10 +99,10 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+7, loaded [template = constants.%.1] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+6, unloaded -// CHECK:STDOUT: %UseEmpty.decl: = fn_decl @UseEmpty [template = constants.%UseEmpty] { +// CHECK:STDOUT: %UseEmpty.decl: %UseEmpty.type = fn_decl @UseEmpty [template = constants.%UseEmpty] { // CHECK:STDOUT: %I.ref: type = name_ref I, %import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.loc6_13.1: I = param i -// CHECK:STDOUT: @UseEmpty.%i: I = bind_name i, %i.loc6_13.1 +// CHECK:STDOUT: %i.loc6_13.1: %.1 = param i +// CHECK:STDOUT: @UseEmpty.%i: %.1 = bind_name i, %i.loc6_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -112,7 +112,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseEmpty(%i: I) { +// CHECK:STDOUT: fn @UseEmpty(%i: %.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // 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 ca333f943d9f..a8b258d08ac3 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 @@ -35,18 +35,18 @@ interface Outer { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self.1: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.3: type = interface_type @Outer [template] -// CHECK:STDOUT: %Self.2: Outer = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.4: type = interface_type @Inner [template] -// CHECK:STDOUT: %Self.3: Inner = bind_symbolic_name Self 1 [symbolic] +// CHECK:STDOUT: %Self.3: %.4 = bind_symbolic_name Self 1 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: > = struct_value () [template] +// CHECK:STDOUT: %.5: %.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,12 +55,12 @@ interface Outer { // CHECK:STDOUT: .Outer = %Outer.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: %Outer.decl: type = interface_decl @Outer [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -69,9 +69,9 @@ interface Outer { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Outer { -// CHECK:STDOUT: %Self: Outer = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %Inner.decl: type = interface_decl @Inner [template = constants.%.4] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -80,8 +80,8 @@ interface Outer { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Inner { -// CHECK:STDOUT: %Self: Inner = bind_symbolic_name Self 1 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.5] {} +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 1 [symbolic = constants.%Self.3] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon index c8e64ba7346f..dcc299f13c0f 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon @@ -19,7 +19,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U [symbolic] // CHECK:STDOUT: } 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 d9d2b97b5f87..0fcda517fb2a 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 @@ -29,7 +29,7 @@ alias UseOther = I.other; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,7 +48,7 @@ alias UseOther = I.other; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon index 6c672537558c..6168a278b042 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon @@ -19,7 +19,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // 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 6fa021ef2bb9..637eda0f3f07 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -46,16 +46,16 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self.1: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Function.type: type = fn_type @Function [template] -// CHECK:STDOUT: %Function: = struct_value () [template] +// CHECK:STDOUT: %Function: %Function.type = struct_value () [template] // CHECK:STDOUT: %.3: type = interface_type @.1 [template] // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.4: type = interface_type @.2 [template] -// CHECK:STDOUT: %Self.2: = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -66,14 +66,14 @@ interface Class { } // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl.loc11: type = interface_decl @Interface [template = constants.%.1] {} // CHECK:STDOUT: %Interface.decl.loc20: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %Function.decl: = fn_decl @Function [template = constants.%Function] {} +// CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [template = constants.%Function] {} // CHECK:STDOUT: %.decl.loc33: type = interface_decl @.1 [template = constants.%.3] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %.decl.loc43: type = interface_decl @.2 [template = constants.%.4] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = @@ -84,7 +84,7 @@ interface Class { } // CHECK:STDOUT: interface @.1; // CHECK:STDOUT: // CHECK:STDOUT: interface @.2 { -// CHECK:STDOUT: %Self: = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self 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 401742af7849..114af56486b2 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -43,15 +43,15 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %.1: type = interface_type @NotGeneric [template] // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.2: type = interface_type @.1 [template] -// CHECK:STDOUT: %Self.1: = bind_symbolic_name Self 1 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = bind_symbolic_name Self 1 [symbolic] // CHECK:STDOUT: %.3: type = interface_type @Generic [template] // CHECK:STDOUT: %.4: type = interface_type @.2 [template] -// CHECK:STDOUT: %Self.2: = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.5: type = interface_type @DifferentParams [template] // CHECK:STDOUT: %.6: type = tuple_type () [template] -// CHECK:STDOUT: %T.2: () = bind_symbolic_name T 0 [symbolic] +// CHECK:STDOUT: %T.2: %.6 = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.7: type = interface_type @.3 [template] -// CHECK:STDOUT: %Self.3: = bind_symbolic_name Self 1 [symbolic] +// CHECK:STDOUT: %Self.3: %.7 = bind_symbolic_name Self 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,17 +75,17 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.loc31_27.2: type = bind_symbolic_name T 0, %T.loc31_27.1 [symbolic = constants.%T.1] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc38: type = interface_decl @.3 [template = constants.%.7] { -// CHECK:STDOUT: %.loc38_32.1: () = tuple_literal () +// CHECK:STDOUT: %.loc38_32.1: %.6 = tuple_literal () // CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%.6 [template = constants.%.6] -// CHECK:STDOUT: %T.loc38_27.1: () = param T -// CHECK:STDOUT: %T.loc38_27.2: () = bind_symbolic_name T 0, %T.loc38_27.1 [symbolic = constants.%T.2] +// CHECK:STDOUT: %T.loc38_27.1: %.6 = param T +// CHECK:STDOUT: %T.loc38_27.2: %.6 = bind_symbolic_name T 0, %T.loc38_27.1 [symbolic = constants.%T.2] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGeneric; // CHECK:STDOUT: // CHECK:STDOUT: interface @.1 { -// CHECK:STDOUT: %Self: = bind_symbolic_name Self 1 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -95,7 +95,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: interface @Generic; // CHECK:STDOUT: // CHECK:STDOUT: interface @.2 { -// CHECK:STDOUT: %Self: = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -105,7 +105,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: interface @DifferentParams; // CHECK:STDOUT: // CHECK:STDOUT: interface @.3 { -// CHECK:STDOUT: %Self: = bind_symbolic_name Self 1 [symbolic = constants.%Self.3] +// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self 1 [symbolic = constants.%Self.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self 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 ddc9d5e5b564..5a9ec18e2110 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon @@ -55,17 +55,17 @@ interface BeingDefined { // CHECK:STDOUT: %.1: type = interface_type @Undefined [template] // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] -// CHECK:STDOUT: %Test: = struct_value () [template] +// CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %.4: type = interface_type @BeingDefined [template] -// CHECK:STDOUT: %Self: BeingDefined = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @BeingDefined, [template] -// CHECK:STDOUT: %.6: in BeingDefined> = assoc_entity element0, @BeingDefined.%H.decl [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @BeingDefined, %H.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @BeingDefined.%H.decl [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.7: > = struct_value () [template] +// CHECK:STDOUT: %.7: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,22 +75,22 @@ interface BeingDefined { // CHECK:STDOUT: .BeingDefined = %BeingDefined.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Undefined.decl: type = interface_decl @Undefined [template = constants.%.1] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] {} -// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] {} +// CHECK:STDOUT: %.decl: %.type.1 = fn_decl @.1 [template = constants.%.3] {} +// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} // CHECK:STDOUT: %BeingDefined.decl: type = interface_decl @BeingDefined [template = constants.%.4] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Undefined; // CHECK:STDOUT: // CHECK:STDOUT: interface @BeingDefined { -// CHECK:STDOUT: %Self: BeingDefined = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %BeingDefined.ref: type = name_ref BeingDefined, file.%BeingDefined.decl [template = constants.%.4] // CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %return.var: ref = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: in BeingDefined> = assoc_entity element0, %H.decl [template = constants.%.6] -// CHECK:STDOUT: %.decl: > = fn_decl @.2 [template = constants.%.7] {} +// CHECK:STDOUT: %.loc45: %.5 = assoc_entity element0, %H.decl [template = constants.%.6] +// CHECK:STDOUT: %.decl: %.type.2 = fn_decl @.2 [template = constants.%.7] {} // 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 9229ec03f237..e58c67919590 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -31,16 +31,16 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, type [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @Interface.%T [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Interface.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,15 +49,15 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc12: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc14: = assoc_entity element1, %T [template = constants.%.6] +// CHECK:STDOUT: %.loc14: %.5 = assoc_entity element1, %T [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -71,9 +71,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.%.1] -// CHECK:STDOUT: %F.ref: in Interface> = name_ref F, @Interface.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Interface.%.loc12 [template = constants.%.4] // CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.ref: = name_ref T, @Interface.%.loc14 [template = constants.%.6] +// CHECK:STDOUT: %T.ref: %.5 = name_ref T, @Interface.%.loc14 [template = constants.%.6] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon index 8d3d7bd79406..146d99cf44dd 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon @@ -37,10 +37,10 @@ protected interface Protected; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Abstract [template] -// CHECK:STDOUT: %Self.1: Abstract = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = interface_type @Default [template] // CHECK:STDOUT: %.3: type = interface_type @Virtual [template] -// CHECK:STDOUT: %Self.2: Virtual = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.4: type = interface_type @Protected [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,7 +58,7 @@ protected interface Protected; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Abstract { -// CHECK:STDOUT: %Self: Abstract = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -68,7 +68,7 @@ protected interface Protected; // CHECK:STDOUT: interface @Default; // CHECK:STDOUT: // CHECK:STDOUT: interface @Virtual { -// CHECK:STDOUT: %Self: Virtual = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self 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 ae79278552fc..8a31eb2f1145 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon @@ -23,14 +23,14 @@ interface Interface { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: > = struct_value () [template] +// CHECK:STDOUT: %.5: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,10 +41,10 @@ interface Interface { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.loc12: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.5] {} +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] {} // 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 49cc0f9d5a21..fd35cb19731c 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 @@ -29,17 +29,17 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] -// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %T: Interface = bind_symbolic_name T 0 [symbolic] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %T: %.1 = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %CallStatic.type: type = fn_type @CallStatic [template] -// CHECK:STDOUT: %CallStatic: = struct_value () [template] +// CHECK:STDOUT: %CallStatic: %CallStatic.type = struct_value () [template] // CHECK:STDOUT: %CallFacet.type: type = fn_type @CallFacet [template] -// CHECK:STDOUT: %CallFacet: = struct_value () [template] +// CHECK:STDOUT: %CallFacet: %CallFacet.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,27 +49,27 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: .CallFacet = %CallFacet.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %CallStatic.decl: = fn_decl @CallStatic [template = constants.%CallStatic] { +// CHECK:STDOUT: %CallStatic.decl: %CallStatic.type = fn_decl @CallStatic [template = constants.%CallStatic] { // CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, %Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.loc13_15.1: Interface = param T -// CHECK:STDOUT: @CallStatic.%T: Interface = bind_symbolic_name T 0, %T.loc13_15.1 [symbolic = constants.%T] +// CHECK:STDOUT: %T.loc13_15.1: %.1 = param T +// CHECK:STDOUT: @CallStatic.%T: %.1 = bind_symbolic_name T 0, %T.loc13_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %CallFacet.decl: = fn_decl @CallFacet [template = constants.%CallFacet] { +// CHECK:STDOUT: %CallFacet.decl: %CallFacet.type = fn_decl @CallFacet [template = constants.%CallFacet] { // CHECK:STDOUT: %Interface.ref.loc21: type = name_ref Interface, %Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.loc21_14.1: Interface = param T -// CHECK:STDOUT: @CallFacet.%T: Interface = bind_symbolic_name T 0, %T.loc21_14.1 [symbolic = constants.%T] -// CHECK:STDOUT: %T.ref: Interface = name_ref T, @CallFacet.%T [symbolic = constants.%T] +// CHECK:STDOUT: %T.loc21_14.1: %.1 = param T +// CHECK:STDOUT: @CallFacet.%T: %.1 = bind_symbolic_name T 0, %T.loc21_14.1 [symbolic = constants.%T] +// CHECK:STDOUT: %T.ref: %.1 = name_ref T, @CallFacet.%T [symbolic = constants.%T] // CHECK:STDOUT: %.loc21_32.1: type = facet_type_access %T.ref [symbolic = constants.%T] // CHECK:STDOUT: %.loc21_32.2: type = converted %T.ref, %.loc21_32.1 [symbolic = constants.%T] -// CHECK:STDOUT: %x.loc21_29.1: T = param x -// CHECK:STDOUT: @CallFacet.%x: T = bind_name x, %x.loc21_29.1 +// CHECK:STDOUT: %x.loc21_29.1: %T = param x +// CHECK:STDOUT: @CallFacet.%x: %T = bind_name x, %x.loc21_29.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.loc11: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc11: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -79,16 +79,16 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallStatic(%T: Interface) { +// CHECK:STDOUT: fn @CallStatic(%T: %.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: Interface = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %F.ref: in Interface> = name_ref F, @Interface.%.loc11 [template = constants.%.4] +// CHECK:STDOUT: %T.ref: %.1 = name_ref T, %T [symbolic = constants.%T] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Interface.%.loc11 [template = constants.%.4] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @CallFacet(%T: Interface, %x: T) { +// CHECK:STDOUT: fn @CallFacet(%T: %.1, %x: %T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: T = name_ref x, %x +// CHECK:STDOUT: %x.ref: %T = name_ref x, %x // 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 ac42da109028..d39193af8e60 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 @@ -26,14 +26,14 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 1 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.5: > = struct_value () [template] +// CHECK:STDOUT: %.5: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,35 +44,35 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.5] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { // CHECK:STDOUT: %T.loc22_6.1: type = param T // CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T 0, %T.loc22_6.1 [symbolic = constants.%T] -// CHECK:STDOUT: %Self.ref.loc22_24: I = name_ref Self, @I.%Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.ref.loc22_24: %.1 = name_ref Self, @I.%Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc22_24.1: type = facet_type_access %Self.ref.loc22_24 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc22_24.2: type = converted %Self.ref.loc22_24, %.loc22_24.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc22_18.1: Self = param self -// CHECK:STDOUT: @.1.%self: Self = bind_name self, %self.loc22_18.1 -// CHECK:STDOUT: %Self.ref.loc22_35: I = name_ref Self, @I.%Self [symbolic = constants.%Self] +// CHECK:STDOUT: %self.loc22_18.1: %Self = param self +// CHECK:STDOUT: @.1.%self: %Self = bind_name self, %self.loc22_18.1 +// CHECK:STDOUT: %Self.ref.loc22_35: %.1 = name_ref Self, @I.%Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc22_35.1: type = facet_type_access %Self.ref.loc22_35 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc22_35.2: type = converted %Self.ref.loc22_35, %.loc22_35.1 [symbolic = constants.%Self] -// CHECK:STDOUT: @.1.%return: ref Self = var +// CHECK:STDOUT: @.1.%return: ref %Self = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 1 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %Self.ref.loc13_14: I = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 1 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %Self.ref.loc13_14: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref.loc13_14 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref.loc13_14, %.loc13_14.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc13_8.1: Self = param self -// CHECK:STDOUT: %self.loc13_8.2: Self = bind_name self, %self.loc13_8.1 -// CHECK:STDOUT: %Self.ref.loc13_25: I = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %self.loc13_8.1: %Self = param self +// CHECK:STDOUT: %self.loc13_8.2: %Self = bind_name self, %self.loc13_8.1 +// CHECK:STDOUT: %Self.ref.loc13_25: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_25.1: type = facet_type_access %Self.ref.loc13_25 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_25.2: type = converted %Self.ref.loc13_25, %.loc13_25.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_29: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc13_29: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -80,11 +80,11 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[@I.%self.loc13_8.2: Self]() -> Self; +// CHECK:STDOUT: fn @F[@I.%self.loc13_8.2: %Self]() -> %Self; // CHECK:STDOUT: -// CHECK:STDOUT: fn @.1[%self: Self]() -> Self { +// CHECK:STDOUT: fn @.1[%self: %Self]() -> %Self { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: Self = name_ref self, %self +// CHECK:STDOUT: %self.ref: %Self = name_ref self, %self // CHECK:STDOUT: return %self.ref // CHECK:STDOUT: } // CHECK:STDOUT: 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 10b41a6650af..cb2df1b34a9c 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon @@ -24,16 +24,16 @@ interface Modifiers { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Modifiers [template] -// CHECK:STDOUT: %Self: Modifiers = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Final.type: type = fn_type @Final [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Final: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Modifiers, [template] -// CHECK:STDOUT: %.4: in Modifiers> = assoc_entity element0, @Modifiers.%Final.decl [template] +// CHECK:STDOUT: %Final: %Final.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Modifiers, %Final.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Modifiers.%Final.decl [template] // CHECK:STDOUT: %Default.type: type = fn_type @Default [template] -// CHECK:STDOUT: %Default: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Modifiers, [template] -// CHECK:STDOUT: %.6: in Modifiers> = assoc_entity element1, @Modifiers.%Default.decl [template] +// CHECK:STDOUT: %Default: %Default.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Modifiers, %Default.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Modifiers.%Default.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,11 +44,11 @@ interface Modifiers { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Modifiers { -// CHECK:STDOUT: %Self: Modifiers = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Final.decl: = fn_decl @Final [template = constants.%Final] {} -// CHECK:STDOUT: %.loc16: in Modifiers> = assoc_entity element0, %Final.decl [template = constants.%.4] -// CHECK:STDOUT: %Default.decl: = fn_decl @Default [template = constants.%Default] {} -// CHECK:STDOUT: %.loc20: in Modifiers> = assoc_entity element1, %Default.decl [template = constants.%.6] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] {} +// CHECK:STDOUT: %.loc16: %.3 = assoc_entity element0, %Final.decl [template = constants.%.4] +// CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] {} +// CHECK:STDOUT: %.loc20: %.5 = assoc_entity element1, %Default.decl [template = constants.%.6] // 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 5e08b7fb4a6d..1ffc2a696b11 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -14,7 +14,7 @@ interface I[T:! type](N:! T); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %N: T = bind_symbolic_name N 1 [symbolic] +// CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic] // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -26,8 +26,8 @@ interface I[T:! type](N:! T); // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %N.loc11_23.1: T = param N -// CHECK:STDOUT: %N.loc11_23.2: T = bind_symbolic_name N 1, %N.loc11_23.1 [symbolic = constants.%N] +// CHECK:STDOUT: %N.loc11_23.1: %T = param N +// CHECK:STDOUT: %N.loc11_23.2: %T = bind_symbolic_name N 1, %N.loc11_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: 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 d77fb2d56590..0ed1d8d6c42e 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 @@ -20,19 +20,19 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T 1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @I.%U [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @I.%U [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.8: in I> = assoc_entity element2, @I.%G.decl [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @I, %G.type [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element2, @I.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,19 +43,19 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc12_8.1: type = param T // CHECK:STDOUT: %T.loc12_8.2: type = bind_symbolic_name T 1, %T.loc12_8.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: %U: type = assoc_const_decl U [template] -// CHECK:STDOUT: %.loc13: = assoc_entity element1, %U [template = constants.%.6] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %.loc13: %.5 = assoc_entity element1, %U [template = constants.%.6] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.loc16_8.1: type = param T // CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T 1, %T.loc16_8.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: in I> = assoc_entity element2, %G.decl [template = constants.%.8] +// CHECK:STDOUT: %.loc16: %.7 = assoc_entity element2, %G.decl [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index ade12d20ee99..ba70f25db3b4 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -52,26 +52,26 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self.1: Empty = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = interface_type @Basic [template] -// CHECK:STDOUT: %Self.2: Basic = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.3: type = assoc_entity_type @Basic, type [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Basic.%T [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Basic.%T [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.5: type = tuple_type () [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Basic, [template] -// CHECK:STDOUT: %.7: in Basic> = assoc_entity element1, @Basic.%F.decl [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Basic, %F.type.1 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element1, @Basic.%F.decl [template] // CHECK:STDOUT: %.8: type = interface_type @ForwardDeclared [template] -// CHECK:STDOUT: %Self.3: ForwardDeclared = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.3: %.8 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.9: type = assoc_entity_type @ForwardDeclared, type [template] -// CHECK:STDOUT: %.10: = assoc_entity element0, @ForwardDeclared.%T [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, @ForwardDeclared.%T [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, [template] -// CHECK:STDOUT: %.12: in ForwardDeclared> = assoc_entity element1, @ForwardDeclared.%F.decl [template] -// CHECK:STDOUT: %.13: type = struct_type {.f: ForwardDeclared} [template] -// CHECK:STDOUT: %.14: type = struct_type {.f: ()} [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, %F.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element1, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %.13: type = struct_type {.f: %.8} [template] +// CHECK:STDOUT: %.14: type = struct_type {.f: %.5} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,13 +85,13 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%.2] {} // CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%.8] {} // CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, %ForwardDeclared.decl [template = constants.%.8] -// CHECK:STDOUT: %.loc20: type = struct_type {.f: ForwardDeclared} [template = constants.%.13] -// CHECK:STDOUT: %f_ref.var: ref {.f: ForwardDeclared} = var f_ref -// CHECK:STDOUT: %f_ref: ref {.f: ForwardDeclared} = bind_name f_ref, %f_ref.var +// CHECK:STDOUT: %.loc20: type = struct_type {.f: %.8} [template = constants.%.13] +// CHECK:STDOUT: %f_ref.var: ref %.13 = var f_ref +// CHECK:STDOUT: %f_ref: ref %.13 = bind_name f_ref, %f_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { -// CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -99,11 +99,11 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Basic { -// CHECK:STDOUT: %Self: Basic = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc8: = assoc_entity element0, %T [template = constants.%.4] -// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} -// CHECK:STDOUT: %.loc9: in Basic> = assoc_entity element1, %F.decl [template = constants.%.7] +// CHECK:STDOUT: %.loc8: %.3 = assoc_entity element0, %T [template = constants.%.4] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc9: %.6 = assoc_entity element1, %F.decl [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -113,11 +113,11 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { -// CHECK:STDOUT: %Self: ForwardDeclared = bind_symbolic_name Self 0 [symbolic = constants.%Self.3] +// CHECK:STDOUT: %Self: %.8 = bind_symbolic_name Self 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc16: = assoc_entity element0, %T [template = constants.%.10] -// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.loc17: in ForwardDeclared> = assoc_entity element1, %F.decl [template = constants.%.12] +// CHECK:STDOUT: %.loc16: %.9 = assoc_entity element0, %T [template = constants.%.10] +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %.loc17: %.11 = assoc_entity element1, %F.decl [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -134,33 +134,33 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] -// CHECK:STDOUT: %Self.1: Empty = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %UseEmpty: = struct_value () [template] +// CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [template] // CHECK:STDOUT: %.3: type = interface_type @Basic [template] -// CHECK:STDOUT: %Self.2: Basic = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.3 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %UseBasic.type: type = fn_type @UseBasic [template] -// CHECK:STDOUT: %UseBasic: = struct_value () [template] +// CHECK:STDOUT: %UseBasic: %UseBasic.type = struct_value () [template] // CHECK:STDOUT: %.4: type = interface_type @ForwardDeclared [template] -// CHECK:STDOUT: %Self.3: ForwardDeclared = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.3: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %UseForwardDeclared.type: type = fn_type @UseForwardDeclared [template] -// CHECK:STDOUT: %UseForwardDeclared: = struct_value () [template] +// CHECK:STDOUT: %UseForwardDeclared: %UseForwardDeclared.type = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @Basic, type [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.16 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.16 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %F.1: = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @Basic, [template] -// CHECK:STDOUT: %.8: in Basic> = assoc_entity element1, file.%import_ref.17 [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @Basic, %F.type.1 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, file.%import_ref.17 [template] // CHECK:STDOUT: %.9: type = assoc_entity_type @ForwardDeclared, type [template] -// CHECK:STDOUT: %.10: = assoc_entity element0, file.%import_ref.18 [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, file.%import_ref.18 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %F.2: = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, [template] -// CHECK:STDOUT: %.12: in ForwardDeclared> = assoc_entity element1, file.%import_ref.19 [template] -// CHECK:STDOUT: %.13: type = ptr_type ForwardDeclared [template] -// CHECK:STDOUT: %.14: type = struct_type {.f: ForwardDeclared} [template] -// CHECK:STDOUT: %.15: type = struct_type {.f: ()} [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, %F.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element1, file.%import_ref.19 [template] +// CHECK:STDOUT: %.13: type = ptr_type %.4 [template] +// CHECK:STDOUT: %.14: type = struct_type {.f: %.4} [template] +// CHECK:STDOUT: %.15: type = struct_type {.f: %.2} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -181,53 +181,53 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+1, loaded [template = constants.%.1] // CHECK:STDOUT: %import_ref.2: type = import_ref ir1, inst+5, loaded [template = constants.%.3] // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+20, loaded [template = constants.%.4] -// CHECK:STDOUT: %import_ref.4: ref {.f: ForwardDeclared} = import_ref ir1, inst+42, loaded +// CHECK:STDOUT: %import_ref.4: ref %.14 = import_ref ir1, inst+42, loaded // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %UseEmpty.decl: = fn_decl @UseEmpty [template = constants.%UseEmpty] { +// CHECK:STDOUT: %UseEmpty.decl: %UseEmpty.type = fn_decl @UseEmpty [template = constants.%UseEmpty] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %e.loc6_13.1: Empty = param e -// CHECK:STDOUT: @UseEmpty.%e: Empty = bind_name e, %e.loc6_13.1 +// CHECK:STDOUT: %e.loc6_13.1: %.1 = param e +// CHECK:STDOUT: @UseEmpty.%e: %.1 = bind_name e, %e.loc6_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: in Basic> = import_ref ir1, inst+18, loaded [template = constants.%.8] -// CHECK:STDOUT: %import_ref.8: = import_ref ir1, inst+11, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.7: %.7 = import_ref ir1, inst+18, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.8: %.5 = import_ref ir1, inst+11, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.9 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir1, inst+13, unloaded -// CHECK:STDOUT: %UseBasic.decl: = fn_decl @UseBasic [template = constants.%UseBasic] { +// CHECK:STDOUT: %UseBasic.decl: %UseBasic.type = fn_decl @UseBasic [template = constants.%UseBasic] { // CHECK:STDOUT: %Basic.ref.loc7: type = name_ref Basic, %import_ref.2 [template = constants.%.3] -// CHECK:STDOUT: %e.loc7_13.1: Basic = param e -// CHECK:STDOUT: @UseBasic.%e: Basic = bind_name e, %e.loc7_13.1 +// CHECK:STDOUT: %e.loc7_13.1: %.3 = param e +// CHECK:STDOUT: @UseBasic.%e: %.3 = bind_name e, %e.loc7_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11 = import_ref ir1, inst+22, unloaded -// CHECK:STDOUT: %import_ref.12: in ForwardDeclared> = import_ref ir1, inst+32, loaded [template = constants.%.12] -// CHECK:STDOUT: %import_ref.13: = import_ref ir1, inst+26, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.12: %.11 = import_ref ir1, inst+32, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.13: %.9 = import_ref ir1, inst+26, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.14 = import_ref ir1, inst+24, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref ir1, inst+28, unloaded -// CHECK:STDOUT: %UseForwardDeclared.decl: = fn_decl @UseForwardDeclared [template = constants.%UseForwardDeclared] { +// CHECK:STDOUT: %UseForwardDeclared.decl: %UseForwardDeclared.type = fn_decl @UseForwardDeclared [template = constants.%UseForwardDeclared] { // CHECK:STDOUT: %ForwardDeclared.ref.loc8: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %f.loc8_23.1: ForwardDeclared = param f -// CHECK:STDOUT: @UseForwardDeclared.%f: ForwardDeclared = bind_name f, %f.loc8_23.1 +// CHECK:STDOUT: %f.loc8_23.1: %.4 = param f +// CHECK:STDOUT: @UseForwardDeclared.%f: %.4 = bind_name f, %f.loc8_23.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, %import_ref.2 [template = constants.%.3] // CHECK:STDOUT: %import_ref.16 = import_ref ir1, inst+9, unloaded -// CHECK:STDOUT: %T.ref.loc10: = name_ref T, %import_ref.8 [template = constants.%.6] -// CHECK:STDOUT: %UseBasicT: = bind_alias UseBasicT, %import_ref.8 [template = constants.%.6] +// CHECK:STDOUT: %T.ref.loc10: %.5 = name_ref T, %import_ref.8 [template = constants.%.6] +// CHECK:STDOUT: %UseBasicT: %.5 = bind_alias UseBasicT, %import_ref.8 [template = constants.%.6] // CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, %import_ref.2 [template = constants.%.3] // CHECK:STDOUT: %import_ref.17 = import_ref ir1, inst+13, unloaded -// CHECK:STDOUT: %F.ref.loc11: in Basic> = name_ref F, %import_ref.7 [template = constants.%.8] -// CHECK:STDOUT: %UseBasicF: in Basic> = bind_alias UseBasicF, %import_ref.7 [template = constants.%.8] +// CHECK:STDOUT: %F.ref.loc11: %.7 = name_ref F, %import_ref.7 [template = constants.%.8] +// CHECK:STDOUT: %UseBasicF: %.7 = bind_alias UseBasicF, %import_ref.7 [template = constants.%.8] // CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] // CHECK:STDOUT: %import_ref.18 = import_ref ir1, inst+24, unloaded -// CHECK:STDOUT: %T.ref.loc13: = name_ref T, %import_ref.13 [template = constants.%.10] -// CHECK:STDOUT: %UseForwardDeclaredT: = bind_alias UseForwardDeclaredT, %import_ref.13 [template = constants.%.10] +// CHECK:STDOUT: %T.ref.loc13: %.9 = name_ref T, %import_ref.13 [template = constants.%.10] +// CHECK:STDOUT: %UseForwardDeclaredT: %.9 = bind_alias UseForwardDeclaredT, %import_ref.13 [template = constants.%.10] // CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] // CHECK:STDOUT: %import_ref.19 = import_ref ir1, inst+28, unloaded -// CHECK:STDOUT: %F.ref.loc14: in ForwardDeclared> = name_ref F, %import_ref.12 [template = constants.%.12] -// CHECK:STDOUT: %UseForwardDeclaredF: in ForwardDeclared> = bind_alias UseForwardDeclaredF, %import_ref.12 [template = constants.%.12] +// CHECK:STDOUT: %F.ref.loc14: %.11 = name_ref F, %import_ref.12 [template = constants.%.12] +// CHECK:STDOUT: %UseForwardDeclaredF: %.11 = bind_alias UseForwardDeclaredF, %import_ref.12 [template = constants.%.12] // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %.loc16: type = ptr_type ForwardDeclared [template = constants.%.13] -// CHECK:STDOUT: %f.var: ref ForwardDeclared* = var f -// CHECK:STDOUT: %f.loc16: ref ForwardDeclared* = bind_name f, %f.var +// CHECK:STDOUT: %.loc16: type = ptr_type %.4 [template = constants.%.13] +// CHECK:STDOUT: %f.var: ref %.13 = var f +// CHECK:STDOUT: %f.loc16: ref %.13 = bind_name f, %f.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { @@ -252,17 +252,17 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: witness = (file.%import_ref.14, file.%import_ref.15) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseEmpty(%e: Empty) { +// CHECK:STDOUT: fn @UseEmpty(%e: %.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseBasic(%e: Basic) { +// CHECK:STDOUT: fn @UseBasic(%e: %.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseForwardDeclared(%f: ForwardDeclared) { +// CHECK:STDOUT: fn @UseForwardDeclared(%f: %.4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -273,9 +273,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %f_ref.ref: ref {.f: ForwardDeclared} = name_ref f_ref, file.%import_ref.4 -// CHECK:STDOUT: %.loc16_33: ref ForwardDeclared = struct_access %f_ref.ref, element0 -// CHECK:STDOUT: %.loc16_27: ForwardDeclared* = addr_of %.loc16_33 +// CHECK:STDOUT: %f_ref.ref: ref %.14 = name_ref f_ref, file.%import_ref.4 +// CHECK:STDOUT: %.loc16_33: ref %.4 = struct_access %f_ref.ref, element0 +// CHECK:STDOUT: %.loc16_27: %.13 = 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 a5a5392a6130..41032cee4bbd 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -152,7 +152,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Def [template] -// CHECK:STDOUT: %Self: Def = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,7 +163,7 @@ private interface Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Def { -// CHECK:STDOUT: %Self: Def = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -174,7 +174,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @ForwardWithDef [template] -// CHECK:STDOUT: %Self: ForwardWithDef = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -186,7 +186,7 @@ private interface Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardWithDef { -// CHECK:STDOUT: %Self: ForwardWithDef = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -204,14 +204,14 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.loc8_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc8_6.1 @@ -228,14 +228,14 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 @@ -252,7 +252,7 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -261,7 +261,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i @@ -279,14 +279,14 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.loc8_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc8_6.1 @@ -303,14 +303,14 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 @@ -327,7 +327,7 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -336,7 +336,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i @@ -354,9 +354,9 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: type = interface_type @Forward [template] -// CHECK:STDOUT: %Self: Forward = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -364,7 +364,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Forward = %Forward.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc8: type = ptr_type [template = ] // CHECK:STDOUT: %i.loc8_6.1: = param i @@ -374,7 +374,7 @@ private interface Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Forward { -// CHECK:STDOUT: %Self: Forward = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -391,14 +391,14 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc10: type = ptr_type [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i @@ -416,7 +416,7 @@ private interface Redecl {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -425,7 +425,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc9: type = ptr_type [template = ] // CHECK:STDOUT: %i.loc9_6.1: = param i @@ -442,7 +442,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Redecl [template] -// CHECK:STDOUT: %Self: Redecl = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -454,7 +454,7 @@ private interface Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Redecl { -// CHECK:STDOUT: %Self: Redecl = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 42666d2171c8..ddb193bae8ef 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -16,12 +16,12 @@ interface UseSelf { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @UseSelf [template] -// CHECK:STDOUT: %Self: UseSelf = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, [template] -// CHECK:STDOUT: %.4: in UseSelf> = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,19 +32,19 @@ interface UseSelf { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { -// CHECK:STDOUT: %Self: UseSelf = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %Self.ref.loc12_14: UseSelf = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %self.loc12_8.1: Self = param self -// CHECK:STDOUT: %self.loc12_8.2: Self = bind_name self, %self.loc12_8.1 -// CHECK:STDOUT: %Self.ref.loc12_25: UseSelf = name_ref Self, %Self [symbolic = constants.%Self] +// CHECK:STDOUT: %self.loc12_8.1: %Self = param self +// CHECK:STDOUT: %self.loc12_8.2: %Self = bind_name self, %self.loc12_8.1 +// CHECK:STDOUT: %Self.ref.loc12_25: %.1 = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_25.1: type = facet_type_access %Self.ref.loc12_25 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_25.2: type = converted %Self.ref.loc12_25, %.loc12_25.1 [symbolic = constants.%Self] -// CHECK:STDOUT: %return.var: ref Self = var +// CHECK:STDOUT: %return.var: ref %Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_29: in UseSelf> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_29: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -52,5 +52,5 @@ interface UseSelf { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F[@UseSelf.%self.loc12_8.2: Self]() -> Self; +// CHECK:STDOUT: fn @F[@UseSelf.%self.loc12_8.2: %Self]() -> %Self; // 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 5d71cce144d2..ceed03c73b7a 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -23,25 +23,25 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @I, [template] -// CHECK:STDOUT: %.6: in I> = assoc_entity element1, @I.%G.decl [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @I, %G.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @I.%G.decl [template] // CHECK:STDOUT: %.7: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.9: type = assoc_entity_type @I, type [template] -// CHECK:STDOUT: %.10: = assoc_entity element2, @I.%T [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element2, @I.%T [template] // CHECK:STDOUT: %.11: i32 = int_literal 42 [template] // CHECK:STDOUT: %.12: type = assoc_entity_type @I, i32 [template] -// CHECK:STDOUT: %.13: = assoc_entity element3, @I.%N [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element3, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,19 +51,19 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %.loc13: in I> = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32.loc14_11, %.loc14_11.1 [template = i32] @@ -79,23 +79,23 @@ interface I { // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_32.loc14_27, %.loc14_27.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_31: in I> = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc14_31: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] // 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: (type, type) = tuple_literal (%int.make_type_32.loc18_19, %int.make_type_32.loc18_24) +// CHECK:STDOUT: %.loc18_27: %.7 = 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.%.8 [template = constants.%.8] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_28.6: = assoc_entity element2, %T [template = constants.%.10] +// CHECK:STDOUT: %.loc18_28.6: %.9 = assoc_entity element2, %T [template = constants.%.10] // 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_literal 42 [template = constants.%.11] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc19_19: = assoc_entity element3, %N [template = constants.%.13] +// CHECK:STDOUT: %.loc19_19: %.12 = assoc_entity element3, %N [template = constants.%.13] // 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 46b11c0518ef..ecb1ff002b82 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -15,10 +15,10 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -29,9 +29,9 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index f2615f34a6a5..f1facc71062b 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -20,16 +20,16 @@ fn F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [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 (i32, i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: i32 = int_literal 3 [template] -// CHECK:STDOUT: %tuple: (i32, i32, i32) = tuple_value (%.5, %.6, %.7) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,19 +38,19 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -60,7 +60,7 @@ 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: (type, type, type) = 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: %.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.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] @@ -68,25 +68,25 @@ fn F() -> 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 (i32, i32, i32) = var v -// CHECK:STDOUT: %v: ref (i32, i32, i32) = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref %.3 = var v +// CHECK:STDOUT: %v: ref %.3 = bind_name v, %v.var // CHECK:STDOUT: %.loc12_29: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc12_32: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc12_35: i32 = int_literal 3 [template = constants.%.7] -// CHECK:STDOUT: %.loc12_36.1: (i32, i32, i32) = tuple_literal (%.loc12_29, %.loc12_32, %.loc12_35) +// CHECK:STDOUT: %.loc12_36.1: %.3 = 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.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.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 (i32, i32, i32) = tuple_init (%.loc12_36.3, %.loc12_36.5, %.loc12_36.7) to %v.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_37: init (i32, i32, i32) = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] +// 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: 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: (type, type, type) = 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: %.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] @@ -94,17 +94,17 @@ fn F() -> 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 (i32, i32, i32) = name_ref v, %v +// CHECK:STDOUT: %v.ref: ref %.3 = 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: (i32, i32, i32) = tuple_value (%.loc14_28.2, %.loc14_28.4, %.loc14_28.6) -// CHECK:STDOUT: %.loc14_29: (i32, i32, i32) = converted %v.ref, %tuple -// CHECK:STDOUT: %w: (i32, i32, i32) = bind_name w, %.loc14_29 -// CHECK:STDOUT: %w.ref: (i32, i32, i32) = name_ref w, %w +// 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_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc15_13: i32 = tuple_index %w.ref, %.loc15_12 // CHECK:STDOUT: return %.loc15_13 diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index bbd1777bca13..cdc92b7306eb 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -24,9 +24,9 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -37,9 +37,9 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index f6ab924b972f..0bd1b9186f64 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -27,9 +27,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: } @@ -40,9 +40,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_32.loc12_9 [template = i32] // CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_32.loc12_9, %.loc12_9.1 [template = i32] @@ -53,7 +53,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_32.loc12_17, %.loc12_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -66,8 +66,8 @@ fn F(a: i32) -> 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: %.loc18: i32 = int_literal 5 [template = constants.%.2] -// CHECK:STDOUT: %x: T = bind_name x, -// CHECK:STDOUT: %x.ref: T = name_ref x, %x +// CHECK:STDOUT: %x: %T = bind_name x, +// CHECK:STDOUT: %x.ref: %T = name_ref x, %x // CHECK:STDOUT: return // 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 e9de7810e54f..7b8e821daf13 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -29,7 +29,7 @@ let a: T = 0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,7 +38,7 @@ let a: T = 0; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32, %.loc4_19.1 [template = i32] @@ -63,6 +63,6 @@ let a: T = 0; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %T.ref: type = name_ref T, %import_ref [symbolic = constants.%T] // CHECK:STDOUT: %.loc8: i32 = int_literal 0 [template = constants.%.1] -// CHECK:STDOUT: %a: T = bind_name a, +// CHECK:STDOUT: %a: %T = bind_name a, // 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 5d945916fe52..d136195f1ac1 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -26,9 +26,9 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,13 +37,13 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %n: i32 = bind_name n, -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 2e744cfc6637..f647949afce6 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -88,7 +88,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -97,49 +97,49 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_32.loc15, %.loc15_18.1 [template = i32] // CHECK:STDOUT: %.loc15_24: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc15_24 -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_16.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_16.2: type = converted %int.make_type_32.loc21, %.loc21_16.1 [template = i32] // CHECK:STDOUT: %.loc21_22: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc21_22 -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_14.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_14.2: type = converted %int.make_type_32.loc27, %.loc27_14.1 [template = i32] // CHECK:STDOUT: %.loc27_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %d: i32 = bind_name d, %.loc27_20 -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_16.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_16.2: type = converted %int.make_type_32.loc33, %.loc33_16.1 [template = i32] // CHECK:STDOUT: %.loc33_22: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %e: i32 = bind_name e, %.loc33_22 -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc46: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_22.1: type = value_of_initializer %int.make_type_32.loc46 [template = i32] // CHECK:STDOUT: %.loc46_22.2: type = converted %int.make_type_32.loc46, %.loc46_22.1 [template = i32] // CHECK:STDOUT: %.loc46_28: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %f: i32 = bind_name f, %.loc46_28 -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc59: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc59_24.1: type = value_of_initializer %int.make_type_32.loc59 [template = i32] // CHECK:STDOUT: %.loc59_24.2: type = converted %int.make_type_32.loc59, %.loc59_24.1 [template = i32] // CHECK:STDOUT: %.loc59_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %g: i32 = bind_name g, %.loc59_30 -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc72: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc72_26.1: type = value_of_initializer %int.make_type_32.loc72 [template = i32] // CHECK:STDOUT: %.loc72_26.2: type = converted %int.make_type_32.loc72, %.loc72_26.1 [template = i32] // CHECK:STDOUT: %.loc72_32: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %h: i32 = bind_name h, %.loc72_32 -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc84: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc84_28.1: type = value_of_initializer %int.make_type_32.loc84 [template = i32] // CHECK:STDOUT: %.loc84_28.2: type = converted %int.make_type_32.loc84, %.loc84_28.1 [template = i32] diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index a525fbd5946b..2046da57eb41 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -20,9 +20,9 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,8 +31,8 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 75bad6794f32..0e04a8c19c52 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -19,11 +19,11 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %.2: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,8 +32,8 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -43,16 +43,16 @@ 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 T* = var p -// CHECK:STDOUT: %p: ref T* = bind_name p, %p.var +// 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: %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 T* = name_ref p, %p -// CHECK:STDOUT: %.loc14_15: T* = 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: %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: %.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 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 538918a1c86f..6e878db38d20 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -26,7 +26,7 @@ var b: T = *a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,7 +35,7 @@ var b: T = *a; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32, %.loc4_19.1 [template = i32] @@ -48,7 +48,7 @@ var b: T = *a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.1: type = ptr_type T [symbolic] +// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,20 +61,20 @@ var b: T = *a; // CHECK:STDOUT: %import_ref: type = import_ref ir0, inst+2, loaded [symbolic = constants.%T] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %import_ref [symbolic = constants.%T] -// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] -// CHECK:STDOUT: %a.var: ref T* = var a -// CHECK:STDOUT: %a: ref T* = bind_name a, %a.var +// CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = constants.%.1] +// CHECK:STDOUT: %a.var: ref %.1 = var a +// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var // CHECK:STDOUT: %T.ref.loc5: type = name_ref T, %import_ref [symbolic = constants.%T] -// CHECK:STDOUT: %b.var: ref T = var b -// CHECK:STDOUT: %b: ref T = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %T = var b +// CHECK:STDOUT: %b: ref %T = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: ref T* = name_ref a, file.%a -// CHECK:STDOUT: %.loc5_13: T* = bind_value %a.ref -// CHECK:STDOUT: %.loc5_12.1: ref T = deref %.loc5_13 -// CHECK:STDOUT: %.loc5_12.2: T = bind_value %.loc5_12.1 +// CHECK:STDOUT: %a.ref: ref %.1 = name_ref a, file.%a +// CHECK:STDOUT: %.loc5_13: %.1 = bind_value %a.ref +// CHECK:STDOUT: %.loc5_12.1: ref %T = deref %.loc5_13 +// CHECK:STDOUT: %.loc5_12.2: %T = bind_value %.loc5_12.1 // CHECK:STDOUT: assign file.%b.var, %.loc5_12.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index 683ff81e750f..f9c225900571 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -17,10 +17,10 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,14 +29,14 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc11_14 -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // 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] diff --git a/toolchain/check/testdata/let/import.carbon b/toolchain/check/testdata/let/import.carbon index 8bffeafbe6b3..c99df1b18869 100644 --- a/toolchain/check/testdata/let/import.carbon +++ b/toolchain/check/testdata/let/import.carbon @@ -25,7 +25,7 @@ let b:! bool = a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %a: bool = bind_symbolic_name a 0 [symbolic] // CHECK:STDOUT: } @@ -35,7 +35,7 @@ let b:! bool = a; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_9.2: type = converted %bool.make_type, %.loc4_9.1 [template = bool] @@ -50,7 +50,7 @@ let b:! bool = a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %a: bool = bind_symbolic_name a 0 [symbolic] // CHECK:STDOUT: %b: bool = bind_symbolic_name b 0 [symbolic] // CHECK:STDOUT: } @@ -62,7 +62,7 @@ let b:! bool = a; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: bool = import_ref ir0, inst+11, loaded [symbolic = constants.%a] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_9.2: type = converted %bool.make_type, %.loc4_9.1 [template = bool] diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index a23d060f4dea..56c0cd5dc2dc 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -18,9 +18,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,9 +29,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] @@ -42,7 +42,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11_17, %.loc11_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/let/no_prelude/import_access.carbon b/toolchain/check/testdata/let/no_prelude/import_access.carbon index a48f77368e85..5737d877a720 100644 --- a/toolchain/check/testdata/let/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/let/no_prelude/import_access.carbon @@ -59,17 +59,17 @@ let v2: () = Test.v; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] {} -// CHECK:STDOUT: %.loc4_17.1: () = tuple_literal () +// 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_22: () = tuple_literal () -// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_23: () = converted %.loc4_22, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %v: () = bind_name v, %.loc4_23 +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_def.impl.carbon @@ -80,10 +80,10 @@ let v2: () = Test.v; // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] {} -// CHECK:STDOUT: %.loc8_10.1: () = tuple_literal () +// 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: %v.ref: = name_ref v, [template = ] -// CHECK:STDOUT: %v2: () = bind_name v2, +// CHECK:STDOUT: %v2: %.1 = bind_name v2, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_local_def.carbon @@ -94,10 +94,10 @@ let v2: () = Test.v; // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] {} -// CHECK:STDOUT: %.loc10_10.1: () = tuple_literal () +// 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: %v.ref: = name_ref v, [template = ] -// CHECK:STDOUT: %v2: () = bind_name v2, +// CHECK:STDOUT: %v2: %.1 = bind_name v2, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_other_def.carbon @@ -111,10 +111,10 @@ let v2: () = Test.v; // CHECK:STDOUT: .Test = %Test // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %.loc9_10.1: () = tuple_literal () +// 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: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %v.ref: = name_ref v, [template = ] -// CHECK:STDOUT: %v2: () = bind_name v2, +// CHECK:STDOUT: %v2: %.1 = bind_name v2, // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 288f65ba4e12..4f3748222369 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -19,9 +19,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -31,9 +31,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] @@ -44,7 +44,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11_17, %.loc11_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 4df0057e44df..17ebf22f5a7e 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -38,9 +38,9 @@ var a: i32 = NS.A(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -55,14 +55,14 @@ var a: i32 = NS.A(); // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4, %.loc4_14.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] @@ -81,7 +81,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 84ac86ffc62b..ef17541d1883 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -25,14 +25,14 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,25 +50,25 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: } // CHECK:STDOUT: %NS.ref.loc13: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %ns: = bind_alias ns, %NS [template = %NS] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // 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: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_32.loc17, %.loc17_11.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %NS.ref.loc19: = name_ref NS, %NS [template = %NS] -// CHECK:STDOUT: %A.ref: = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %C: = bind_alias C, %A.decl [template = constants.%A] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] { +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A] +// CHECK:STDOUT: %C: %A.type = bind_alias C, %A.decl [template = constants.%A] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32.loc21, %.loc21_11.1 [template = i32] @@ -87,7 +87,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ns.ref: = name_ref ns, file.%ns [template = file.%NS] -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc17_30.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc17_30.2: i32 = converted %A.call, %.loc17_30.1 @@ -96,7 +96,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: // CHECK:STDOUT: fn @D() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: = name_ref C, file.%C [template = constants.%A] +// CHECK:STDOUT: %C.ref: %A.type = name_ref C, file.%C [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %C.ref() // CHECK:STDOUT: %.loc21_27.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc21_27.2: i32 = converted %A.call, %.loc21_27.1 diff --git a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon index b863e5ced816..5443f46e4e36 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon @@ -61,9 +61,9 @@ fn NS(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template] // CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] -// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %.3: %.type.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,9 +75,9 @@ fn NS(); // CHECK:STDOUT: %NS: = namespace %import_ref, [template] {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc8: = namespace [template] {} -// CHECK:STDOUT: %.decl.loc17: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %.decl.loc17: %.type.1 = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: %.loc21: = namespace [template] {} -// CHECK:STDOUT: %.decl.loc29: > = fn_decl @.2 [template = constants.%.3] {} +// CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.3] {} // 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 7ca932303493..3552b6e78889 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon @@ -49,9 +49,9 @@ fn NS.Foo(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -64,8 +64,8 @@ fn NS.Foo(); // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(); 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 7acc63d5025e..0b1f5adcf46a 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon @@ -48,7 +48,7 @@ fn NS.Foo(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %NS: = struct_value () [template] +// CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,7 +57,7 @@ fn NS.Foo(); // CHECK:STDOUT: .NS = %NS.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %NS.decl: = fn_decl @NS [template = constants.%NS] {} +// CHECK:STDOUT: %NS.decl: %NS.type = fn_decl @NS [template = constants.%NS] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS(); @@ -67,9 +67,9 @@ fn NS.Foo(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %NS: = struct_value () [template] +// CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,10 +77,10 @@ fn NS.Foo(); // CHECK:STDOUT: .NS = %import_ref // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+2, loaded [template = constants.%NS] +// CHECK:STDOUT: %import_ref: %NS.type = import_ref ir1, inst+2, loaded [template = constants.%NS] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc16: = namespace [template] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} // 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 bee2885e48e1..dda00a56395d 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 @@ -47,7 +47,7 @@ fn NS.Bar() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,7 +59,7 @@ fn NS.Bar() {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { @@ -72,7 +72,7 @@ fn NS.Bar() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %NS: = struct_value () [template] +// CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,7 +81,7 @@ fn NS.Bar() {} // CHECK:STDOUT: .NS = %NS.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %NS.decl: = fn_decl @NS [template = constants.%NS] {} +// CHECK:STDOUT: %NS.decl: %NS.type = fn_decl @NS [template = constants.%NS] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS() { @@ -94,7 +94,7 @@ fn NS.Bar() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bar: = struct_value () [template] +// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -110,7 +110,7 @@ fn NS.Bar() {} // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} +// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar() { 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 008a72a816ee..e511bb0ca2c5 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 @@ -47,7 +47,7 @@ fn NS.Bar() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %NS: = struct_value () [template] +// CHECK:STDOUT: %NS: %NS.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,7 +56,7 @@ fn NS.Bar() {} // CHECK:STDOUT: .NS = %NS.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %NS.decl: = fn_decl @NS [template = constants.%NS] {} +// CHECK:STDOUT: %NS.decl: %NS.type = fn_decl @NS [template = constants.%NS] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS() { @@ -69,7 +69,7 @@ fn NS.Bar() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,7 +81,7 @@ fn NS.Bar() {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { @@ -94,7 +94,7 @@ fn NS.Bar() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bar: = struct_value () [template] +// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -110,7 +110,7 @@ fn NS.Bar() {} // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+3, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} +// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar() { diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index bb52e8ddfe21..78853f2a1cc7 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -26,9 +26,9 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,8 +42,8 @@ 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: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_32, %.loc22_14.1 [template = i32] diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index a981fcc7204c..2c42a55587a6 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.carbon @@ -27,7 +27,7 @@ fn Foo.Baz() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Baz: = struct_value () [template] +// CHECK:STDOUT: %Baz: %Baz.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,8 +39,8 @@ fn Foo.Baz() { // CHECK:STDOUT: %Foo: = namespace [template] { // CHECK:STDOUT: .Baz = %Baz.decl.loc13 // CHECK:STDOUT: } -// CHECK:STDOUT: %Baz.decl.loc13: = fn_decl @Baz [template = constants.%Baz] {} -// CHECK:STDOUT: %Baz.decl.loc22: = fn_decl @Baz [template = constants.%Baz] {} +// CHECK:STDOUT: %Baz.decl.loc13: %Baz.type = fn_decl @Baz [template = constants.%Baz] {} +// CHECK:STDOUT: %Baz.decl.loc22: %Baz.type = fn_decl @Baz [template = constants.%Baz] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Baz() { diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 1071c157fca6..c5cd7df31c46 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -43,12 +43,12 @@ fn D(T:! type).F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -63,8 +63,8 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %A: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_16.2: type = converted %int.make_type_32, %.loc24_16.1 [template = i32] @@ -74,11 +74,11 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %T.loc30_13.1: type = param T // CHECK:STDOUT: %T.loc30_13.2: type = bind_symbolic_name T 0, %T.loc30_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc30_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %x.loc30_23.1: T = param x -// CHECK:STDOUT: %x.loc30_23.2: T = bind_name x, %x.loc30_23.1 +// CHECK:STDOUT: %x.loc30_23.1: %T = param x +// CHECK:STDOUT: %x.loc30_23.2: %T = bind_name x, %x.loc30_23.1 // CHECK:STDOUT: %C: = namespace [template] {} // CHECK:STDOUT: %D: = namespace [template] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc39_6.1: type = param T // CHECK:STDOUT: %T.loc39_6.2: type = bind_symbolic_name T 0, %T.loc39_6.1 [symbolic = 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 73528e616ee7..103dddf6eefb 100644 --- a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon +++ b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon @@ -19,7 +19,7 @@ fn Foo.Baz() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.2: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,7 +27,7 @@ fn Foo.Baz() { // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {} // 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 2961b209b772..afc13602ec7d 100644 --- a/toolchain/check/testdata/namespace/function.carbon +++ b/toolchain/check/testdata/namespace/function.carbon @@ -26,11 +26,11 @@ fn Bar() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Baz.type.1: type = fn_type @Baz.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Baz.1: = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %Baz.2: %Baz.type.2 = struct_value () [template] // CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] -// CHECK:STDOUT: %Bar: = struct_value () [template] +// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,9 +44,9 @@ fn Bar() { // CHECK:STDOUT: %Foo: = namespace [template] { // CHECK:STDOUT: .Baz = %Baz.decl.loc17 // CHECK:STDOUT: } -// CHECK:STDOUT: %Baz.decl.loc14: = fn_decl @Baz.1 [template = constants.%Baz.1] {} -// CHECK:STDOUT: %Baz.decl.loc17: = fn_decl @Baz.2 [template = constants.%Baz.2] {} -// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} +// CHECK:STDOUT: %Baz.decl.loc14: %Baz.type.1 = fn_decl @Baz.1 [template = constants.%Baz.1] {} +// CHECK:STDOUT: %Baz.decl.loc17: %Baz.type.2 = fn_decl @Baz.2 [template = constants.%Baz.2] {} +// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Baz.1() { @@ -62,8 +62,8 @@ fn Bar() { // CHECK:STDOUT: fn @Bar() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo [template = file.%Foo] -// CHECK:STDOUT: %Baz.ref: = name_ref Baz, file.%Baz.decl.loc17 [template = constants.%Baz.2] -// CHECK:STDOUT: %Baz.call: init () = call %Baz.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/imported.carbon b/toolchain/check/testdata/namespace/imported.carbon index b2223a2060e7..a81c8b5a9d1e 100644 --- a/toolchain/check/testdata/namespace/imported.carbon +++ b/toolchain/check/testdata/namespace/imported.carbon @@ -33,9 +33,9 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,8 +51,8 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: %ChildNS: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -64,9 +64,9 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -87,25 +87,25 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: %ChildNS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .B = %import_ref.4 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir0, inst+4, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.4: = import_ref ir0, inst+8, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: %A.type = import_ref ir0, inst+4, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.4: %B.type = import_ref ir0, inst+8, loaded [template = constants.%B] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_9.1: () = tuple_literal () +// 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 () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %.loc7_17.1: () = tuple_literal () +// 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 () = var package_a -// CHECK:STDOUT: %package_a: ref () = bind_name package_a, %package_a.var -// CHECK:STDOUT: %.loc8_17.1: () = tuple_literal () +// 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 () = var package_b -// CHECK:STDOUT: %package_b: ref () = bind_name package_b, %package_b.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -115,24 +115,24 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref.loc4: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref.loc4: = name_ref A, file.%import_ref.3 [template = constants.%A] -// CHECK:STDOUT: %A.call.loc4: init () = call %A.ref.loc4() +// CHECK:STDOUT: %A.ref.loc4: %A.type = name_ref A, file.%import_ref.3 [template = constants.%A] +// CHECK:STDOUT: %A.call.loc4: init %.1 = call %A.ref.loc4() // CHECK:STDOUT: assign file.%a.var, %A.call.loc4 // CHECK:STDOUT: %NS.ref.loc5: = name_ref NS, file.%NS [template = file.%NS] // CHECK:STDOUT: %ChildNS.ref.loc5: = name_ref ChildNS, file.%ChildNS [template = file.%ChildNS] -// CHECK:STDOUT: %B.ref.loc5: = name_ref B, file.%import_ref.4 [template = constants.%B] -// CHECK:STDOUT: %B.call.loc5: init () = call %B.ref.loc5() +// CHECK:STDOUT: %B.ref.loc5: %B.type = name_ref B, file.%import_ref.4 [template = constants.%B] +// CHECK:STDOUT: %B.call.loc5: init %.1 = 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, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref.loc7: = name_ref A, file.%import_ref.3 [template = constants.%A] -// CHECK:STDOUT: %A.call.loc7: init () = call %A.ref.loc7() +// CHECK:STDOUT: %A.ref.loc7: %A.type = name_ref A, file.%import_ref.3 [template = constants.%A] +// CHECK:STDOUT: %A.call.loc7: init %.1 = 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, file.%NS [template = file.%NS] // CHECK:STDOUT: %ChildNS.ref.loc8: = name_ref ChildNS, file.%ChildNS [template = file.%ChildNS] -// CHECK:STDOUT: %B.ref.loc8: = name_ref B, file.%import_ref.4 [template = constants.%B] -// CHECK:STDOUT: %B.call.loc8: init () = call %B.ref.loc8() +// CHECK:STDOUT: %B.ref.loc8: %B.type = name_ref B, file.%import_ref.4 [template = constants.%B] +// CHECK:STDOUT: %B.call.loc8: init %.1 = 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 7fba822b0ded..ec3579628267 100644 --- a/toolchain/check/testdata/namespace/imported_indirect.carbon +++ b/toolchain/check/testdata/namespace/imported_indirect.carbon @@ -92,7 +92,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -113,7 +113,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @D() { @@ -126,7 +126,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -147,12 +147,12 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: %C: = namespace %import_ref.3, [template] { // CHECK:STDOUT: .D = %import_ref.4 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+8, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+8, loaded [template = constants.%D] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc5_9.1: () = tuple_literal () +// 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 () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @D(); @@ -162,8 +162,8 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: %A.ref: = name_ref A, file.%A [template = file.%A] // CHECK:STDOUT: %B.ref: = name_ref B, file.%B [template = file.%B] // CHECK:STDOUT: %C.ref: = name_ref C, file.%C [template = file.%C] -// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] -// CHECK:STDOUT: %D.call: init () = call %D.ref() +// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%import_ref.4 [template = constants.%D] +// CHECK:STDOUT: %D.call: init %.1 = 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 264f19498574..4e7704e6eab0 100644 --- a/toolchain/check/testdata/namespace/merging.carbon +++ b/toolchain/check/testdata/namespace/merging.carbon @@ -51,7 +51,7 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -63,7 +63,7 @@ fn Run() { // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -76,9 +76,9 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %B1.type: type = fn_type @B1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %B1: = struct_value () [template] +// CHECK:STDOUT: %B1: %B1.type = struct_value () [template] // CHECK:STDOUT: %B2.type: type = fn_type @B2 [template] -// CHECK:STDOUT: %B2: = struct_value () [template] +// CHECK:STDOUT: %B2: %B2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,9 +91,9 @@ fn Run() { // CHECK:STDOUT: .B1 = %B1.decl // CHECK:STDOUT: .B2 = %B2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %B1.decl: = fn_decl @B1 [template = constants.%B1] {} +// CHECK:STDOUT: %B1.decl: %B1.type = fn_decl @B1 [template = constants.%B1] {} // CHECK:STDOUT: %.loc8: = namespace [template] {} -// CHECK:STDOUT: %B2.decl: = fn_decl @B2 [template = constants.%B2] {} +// CHECK:STDOUT: %B2.decl: %B2.type = fn_decl @B2 [template = constants.%B2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B1() { @@ -111,15 +111,15 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B1.type: type = fn_type @B1 [template] -// CHECK:STDOUT: %B1: = struct_value () [template] +// CHECK:STDOUT: %B1: %B1.type = struct_value () [template] // CHECK:STDOUT: %B2.type: type = fn_type @B2 [template] -// CHECK:STDOUT: %B2: = struct_value () [template] +// CHECK:STDOUT: %B2: %B2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,13 +135,13 @@ fn Run() { // CHECK:STDOUT: .B2 = %import_ref.4 // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+3, loaded [template = constants.%A] -// CHECK:STDOUT: %import_ref.3: = import_ref ir2, inst+3, loaded [template = constants.%B1] -// CHECK:STDOUT: %import_ref.4: = import_ref ir2, inst+9, loaded [template = constants.%B2] +// CHECK:STDOUT: %import_ref.2: %A.type = import_ref ir1, inst+3, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.3: %B1.type = import_ref ir2, inst+3, loaded [template = constants.%B1] +// CHECK:STDOUT: %import_ref.4: %B2.type = import_ref ir2, inst+9, loaded [template = constants.%B2] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc7: = namespace [template] {} -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C() { @@ -152,17 +152,17 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref.loc12: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.2 [template = constants.%A] +// CHECK:STDOUT: %A.call: init %.1 = call %A.ref() // CHECK:STDOUT: %NS.ref.loc13: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %B1.ref: = name_ref B1, file.%import_ref.3 [template = constants.%B1] -// CHECK:STDOUT: %B1.call: init () = call %B1.ref() +// CHECK:STDOUT: %B1.ref: %B1.type = name_ref B1, file.%import_ref.3 [template = constants.%B1] +// CHECK:STDOUT: %B1.call: init %.1 = call %B1.ref() // CHECK:STDOUT: %NS.ref.loc14: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %B2.ref: = name_ref B2, file.%import_ref.4 [template = constants.%B2] -// CHECK:STDOUT: %B2.call: init () = call %B2.ref() +// CHECK:STDOUT: %B2.ref: %B2.type = name_ref B2, file.%import_ref.4 [template = constants.%B2] +// CHECK:STDOUT: %B2.call: init %.1 = call %B2.ref() // CHECK:STDOUT: %NS.ref.loc15: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.call: init () = call %C.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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/nested.carbon b/toolchain/check/testdata/namespace/nested.carbon index 354d0e526ef4..fabf36483785 100644 --- a/toolchain/check/testdata/namespace/nested.carbon +++ b/toolchain/check/testdata/namespace/nested.carbon @@ -23,9 +23,9 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Wiz.type: type = fn_type @Wiz [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Wiz: = struct_value () [template] +// CHECK:STDOUT: %Wiz: %Wiz.type = struct_value () [template] // CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] -// CHECK:STDOUT: %Baz: = struct_value () [template] +// CHECK:STDOUT: %Baz: %Baz.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,8 +41,8 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: .Wiz = %Wiz.decl // CHECK:STDOUT: .Baz = %Baz.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Wiz.decl: = fn_decl @Wiz [template = constants.%Wiz] {} -// CHECK:STDOUT: %Baz.decl: = fn_decl @Baz [template = constants.%Baz] {} +// CHECK:STDOUT: %Wiz.decl: %Wiz.type = fn_decl @Wiz [template = constants.%Wiz] {} +// CHECK:STDOUT: %Baz.decl: %Baz.type = fn_decl @Baz [template = constants.%Baz] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Wiz() { @@ -54,8 +54,8 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: !entry: // 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: = name_ref Wiz, file.%Wiz.decl [template = constants.%Wiz] -// CHECK:STDOUT: %Wiz.call: init () = call %Wiz.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 2351c89eddd4..d08afad41064 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -32,13 +32,13 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type.1: type = fn_type @A.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A.1: = struct_value () [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: = struct_value () [template] +// CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -50,23 +50,23 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: .N = %N // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl.loc11: = fn_decl @A.1 [template = constants.%A.1] {} +// CHECK:STDOUT: %A.decl.loc11: %A.type.1 = fn_decl @A.1 [template = constants.%A.1] {} // CHECK:STDOUT: %N: = namespace [template] { // CHECK:STDOUT: .A = %A.decl.loc14 // CHECK:STDOUT: .M = %M // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl.loc14: = fn_decl @A.2 [template = constants.%A.2] {} +// CHECK:STDOUT: %A.decl.loc14: %A.type.2 = fn_decl @A.2 [template = constants.%A.2] {} // CHECK:STDOUT: %M: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_32, %.loc18_15.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A.1(); @@ -77,8 +77,8 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref.loc20: = name_ref A, file.%A.decl.loc14 [template = constants.%A.2] -// CHECK:STDOUT: %A.call: init () = call %A.ref.loc20() +// 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: if %.loc21 br !if.then else br !if.else // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/unqualified_lookup.carbon b/toolchain/check/testdata/namespace/unqualified_lookup.carbon index de79797e0fc4..7ef3995026e4 100644 --- a/toolchain/check/testdata/namespace/unqualified_lookup.carbon +++ b/toolchain/check/testdata/namespace/unqualified_lookup.carbon @@ -35,17 +35,17 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %CallA.type: type = fn_type @CallA [template] -// CHECK:STDOUT: %CallA: = struct_value () [template] +// CHECK:STDOUT: %CallA: %CallA.type = struct_value () [template] // CHECK:STDOUT: %CallAB.type: type = fn_type @CallAB [template] -// CHECK:STDOUT: %CallAB: = struct_value () [template] +// CHECK:STDOUT: %CallAB: %CallAB.type = struct_value () [template] // CHECK:STDOUT: %CallABC.type: type = fn_type @CallABC [template] -// CHECK:STDOUT: %CallABC: = struct_value () [template] +// CHECK:STDOUT: %CallABC: %CallABC.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,12 +65,12 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .CallABC = %CallABC.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %CallA.decl: = fn_decl @CallA [template = constants.%CallA] {} -// CHECK:STDOUT: %CallAB.decl: = fn_decl @CallAB [template = constants.%CallAB] {} -// CHECK:STDOUT: %CallABC.decl: = fn_decl @CallABC [template = constants.%CallABC] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %CallA.decl: %CallA.type = fn_decl @CallA [template = constants.%CallA] {} +// CHECK:STDOUT: %CallAB.decl: %CallAB.type = fn_decl @CallAB [template = constants.%CallAB] {} +// CHECK:STDOUT: %CallABC.decl: %CallABC.type = fn_decl @CallABC [template = constants.%CallABC] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -81,28 +81,28 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallA() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallAB() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %B.call: init () = call %B.ref() +// 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: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.call: init %.1 = call %B.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallABC() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %A.call: init () = call %A.ref() -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %B.call: init () = call %B.ref() -// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.call: init () = call %C.ref() +// 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: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.call: init %.1 = 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index ce40e1e289cb..0533f05d3863 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -31,20 +31,20 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] -// CHECK:STDOUT: %And: = struct_value () [template] +// CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] -// CHECK:STDOUT: %Constant: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] -// CHECK:STDOUT: %PartialConstant: = struct_value () [template] +// CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,41 +57,41 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: .PartialConstant = %PartialConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: @F.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type.loc12, %.loc12_11.1 [template = bool] // CHECK:STDOUT: @G.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %And.decl: = fn_decl @And [template = constants.%And] { +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [template = constants.%And] { // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_13.2: type = converted %bool.make_type.loc14, %.loc14_13.1 [template = bool] // CHECK:STDOUT: @And.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %PartialConstant.decl: = fn_decl @PartialConstant [template = constants.%PartialConstant] { +// CHECK:STDOUT: %Constant.decl: %Constant.type = fn_decl @Constant [template = constants.%Constant] {} +// CHECK:STDOUT: %import_ref.4: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %PartialConstant.decl: %PartialConstant.type = fn_decl @PartialConstant [template = constants.%PartialConstant] { // CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] // CHECK:STDOUT: %x.loc25_20.1: bool = param x // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc25_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -110,7 +110,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @And() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %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 @@ -118,7 +118,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc15_14.2 br !and.rhs else br !and.result(%.loc15_14.3) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init bool = call %G.ref() // CHECK:STDOUT: %.loc15_14.4: bool = value_of_initializer %G.call // CHECK:STDOUT: %.loc15_14.5: bool = converted %G.call, %.loc15_14.4 @@ -150,7 +150,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc19_43: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_37: type = converted %.loc19_43, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_37) // CHECK:STDOUT: @@ -179,17 +179,17 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc20_44: %.1 = tuple_literal () // CHECK:STDOUT: %.loc20_38: type = converted %.loc20_44, constants.%.1 [template = constants.%.1] // 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 () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %.loc20_49.1: () = tuple_literal () -// CHECK:STDOUT: %.loc20_49.2: init () = tuple_init () to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc20_50: init () = converted %.loc20_49.1, %.loc20_49.2 [template = constants.%tuple] +// 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: 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] @@ -210,17 +210,17 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc21_44: %.1 = tuple_literal () // CHECK:STDOUT: %.loc21_38: type = converted %.loc21_44, constants.%.1 [template = constants.%.1] // 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 () = var c -// CHECK:STDOUT: %c: ref () = bind_name c, %c.var -// CHECK:STDOUT: %.loc21_49.1: () = tuple_literal () -// CHECK:STDOUT: %.loc21_49.2: init () = tuple_init () to %c.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc21_50: init () = converted %.loc21_49.1, %.loc21_49.2 [template = constants.%tuple] +// 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: 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] @@ -241,17 +241,17 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc22_45: %.1 = tuple_literal () // CHECK:STDOUT: %.loc22_39: type = converted %.loc22_45, constants.%.1 [template = constants.%.1] // 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 () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc22_50.1: () = tuple_literal () -// CHECK:STDOUT: %.loc22_50.2: init () = tuple_init () to %d.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc22_51: init () = converted %.loc22_50.1, %.loc22_50.2 [template = constants.%tuple] +// 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: assign %d.var, %.loc22_51 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -277,17 +277,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: () = tuple_literal () +// CHECK:STDOUT: %.loc26_41: %.1 = tuple_literal () // CHECK:STDOUT: %.loc26_35: type = converted %.loc26_41, constants.%.1 [template = constants.%.1] // 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %.loc26_46.1: () = tuple_literal () -// CHECK:STDOUT: %.loc26_46.2: init () = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc26_47: init () = converted %.loc26_46.1, %.loc26_46.2 [template = constants.%tuple] +// 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: 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 df0061c44f02..3847ce5e0bfb 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -31,23 +31,23 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 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 (i32, i32) [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %.7: i32 = int_literal 1 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.7, %.8) [template] +// CHECK:STDOUT: %tuple: %.5 = tuple_value (%.7, %.8) [template] // CHECK:STDOUT: %.9: i32 = int_literal 0 [template] // CHECK:STDOUT: %.10: i32 = int_literal 3 [template] // CHECK:STDOUT: %.11: i32 = int_literal 4 [template] // CHECK:STDOUT: %.12: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %.13: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.7, %.8) [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_literal 5 [template] // CHECK:STDOUT: %.16: bool = bool_literal true [template] @@ -60,13 +60,13 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { @@ -83,30 +83,30 @@ fn Main() { // 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: (type, type) = tuple_literal (%int.make_type_32.loc15_11, %int.make_type_32.loc15_16) +// CHECK:STDOUT: %.loc15_19.1: %.4 = 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 (i32, i32) = var b -// CHECK:STDOUT: %b: ref (i32, i32) = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %.5 = var b +// CHECK:STDOUT: %b: ref %.5 = bind_name b, %b.var // CHECK:STDOUT: %.loc15_24: i32 = int_literal 1 [template = constants.%.7] // CHECK:STDOUT: %.loc15_27: i32 = int_literal 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc15_28.1: (i32, i32) = tuple_literal (%.loc15_24, %.loc15_27) +// CHECK:STDOUT: %.loc15_28.1: %.5 = 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.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 (i32, i32) = tuple_init (%.loc15_28.3, %.loc15_28.5) to %b.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_29: init (i32, i32) = converted %.loc15_28.1, %.loc15_28.6 [template = constants.%tuple] +// 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: assign %b.var, %.loc15_29 -// CHECK:STDOUT: %b.ref.loc16: ref (i32, i32) = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc16: ref %.5 = name_ref b, %b // CHECK:STDOUT: %.loc16_5: i32 = int_literal 0 [template = constants.%.9] // CHECK:STDOUT: %.loc16_6: ref i32 = tuple_index %b.ref.loc16, %.loc16_5 // CHECK:STDOUT: %.loc16_10: i32 = int_literal 3 [template = constants.%.10] // CHECK:STDOUT: assign %.loc16_6, %.loc16_10 -// CHECK:STDOUT: %b.ref.loc17: ref (i32, i32) = name_ref b, %b +// CHECK:STDOUT: %b.ref.loc17: ref %.5 = name_ref b, %b // CHECK:STDOUT: %.loc17_5: i32 = int_literal 1 [template = constants.%.7] // CHECK:STDOUT: %.loc17_6: ref i32 = tuple_index %b.ref.loc17, %.loc17_5 // CHECK:STDOUT: %.loc17_10: i32 = int_literal 4 [template = constants.%.11] @@ -118,23 +118,23 @@ fn Main() { // 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 {.a: i32, .b: i32} = var c -// CHECK:STDOUT: %c: ref {.a: i32, .b: i32} = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %.12 = var c +// CHECK:STDOUT: %c: ref %.12 = bind_name c, %c.var // CHECK:STDOUT: %.loc19_37: i32 = int_literal 1 [template = constants.%.7] // CHECK:STDOUT: %.loc19_45: i32 = int_literal 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc19_46.1: {.a: i32, .b: i32} = struct_literal (%.loc19_37, %.loc19_45) +// CHECK:STDOUT: %.loc19_46.1: %.12 = 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.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 {.a: i32, .b: i32} = struct_init (%.loc19_46.3, %.loc19_46.5) to %c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_47: init {.a: i32, .b: i32} = converted %.loc19_46.1, %.loc19_46.6 [template = constants.%struct] +// 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: assign %c.var, %.loc19_47 -// CHECK:STDOUT: %c.ref.loc20: ref {.a: i32, .b: i32} = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc20: ref %.12 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref i32 = struct_access %c.ref.loc20, element0 // CHECK:STDOUT: %.loc20_9: i32 = int_literal 3 [template = constants.%.10] // CHECK:STDOUT: assign %.loc20_4, %.loc20_9 -// CHECK:STDOUT: %c.ref.loc21: ref {.a: i32, .b: i32} = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc21: ref %.12 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref i32 = struct_access %c.ref.loc21, element1 // CHECK:STDOUT: %.loc21_9: i32 = int_literal 4 [template = constants.%.11] // CHECK:STDOUT: assign %.loc21_4, %.loc21_9 @@ -142,13 +142,13 @@ fn Main() { // 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 i32* = var p -// CHECK:STDOUT: %p: ref i32* = bind_name p, %p.var +// CHECK:STDOUT: %p.var: ref %.14 = var p +// CHECK:STDOUT: %p: ref %.14 = bind_name p, %p.var // CHECK:STDOUT: %a.ref.loc23: ref i32 = name_ref a, %a -// CHECK:STDOUT: %.loc23_17: i32* = addr_of %a.ref.loc23 +// CHECK:STDOUT: %.loc23_17: %.14 = addr_of %a.ref.loc23 // CHECK:STDOUT: assign %p.var, %.loc23_17 -// CHECK:STDOUT: %p.ref.loc24: ref i32* = name_ref p, %p -// CHECK:STDOUT: %.loc24_4: i32* = bind_value %p.ref.loc24 +// CHECK:STDOUT: %p.ref.loc24: ref %.14 = name_ref p, %p +// CHECK:STDOUT: %.loc24_4: %.14 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref i32 = deref %.loc24_4 // CHECK:STDOUT: %.loc24_8: i32 = int_literal 5 [template = constants.%.15] // CHECK:STDOUT: assign %.loc24_3, %.loc24_8 @@ -156,17 +156,17 @@ fn Main() { // 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 i32* = name_ref p, %p -// CHECK:STDOUT: %.loc26_18: i32* = bind_value %p.ref.loc26 +// CHECK:STDOUT: %p.ref.loc26: ref %.14 = name_ref p, %p +// CHECK:STDOUT: %.loc26_18: %.14 = 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: i32* = addr_of %a.ref.loc26 +// CHECK:STDOUT: %.loc26_25: %.14 = addr_of %a.ref.loc26 // CHECK:STDOUT: br !if.expr.result(%.loc26_25) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_5: i32* = block_arg !if.expr.result +// CHECK:STDOUT: %.loc26_5: %.14 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref i32 = deref %.loc26_5 // CHECK:STDOUT: %.loc26_31: i32 = int_literal 10 [template = constants.%.17] // CHECK:STDOUT: assign %.loc26_3, %.loc26_31 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 4a87965965c0..71c51e50b757 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 @@ -46,14 +46,14 @@ var or_: F(true or true); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [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: } 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 d22bed4b1f65..ffa5a35959c0 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 @@ -48,9 +48,9 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] -// CHECK:STDOUT: %PartialConstant: = struct_value () [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: } @@ -61,16 +61,16 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: .PartialConstant = %PartialConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %PartialConstant.decl: = fn_decl @PartialConstant [template = constants.%PartialConstant] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %PartialConstant.decl: %PartialConstant.type = fn_decl @PartialConstant [template = constants.%PartialConstant] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_23.2: type = converted %bool.make_type, %.loc4_23.1 [template = bool] // CHECK:STDOUT: %x.loc4_20.1: bool = param x // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc4_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -96,7 +96,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc9_40: %.1 = tuple_literal () // CHECK:STDOUT: %.loc9_34: type = converted %.loc9_40, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_34) // CHECK:STDOUT: @@ -124,7 +124,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc14_40: %.1 = tuple_literal () // CHECK:STDOUT: %.loc14_34: type = converted %.loc14_40, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc14(%.loc14_34) // CHECK:STDOUT: @@ -140,9 +140,9 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition.type: type = fn_type @KnownValueButNonConstantCondition [template] -// CHECK:STDOUT: %KnownValueButNonConstantCondition: = struct_value () [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: } @@ -153,16 +153,16 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: .KnownValueButNonConstantCondition = %KnownValueButNonConstantCondition.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %KnownValueButNonConstantCondition.decl: = fn_decl @KnownValueButNonConstantCondition [template = constants.%KnownValueButNonConstantCondition] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %KnownValueButNonConstantCondition.decl: %KnownValueButNonConstantCondition.type = fn_decl @KnownValueButNonConstantCondition [template = constants.%KnownValueButNonConstantCondition] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_41.2: type = converted %bool.make_type, %.loc4_41.1 [template = bool] // CHECK:STDOUT: %x.loc4_38.1: bool = param x // CHECK:STDOUT: @KnownValueButNonConstantCondition.%x: bool = bind_name x, %x.loc4_38.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -188,7 +188,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc11_41: %.1 = tuple_literal () // CHECK:STDOUT: %.loc11_35: type = converted %.loc11_41, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc11(%.loc11_35) // CHECK:STDOUT: @@ -216,7 +216,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc15_39: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_33: type = converted %.loc15_39, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc15(%.loc15_33) // CHECK:STDOUT: 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 5b6e69dc6a6e..2484e8bdadd8 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon @@ -25,7 +25,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,7 +35,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { 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 483d321f4978..549f55c3aabf 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 @@ -61,25 +61,25 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.5: i32 = int_literal 3 [template] // CHECK:STDOUT: %.6: i32 = int_literal 4 [template] -// CHECK:STDOUT: %.7: type = ptr_type (i32, i32) [template] -// CHECK:STDOUT: %tuple.1: (i32, i32) = tuple_value (%.5, %.6) [template] -// CHECK:STDOUT: %tuple.2: (i32, i32) = tuple_value (%.2, %.3) [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_literal 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 {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %struct.1: {.x: i32, .y: i32} = struct_value (%.5, %.6) [template] -// CHECK:STDOUT: %struct.2: {.x: i32, .y: i32} = struct_value (%.2, %.3) [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_literal 10 [template] // CHECK:STDOUT: } @@ -91,18 +91,18 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -114,25 +114,25 @@ fn Main() { // CHECK:STDOUT: %.loc18_3: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_7: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: assign %.loc18_3, %.loc18_7 -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: assign %F.call, %.loc23 // CHECK:STDOUT: %.loc28_4: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc28_7: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc28_8.1: (i32, i32) = tuple_literal (%.loc28_4, %.loc28_7) +// CHECK:STDOUT: %.loc28_8.1: %.4 = tuple_literal (%.loc28_4, %.loc28_7) // CHECK:STDOUT: %.loc28_13: i32 = int_literal 3 [template = constants.%.5] // CHECK:STDOUT: %.loc28_16: i32 = int_literal 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc28_17.1: (i32, i32) = tuple_literal (%.loc28_13, %.loc28_16) +// CHECK:STDOUT: %.loc28_17.1: %.4 = 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.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 (i32, i32) = tuple_init (%.loc28_17.3, %.loc28_17.5) to %.loc28_8.1 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc28_10: init (i32, i32) = converted %.loc28_17.1, %.loc28_17.6 [template = constants.%tuple.1] +// 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: assign %.loc28_8.1, %.loc28_10 -// CHECK:STDOUT: %tuple.loc28: (i32, i32) = tuple_value (%.loc28_4, %.loc28_7) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc28_8.2: (i32, i32) = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] +// 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: %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] @@ -142,21 +142,21 @@ fn Main() { // 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: (i32, i32) = tuple_literal (%n.ref.loc34_4, %n.ref.loc34_7) +// CHECK:STDOUT: %.loc34_8.1: %.4 = tuple_literal (%n.ref.loc34_4, %n.ref.loc34_7) // CHECK:STDOUT: %.loc34_13: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc34_16: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc34_17.1: (i32, i32) = tuple_literal (%.loc34_13, %.loc34_16) +// CHECK:STDOUT: %.loc34_17.1: %.4 = 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.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 (i32, i32) = tuple_init (%.loc34_17.3, %.loc34_17.5) to %.loc34_8.1 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc34_10: init (i32, i32) = converted %.loc34_17.1, %.loc34_17.6 [template = constants.%tuple.2] +// 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: 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: (i32, i32) = tuple_value (%.loc34_4, %.loc34_7) -// CHECK:STDOUT: %.loc34_8.2: (i32, i32) = converted %.loc34_8.1, %tuple.loc34 +// 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: %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] @@ -165,19 +165,19 @@ fn Main() { // CHECK:STDOUT: assign %int.make_type_32.loc39_3, %.loc39_12.3 // CHECK:STDOUT: %.loc44_9: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_17: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_18.1: {.x: i32, .y: i32} = struct_literal (%.loc44_9, %.loc44_17) +// CHECK:STDOUT: %.loc44_18.1: %.10 = struct_literal (%.loc44_9, %.loc44_17) // CHECK:STDOUT: %.loc44_28: i32 = int_literal 3 [template = constants.%.5] // CHECK:STDOUT: %.loc44_36: i32 = int_literal 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc44_37.1: {.x: i32, .y: i32} = struct_literal (%.loc44_28, %.loc44_36) +// CHECK:STDOUT: %.loc44_37.1: %.10 = 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.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 {.x: i32, .y: i32} = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc44_20: init {.x: i32, .y: i32} = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] +// 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: assign %.loc44_18.1, %.loc44_20 -// CHECK:STDOUT: %struct: {.x: i32, .y: i32} = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc44_18.2: {.x: i32, .y: i32} = converted %.loc44_18.1, %struct [template = constants.%struct.2] +// 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: if %.loc49_7 br !if.expr.then.loc49 else br !if.expr.else.loc49 // 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 6d40f63965fb..53b0511c4b3e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -28,12 +28,12 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -44,15 +44,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -79,7 +79,7 @@ fn Main() { // CHECK:STDOUT: assign %a.ref.loc19_3, %.loc19 // CHECK:STDOUT: %a.ref.loc23_3: ref i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc23_7: ref i32 = name_ref a, %a -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: assign %a.ref.loc23_3, %F.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 3d29da7e6076..7a7fd8bfb963 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -20,9 +20,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,8 +32,8 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { 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 a99628193fbb..7f0bccfdc7b9 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -21,9 +21,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: f64 = float_literal 5.6000000000000005 [template] // CHECK:STDOUT: } @@ -34,8 +34,8 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { 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 dac6c06d3efe..d0ee33445f34 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -26,17 +26,17 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: f64 = float_literal 3.4000000000000004 [template] // CHECK:STDOUT: %.4: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] -// CHECK:STDOUT: %Op: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.6: in Add> = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %Op: %Op.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, %Op.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,8 +45,8 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] @@ -54,7 +54,7 @@ fn Main() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir4, inst+1, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.3 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref ir4, inst+24, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.7: type = import_ref ir4, inst+1, loaded [template = constants.%.4] @@ -77,5 +77,5 @@ fn Main() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op[%self: %Self](%other: %Self) -> %Self; // 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 5908df3f0975..029f929feb57 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -20,17 +20,17 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 34 [template] // CHECK:STDOUT: %.4: type = interface_type @Add [template] -// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] -// CHECK:STDOUT: %Op: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.6: in Add> = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %Op: %Op.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, %Op.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,8 +39,8 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] @@ -48,7 +48,7 @@ fn Main() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir4, inst+1, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.3 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref ir4, inst+24, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: } @@ -69,5 +69,5 @@ fn Main() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op[%self: %Self](%other: %Self) -> %Self; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index 7c218779f3de..1de846c7524f 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -31,20 +31,20 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] -// CHECK:STDOUT: %Or: = struct_value () [template] +// CHECK:STDOUT: %Or: %Or.type = struct_value () [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] -// CHECK:STDOUT: %Constant: = struct_value () [template] +// CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] -// CHECK:STDOUT: %PartialConstant: = struct_value () [template] +// CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,41 +57,41 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: .PartialConstant = %PartialConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: @F.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type.loc12, %.loc12_11.1 [template = bool] // CHECK:STDOUT: @G.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Or.decl: = fn_decl @Or [template = constants.%Or] { +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Or.decl: %Or.type = fn_decl @Or [template = constants.%Or] { // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_12.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_12.2: type = converted %bool.make_type.loc14, %.loc14_12.1 [template = bool] // CHECK:STDOUT: @Or.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %PartialConstant.decl: = fn_decl @PartialConstant [template = constants.%PartialConstant] { +// CHECK:STDOUT: %Constant.decl: %Constant.type = fn_decl @Constant [template = constants.%Constant] {} +// CHECK:STDOUT: %import_ref.4: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %PartialConstant.decl: %PartialConstant.type = fn_decl @PartialConstant [template = constants.%PartialConstant] { // CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] // CHECK:STDOUT: %x.loc25_20.1: bool = param x // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc25_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -110,7 +110,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Or() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %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 @@ -119,7 +119,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc15_14.3 br !or.rhs else br !or.result(%.loc15_14.4) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init bool = call %G.ref() // CHECK:STDOUT: %.loc15_14.5: bool = value_of_initializer %G.call // CHECK:STDOUT: %.loc15_14.6: bool = converted %G.call, %.loc15_14.5 @@ -152,7 +152,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc19_42: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_36: type = converted %.loc19_42, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_36) // CHECK:STDOUT: @@ -182,7 +182,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc20_43: %.1 = tuple_literal () // CHECK:STDOUT: %.loc20_37: type = converted %.loc20_43, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_37) // CHECK:STDOUT: @@ -212,7 +212,7 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc21_43: %.1 = tuple_literal () // CHECK:STDOUT: %.loc21_37: type = converted %.loc21_43, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_37) // CHECK:STDOUT: @@ -242,17 +242,17 @@ 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: () = tuple_literal () +// CHECK:STDOUT: %.loc22_44: %.1 = tuple_literal () // CHECK:STDOUT: %.loc22_38: type = converted %.loc22_44, constants.%.1 [template = constants.%.1] // 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 () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc22_49.1: () = tuple_literal () -// CHECK:STDOUT: %.loc22_49.2: init () = tuple_init () to %d.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc22_50: init () = converted %.loc22_49.1, %.loc22_49.2 [template = constants.%tuple] +// 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: assign %d.var, %.loc22_50 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -279,7 +279,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: br !if.expr.result(%.loc26_28.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc26_39: () = tuple_literal () +// CHECK:STDOUT: %.loc26_39: %.1 = tuple_literal () // CHECK:STDOUT: %.loc26_33: type = converted %.loc26_39, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result(%.loc26_33) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index f2335fc6ce6e..7b489902ed93 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -25,14 +25,14 @@ fn Constant() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Not.type: type = fn_type @Not [template] -// CHECK:STDOUT: %Not: = struct_value () [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: %Constant.type: type = fn_type @Constant [template] -// CHECK:STDOUT: %Constant: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,9 +42,9 @@ fn Constant() { // CHECK:STDOUT: .Constant = %Constant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Not.decl: = fn_decl @Not [template = constants.%Not] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Not.decl: %Not.type = fn_decl @Not [template = constants.%Not] { // CHECK:STDOUT: %bool.make_type.loc11_11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11_11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11_11, %.loc11_11.1 [template = bool] @@ -55,23 +55,23 @@ fn Constant() { // CHECK:STDOUT: %.loc11_20.2: type = converted %bool.make_type.loc11_20, %.loc11_20.1 [template = bool] // CHECK:STDOUT: @Not.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_15.2: type = converted %bool.make_type.loc15, %.loc15_15.1 [template = bool] // CHECK:STDOUT: %.loc15_26: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: %.loc15_22: bool = not %.loc15_26 [template = constants.%.3] // CHECK:STDOUT: %not_true: bool = bind_name not_true, %.loc15_22 -// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_16.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_16.2: type = converted %bool.make_type.loc16, %.loc16_16.1 [template = bool] // CHECK:STDOUT: %.loc16_27: bool = bool_literal false [template = constants.%.3] // CHECK:STDOUT: %.loc16_23: bool = not %.loc16_27 [template = constants.%.2] // CHECK:STDOUT: %not_false: bool = bind_name not_false, %.loc16_23 -// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] {} -// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Constant.decl: %Constant.type = fn_decl @Constant [template = constants.%Constant] {} +// CHECK:STDOUT: %import_ref.5: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -96,17 +96,17 @@ fn Constant() { // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_27.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_38: () = tuple_literal () +// CHECK:STDOUT: %.loc19_38: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_32: type = converted %.loc19_38, constants.%.1 [template = constants.%.1] // 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %.loc19_43.1: () = tuple_literal () -// CHECK:STDOUT: %.loc19_43.2: init () = tuple_init () to %a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_44: init () = converted %.loc19_43.1, %.loc19_43.2 [template = constants.%tuple] +// 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: 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] @@ -119,7 +119,7 @@ fn Constant() { // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_28.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_39: () = tuple_literal () +// CHECK:STDOUT: %.loc20_39: %.1 = tuple_literal () // CHECK:STDOUT: %.loc20_33: type = converted %.loc20_39, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_33) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 26ed8f62b813..b97622a64014 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self.1: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.2: AddAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.11: in Add> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, [template] -// CHECK:STDOUT: %.13: in AddAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+19, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir4, inst+24, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+26, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.7: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+43, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir4, inst+47, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+43, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+19, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+26, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+43, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Add { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as AddAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // 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 8fdd723908bb..9655b7a6265f 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitAnd [template] -// CHECK:STDOUT: %Self.1: BitAnd = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @BitAndAssign [template] -// CHECK:STDOUT: %Self.2: BitAndAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @BitAnd, [template] -// CHECK:STDOUT: %.11: in BitAnd> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @BitAnd, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @BitAndAssign, [template] -// CHECK:STDOUT: %.13: in BitAndAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @BitAndAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+21, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+23, unloaded -// CHECK:STDOUT: %import_ref.3: in BitAnd> = import_ref ir5, inst+43, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+39, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir5, inst+43, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir5, inst+39, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+45, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+47, unloaded -// CHECK:STDOUT: %import_ref.7: in BitAndAssign> = import_ref ir5, inst+66, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+62, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir5, inst+66, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir5, inst+62, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitAndAssign.ref: type = name_ref BitAndAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+21, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+39, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir5, inst+45, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir5, inst+62, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as BitAnd { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as BitAndAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // 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 e7127100a22b..e6441d98c3d1 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -30,19 +30,19 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitComplement [template] -// CHECK:STDOUT: %Self: BitComplement = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @BitComplement, [template] -// CHECK:STDOUT: %.7: in BitComplement> = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @BitComplement, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,19 +55,19 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: in BitComplement> = import_ref ir5, inst+19, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+14, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref ir5, inst+19, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir5, inst+14, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitComplement.ref: type = name_ref BitComplement, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc23_11.1 +// CHECK:STDOUT: %a.loc23_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc23_11.1 // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+14, unloaded @@ -80,13 +80,13 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as BitComplement { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -100,23 +100,23 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.%self.loc18_9.2: C]() -> @impl.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.%self.loc18_9.2: %C]() -> @impl.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self]() -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self]() -> %Self; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc23: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc24(%a.ref) to %.loc23 +// CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc24(%a.ref) to %.loc23 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index fef70dd1fe5a..777dcb0d01c2 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitOr [template] -// CHECK:STDOUT: %Self.1: BitOr = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @BitOrAssign [template] -// CHECK:STDOUT: %Self.2: BitOrAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @BitOr, [template] -// CHECK:STDOUT: %.11: in BitOr> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @BitOr, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @BitOrAssign, [template] -// CHECK:STDOUT: %.13: in BitOrAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @BitOrAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+68, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+70, unloaded -// CHECK:STDOUT: %import_ref.3: in BitOr> = import_ref ir5, inst+90, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+86, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir5, inst+90, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir5, inst+86, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+92, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+94, unloaded -// CHECK:STDOUT: %import_ref.7: in BitOrAssign> = import_ref ir5, inst+113, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+109, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir5, inst+113, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir5, inst+109, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitOrAssign.ref: type = name_ref BitOrAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+68, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+86, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir5, inst+92, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir5, inst+109, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as BitOr { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as BitOrAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // 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 c155b8541fe8..947cbcd7a6b3 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitXor [template] -// CHECK:STDOUT: %Self.1: BitXor = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @BitXorAssign [template] -// CHECK:STDOUT: %Self.2: BitXorAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @BitXor, [template] -// CHECK:STDOUT: %.11: in BitXor> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @BitXor, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @BitXorAssign, [template] -// CHECK:STDOUT: %.13: in BitXorAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @BitXorAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+115, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+117, unloaded -// CHECK:STDOUT: %import_ref.3: in BitXor> = import_ref ir5, inst+137, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+133, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir5, inst+137, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir5, inst+133, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+139, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+141, unloaded -// CHECK:STDOUT: %import_ref.7: in BitXorAssign> = import_ref ir5, inst+160, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+156, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir5, inst+160, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir5, inst+156, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitXorAssign.ref: type = name_ref BitXorAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+115, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+133, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir5, inst+139, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir5, inst+156, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as BitXor { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as BitXorAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 620b503ff5de..086636dff3dd 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -29,21 +29,21 @@ fn TestOp() { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Dec [template] -// CHECK:STDOUT: %Self: Dec = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type C [template] +// CHECK:STDOUT: %Self: %.2 = 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: %Op.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %Self [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Dec, [template] -// CHECK:STDOUT: %.9: in Dec> = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Dec, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,14 +56,14 @@ fn TestOp() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+133, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+135, unloaded -// CHECK:STDOUT: %import_ref.3: in Dec> = import_ref ir4, inst+149, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+145, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref ir4, inst+149, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+145, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Dec.ref: type = name_ref Dec, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] {} +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] {} // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+133, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+145, unloaded // CHECK:STDOUT: } @@ -75,13 +75,13 @@ fn TestOp() { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Dec { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc18_21: type = ptr_type C [template = constants.%.3] -// CHECK:STDOUT: %self.loc18_14.1: C* = param self -// CHECK:STDOUT: %self.loc18_14.3: C* = bind_name self, %self.loc18_14.1 -// CHECK:STDOUT: %.loc18_9: C* = addr_pattern %self.loc18_14.3 +// CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.loc18_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc18_14.3: %.3 = bind_name self, %self.loc18_14.1 +// CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self.loc18_14.3 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: @@ -95,24 +95,24 @@ fn TestOp() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr @impl.%self.loc18_14.3: C*](); +// CHECK:STDOUT: fn @Op.1[addr @impl.%self.loc18_14.3: %.3](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[addr %self: Self*](); +// CHECK:STDOUT: fn @Op.2[addr %self: %.5](); // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { // CHECK:STDOUT: !entry: // 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: %.loc22_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc22_15.2: init C = class_init (), %c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc22_16: init C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var +// CHECK:STDOUT: %.loc22_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc22_15.2: init %C = class_init (), %c.var [template = constants.%struct] +// 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: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3: = bound_method %c.ref, %.1 -// CHECK:STDOUT: %.loc23_5: C* = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init () = call %.loc23_3(%.loc23_5) +// CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index 86dc6a295782..13c5d866f6d2 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Div [template] -// CHECK:STDOUT: %Self.1: Div = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @DivAssign [template] -// CHECK:STDOUT: %Self.2: DivAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Div, [template] -// CHECK:STDOUT: %.11: in Div> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Div, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @DivAssign, [template] -// CHECK:STDOUT: %.13: in DivAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @DivAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+198, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+200, unloaded -// CHECK:STDOUT: %import_ref.3: in Div> = import_ref ir4, inst+220, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+216, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir4, inst+220, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+216, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+222, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+224, unloaded -// CHECK:STDOUT: %import_ref.7: in DivAssign> = import_ref ir4, inst+243, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+239, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir4, inst+243, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+239, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %DivAssign.ref: type = name_ref DivAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+198, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+216, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+222, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+239, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Div { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as DivAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index c45fd38d5b79..8018fb4166c8 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -85,28 +85,28 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Eq [template] -// CHECK:STDOUT: %Self: Eq = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] -// CHECK:STDOUT: %Equal.1: = struct_value () [template] +// CHECK:STDOUT: %Equal.1: %Equal.type.1 = struct_value () [template] // CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] -// CHECK:STDOUT: %NotEqual.1: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %Equal.2: = struct_value () [template] +// 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: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] // CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] -// CHECK:STDOUT: %TestEqual: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Eq, [template] -// CHECK:STDOUT: %.7: in Eq> = assoc_entity element0, file.%import_ref.11 [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, %Equal.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.11 [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] -// CHECK:STDOUT: %TestNotEqual: = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, [template] -// CHECK:STDOUT: %.9: in Eq> = assoc_entity element1, file.%import_ref.14 [template] +// CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, %NotEqual.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, file.%import_ref.14 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -120,25 +120,25 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir6, inst+4, unloaded -// CHECK:STDOUT: %import_ref.3: in Eq> = import_ref ir6, inst+29, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: in Eq> = import_ref ir6, inst+49, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+25, loaded [template = constants.%Equal.2] -// CHECK:STDOUT: %import_ref.6: = import_ref ir6, inst+45, loaded [template = constants.%NotEqual.2] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref ir6, inst+29, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %.8 = import_ref ir6, inst+49, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.5: %Equal.type.2 = import_ref ir6, inst+25, loaded [template = constants.%Equal.2] +// CHECK:STDOUT: %import_ref.6: %NotEqual.type.2 = import_ref ir6, inst+45, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestEqual.decl: = fn_decl @TestEqual [template = constants.%TestEqual] { +// CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %C.ref.loc11_17: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc11_14.1: C = param a -// CHECK:STDOUT: @TestEqual.%a: C = bind_name a, %a.loc11_14.1 +// CHECK:STDOUT: %a.loc11_14.1: %C = param a +// CHECK:STDOUT: @TestEqual.%a: %C = bind_name a, %a.loc11_14.1 // CHECK:STDOUT: %C.ref.loc11_23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc11_20.1: C = param b -// CHECK:STDOUT: @TestEqual.%b: C = bind_name b, %b.loc11_20.1 +// CHECK:STDOUT: %b.loc11_20.1: %C = param b +// CHECK:STDOUT: @TestEqual.%b: %C = bind_name b, %b.loc11_20.1 // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_29.2: type = converted %bool.make_type.loc11, %.loc11_29.1 [template = bool] @@ -146,14 +146,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.10: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.11 = import_ref ir6, inst+25, unloaded -// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestNotEqual.decl: = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { +// CHECK:STDOUT: %import_ref.12: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestNotEqual.decl: %TestNotEqual.type = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { // CHECK:STDOUT: %C.ref.loc15_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc15_17.1: C = param a -// CHECK:STDOUT: @TestNotEqual.%a: C = bind_name a, %a.loc15_17.1 +// CHECK:STDOUT: %a.loc15_17.1: %C = param a +// CHECK:STDOUT: @TestNotEqual.%a: %C = bind_name a, %a.loc15_17.1 // CHECK:STDOUT: %C.ref.loc15_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc15_23.1: C = param b -// CHECK:STDOUT: @TestNotEqual.%b: C = bind_name b, %b.loc15_23.1 +// CHECK:STDOUT: %b.loc15_23.1: %C = param b +// CHECK:STDOUT: @TestNotEqual.%b: %C = bind_name b, %b.loc15_23.1 // CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_32.2: type = converted %bool.make_type.loc15, %.loc15_32.1 [template = bool] @@ -171,26 +171,26 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: witness = (file.%import_ref.5, file.%import_ref.6) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Eq { -// CHECK:STDOUT: %Equal.decl: = fn_decl @Equal.1 [template = constants.%Equal.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Equal.decl: %Equal.type.1 = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %C.ref.loc7_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc7_12.1: C = param self -// CHECK:STDOUT: %self.loc7_12.2: C = bind_name self, %self.loc7_12.1 +// CHECK:STDOUT: %self.loc7_12.1: %C = param self +// CHECK:STDOUT: %self.loc7_12.2: %C = bind_name self, %self.loc7_12.1 // CHECK:STDOUT: %C.ref.loc7_28: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc7_21.1: C = param other -// CHECK:STDOUT: %other.loc7_21.2: C = bind_name other, %other.loc7_21.1 +// CHECK:STDOUT: %other.loc7_21.1: %C = param other +// CHECK:STDOUT: %other.loc7_21.2: %C = bind_name other, %other.loc7_21.1 // CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %bool.make_type.loc7 [template = bool] // CHECK:STDOUT: %.loc7_34.2: type = converted %bool.make_type.loc7, %.loc7_34.1 [template = bool] // CHECK:STDOUT: %return.var.loc7: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %NotEqual.decl: = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { +// CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.1 = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc8_15.1: C = param self -// CHECK:STDOUT: %self.loc8_15.2: C = bind_name self, %self.loc8_15.1 +// CHECK:STDOUT: %self.loc8_15.1: %C = param self +// CHECK:STDOUT: %self.loc8_15.2: %C = bind_name self, %self.loc8_15.1 // CHECK:STDOUT: %C.ref.loc8_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc8_24.1: C = param other -// CHECK:STDOUT: %other.loc8_24.2: C = bind_name other, %other.loc8_24.1 +// CHECK:STDOUT: %other.loc8_24.1: %C = param other +// CHECK:STDOUT: %other.loc8_24.2: %C = bind_name other, %other.loc8_24.1 // CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_37.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] // CHECK:STDOUT: %.loc8_37.2: type = converted %bool.make_type.loc8, %.loc8_37.1 [template = bool] @@ -211,19 +211,19 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Equal.1[@impl.%self.loc7_12.2: C](@impl.%other.loc7_21.2: C) -> bool; +// CHECK:STDOUT: fn @Equal.1[@impl.%self.loc7_12.2: %C](@impl.%other.loc7_21.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotEqual.1[@impl.%self.loc8_15.2: C](@impl.%other.loc8_24.2: C) -> bool; +// CHECK:STDOUT: fn @NotEqual.1[@impl.%self.loc8_15.2: %C](@impl.%other.loc8_24.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Equal.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Equal.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotEqual.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @NotEqual.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestEqual(%a: C, %b: C) -> bool { +// CHECK:STDOUT: fn @TestEqual(%a: %C, %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: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Equal.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc12_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -231,11 +231,11 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: return %.loc12_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestNotEqual(%a: C, %b: C) -> bool { +// CHECK:STDOUT: fn @TestNotEqual(%a: %C, %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: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%NotEqual.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %NotEqual.type.2 = interface_witness_access @impl.%.1, element1 [template = constants.%NotEqual.1] // CHECK:STDOUT: %.loc16_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -250,22 +250,22 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] -// CHECK:STDOUT: %TestEqual: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %.4: type = interface_type @Eq [template] -// CHECK:STDOUT: %Self: Eq = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] -// CHECK:STDOUT: %Equal: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Eq, [template] -// CHECK:STDOUT: %.6: in Eq> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %Equal: %Equal.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Eq, %Equal.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.8 [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] -// CHECK:STDOUT: %TestNotEqual: = struct_value () [template] +// CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [template] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [template] -// CHECK:STDOUT: %NotEqual: = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @Eq, [template] -// CHECK:STDOUT: %.8: in Eq> = assoc_entity element1, file.%import_ref.11 [template] +// CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @Eq, %NotEqual.type [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, file.%import_ref.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -277,14 +277,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestEqual.decl: = fn_decl @TestEqual [template = constants.%TestEqual] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %D.ref.loc6_17: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc6_14.1: D = param a -// CHECK:STDOUT: @TestEqual.%a: D = bind_name a, %a.loc6_14.1 +// CHECK:STDOUT: %a.loc6_14.1: %D = param a +// CHECK:STDOUT: @TestEqual.%a: %D = bind_name a, %a.loc6_14.1 // CHECK:STDOUT: %D.ref.loc6_23: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc6_20.1: D = param b -// CHECK:STDOUT: @TestEqual.%b: D = bind_name b, %b.loc6_20.1 +// CHECK:STDOUT: %b.loc6_20.1: %D = param b +// CHECK:STDOUT: @TestEqual.%b: %D = bind_name b, %b.loc6_20.1 // CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %bool.make_type.loc6 [template = bool] // CHECK:STDOUT: %.loc6_29.2: type = converted %bool.make_type.loc6, %.loc6_29.1 [template = bool] @@ -292,19 +292,19 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir6, inst+2, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.3 = import_ref ir6, inst+4, unloaded -// CHECK:STDOUT: %import_ref.4: in Eq> = import_ref ir6, inst+29, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.5: in Eq> = import_ref ir6, inst+49, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.4: %.5 = import_ref ir6, inst+29, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: %.7 = import_ref ir6, inst+49, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.6 = import_ref ir6, inst+25, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir6, inst+45, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir6, inst+25, unloaded -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestNotEqual.decl: = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestNotEqual.decl: %TestNotEqual.type = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { // CHECK:STDOUT: %D.ref.loc14_20: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc14_17.1: D = param a -// CHECK:STDOUT: @TestNotEqual.%a: D = bind_name a, %a.loc14_17.1 +// CHECK:STDOUT: %a.loc14_17.1: %D = param a +// CHECK:STDOUT: @TestNotEqual.%a: %D = bind_name a, %a.loc14_17.1 // CHECK:STDOUT: %D.ref.loc14_26: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc14_23.1: D = param b -// CHECK:STDOUT: @TestNotEqual.%b: D = bind_name b, %b.loc14_23.1 +// CHECK:STDOUT: %b.loc14_23.1: %D = param b +// CHECK:STDOUT: @TestNotEqual.%b: %D = bind_name b, %b.loc14_23.1 // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_32.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_32.2: type = converted %bool.make_type.loc14, %.loc14_32.1 [template = bool] @@ -329,23 +329,23 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestEqual(%a: D, %b: D) -> bool { +// CHECK:STDOUT: fn @TestEqual(%a: %D, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Equal[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Equal[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestNotEqual(%a: D, %b: D) -> bool { +// CHECK:STDOUT: fn @TestNotEqual(%a: %D, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotEqual[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @NotEqual[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_no_impl_for_args.carbon // CHECK:STDOUT: @@ -354,28 +354,28 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = interface_type @Eq [template] -// CHECK:STDOUT: %Self: Eq = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] -// CHECK:STDOUT: %Equal.1: = struct_value () [template] +// CHECK:STDOUT: %Equal.1: %Equal.type.1 = struct_value () [template] // CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] -// CHECK:STDOUT: %NotEqual.1: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %Equal.2: = struct_value () [template] +// 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: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] // CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] -// CHECK:STDOUT: %TestRhsBad: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Eq, [template] -// CHECK:STDOUT: %.7: in Eq> = assoc_entity element0, file.%import_ref.11 [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, %Equal.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.11 [template] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] -// CHECK:STDOUT: %TestLhsBad: = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, [template] -// CHECK:STDOUT: %.9: in Eq> = assoc_entity element1, file.%import_ref.14 [template] +// CHECK:STDOUT: %TestLhsBad: %TestLhsBad.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, %NotEqual.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, file.%import_ref.14 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -391,25 +391,25 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir6, inst+4, unloaded -// CHECK:STDOUT: %import_ref.3: in Eq> = import_ref ir6, inst+29, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: in Eq> = import_ref ir6, inst+49, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+25, loaded [template = constants.%Equal.2] -// CHECK:STDOUT: %import_ref.6: = import_ref ir6, inst+45, loaded [template = constants.%NotEqual.2] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref ir6, inst+29, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %.8 = import_ref ir6, inst+49, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.5: %Equal.type.2 = import_ref ir6, inst+25, loaded [template = constants.%Equal.2] +// CHECK:STDOUT: %import_ref.6: %NotEqual.type.2 = import_ref ir6, inst+45, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestRhsBad.decl: = fn_decl @TestRhsBad [template = constants.%TestRhsBad] { +// CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestRhsBad.decl: %TestRhsBad.type = fn_decl @TestRhsBad [template = constants.%TestRhsBad] { // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc12_15.1: C = param a -// CHECK:STDOUT: @TestRhsBad.%a: C = bind_name a, %a.loc12_15.1 +// CHECK:STDOUT: %a.loc12_15.1: %C = param a +// CHECK:STDOUT: @TestRhsBad.%a: %C = bind_name a, %a.loc12_15.1 // CHECK:STDOUT: %D.ref.loc12: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc12_21.1: D = param b -// CHECK:STDOUT: @TestRhsBad.%b: D = bind_name b, %b.loc12_21.1 +// CHECK:STDOUT: %b.loc12_21.1: %D = param b +// CHECK:STDOUT: @TestRhsBad.%b: %D = bind_name b, %b.loc12_21.1 // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_30.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_30.2: type = converted %bool.make_type.loc12, %.loc12_30.1 [template = bool] @@ -417,14 +417,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.10: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.11 = import_ref ir6, inst+25, unloaded -// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestLhsBad.decl: = fn_decl @TestLhsBad [template = constants.%TestLhsBad] { +// CHECK:STDOUT: %import_ref.12: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLhsBad.decl: %TestLhsBad.type = fn_decl @TestLhsBad [template = constants.%TestLhsBad] { // CHECK:STDOUT: %D.ref.loc23: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc23_15.1: D = param a -// CHECK:STDOUT: @TestLhsBad.%a: D = bind_name a, %a.loc23_15.1 +// CHECK:STDOUT: %a.loc23_15.1: %D = param a +// CHECK:STDOUT: @TestLhsBad.%a: %D = bind_name a, %a.loc23_15.1 // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc23_21.1: C = param b -// CHECK:STDOUT: @TestLhsBad.%b: C = bind_name b, %b.loc23_21.1 +// CHECK:STDOUT: %b.loc23_21.1: %C = param b +// CHECK:STDOUT: @TestLhsBad.%b: %C = bind_name b, %b.loc23_21.1 // CHECK:STDOUT: %bool.make_type.loc23: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc23_30.1: type = value_of_initializer %bool.make_type.loc23 [template = bool] // CHECK:STDOUT: %.loc23_30.2: type = converted %bool.make_type.loc23, %.loc23_30.1 [template = bool] @@ -442,26 +442,26 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: witness = (file.%import_ref.5, file.%import_ref.6) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Eq { -// CHECK:STDOUT: %Equal.decl: = fn_decl @Equal.1 [template = constants.%Equal.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Equal.decl: %Equal.type.1 = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %C.ref.loc8_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc8_12.1: C = param self -// CHECK:STDOUT: %self.loc8_12.2: C = bind_name self, %self.loc8_12.1 +// CHECK:STDOUT: %self.loc8_12.1: %C = param self +// CHECK:STDOUT: %self.loc8_12.2: %C = bind_name self, %self.loc8_12.1 // CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc8_21.1: C = param other -// CHECK:STDOUT: %other.loc8_21.2: C = bind_name other, %other.loc8_21.1 +// CHECK:STDOUT: %other.loc8_21.1: %C = param other +// CHECK:STDOUT: %other.loc8_21.2: %C = bind_name other, %other.loc8_21.1 // CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_34.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] // CHECK:STDOUT: %.loc8_34.2: type = converted %bool.make_type.loc8, %.loc8_34.1 [template = bool] // CHECK:STDOUT: %return.var.loc8: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %NotEqual.decl: = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { +// CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.1 = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { // CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc9_15.1: C = param self -// CHECK:STDOUT: %self.loc9_15.2: C = bind_name self, %self.loc9_15.1 +// CHECK:STDOUT: %self.loc9_15.1: %C = param self +// CHECK:STDOUT: %self.loc9_15.2: %C = bind_name self, %self.loc9_15.1 // CHECK:STDOUT: %C.ref.loc9_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc9_24.1: C = param other -// CHECK:STDOUT: %other.loc9_24.2: C = bind_name other, %other.loc9_24.1 +// CHECK:STDOUT: %other.loc9_24.1: %C = param other +// CHECK:STDOUT: %other.loc9_24.2: %C = bind_name other, %other.loc9_24.1 // CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_37.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] // CHECK:STDOUT: %.loc9_37.2: type = converted %bool.make_type.loc9, %.loc9_37.1 [template = bool] @@ -487,19 +487,19 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Equal.1[@impl.%self.loc8_12.2: C](@impl.%other.loc8_21.2: C) -> bool; +// CHECK:STDOUT: fn @Equal.1[@impl.%self.loc8_12.2: %C](@impl.%other.loc8_21.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotEqual.1[@impl.%self.loc9_15.2: C](@impl.%other.loc9_24.2: C) -> bool; +// CHECK:STDOUT: fn @NotEqual.1[@impl.%self.loc9_15.2: %C](@impl.%other.loc9_24.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Equal.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Equal.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @NotEqual.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @NotEqual.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestRhsBad(%a: C, %b: D) -> bool { +// CHECK:STDOUT: fn @TestRhsBad(%a: %C, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b +// CHECK:STDOUT: %.1: %Equal.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc20_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc20_12() [template = ] // CHECK:STDOUT: %.loc20_16.1: bool = value_of_initializer %Equal.call [template = ] @@ -507,10 +507,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: return %.loc20_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestLhsBad(%a: D, %b: C) -> bool { +// CHECK:STDOUT: fn @TestLhsBad(%a: %D, %b: %C) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: C = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b // CHECK:STDOUT: return // 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 64f08c67e2d0..374f44ed1aee 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -46,32 +46,32 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Inc [template] -// CHECK:STDOUT: %Self.1: Inc = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type C [template] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %Self.1 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.7: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.2: AddAssign = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template] -// CHECK:STDOUT: %TestIncNonRef: = struct_value () [template] -// CHECK:STDOUT: %.10: type = ptr_type {} [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @Inc, [template] -// CHECK:STDOUT: %.12: in Inc> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @Inc, %Op.type.2 [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template] -// CHECK:STDOUT: %TestAddAssignNonRef: = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type @AddAssign, [template] -// CHECK:STDOUT: %.14: in AddAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type @AddAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,8 +85,8 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+51, unloaded -// CHECK:STDOUT: %import_ref.3: in Inc> = import_ref ir4, inst+65, loaded [template = constants.%.12] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+61, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.11 = import_ref ir4, inst+65, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+61, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, %Core [template = %Core] @@ -94,27 +94,27 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+26, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.7: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.14] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+43, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.13 = import_ref ir4, inst+47, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+43, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc18: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, %import_ref.5 [template = constants.%.7] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestIncNonRef.decl: = fn_decl @TestIncNonRef [template = constants.%TestIncNonRef] { +// CHECK:STDOUT: %TestIncNonRef.decl: %TestIncNonRef.type = fn_decl @TestIncNonRef [template = constants.%TestIncNonRef] { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc22_18.1: C = param a -// CHECK:STDOUT: @TestIncNonRef.%a: C = bind_name a, %a.loc22_18.1 +// CHECK:STDOUT: %a.loc22_18.1: %C = param a +// CHECK:STDOUT: @TestIncNonRef.%a: %C = bind_name a, %a.loc22_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+61, unloaded -// CHECK:STDOUT: %TestAddAssignNonRef.decl: = fn_decl @TestAddAssignNonRef [template = constants.%TestAddAssignNonRef] { +// CHECK:STDOUT: %TestAddAssignNonRef.decl: %TestAddAssignNonRef.type = fn_decl @TestAddAssignNonRef [template = constants.%TestAddAssignNonRef] { // CHECK:STDOUT: %C.ref.loc33_27: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc33_24.1: C = param a -// CHECK:STDOUT: @TestAddAssignNonRef.%a: C = bind_name a, %a.loc33_24.1 +// CHECK:STDOUT: %a.loc33_24.1: %C = param a +// CHECK:STDOUT: @TestAddAssignNonRef.%a: %C = bind_name a, %a.loc33_24.1 // CHECK:STDOUT: %C.ref.loc33_33: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc33_30.1: C = param b -// CHECK:STDOUT: @TestAddAssignNonRef.%b: C = bind_name b, %b.loc33_30.1 +// CHECK:STDOUT: %b.loc33_30.1: %C = param b +// CHECK:STDOUT: @TestAddAssignNonRef.%b: %C = bind_name b, %b.loc33_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+26, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+43, unloaded @@ -134,13 +134,13 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Inc { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc16_21: type = ptr_type C [template = constants.%.3] -// CHECK:STDOUT: %self.loc16_14.1: C* = param self -// CHECK:STDOUT: %self.loc16_14.3: C* = bind_name self, %self.loc16_14.1 -// CHECK:STDOUT: %.loc16_9: C* = addr_pattern %self.loc16_14.3 +// CHECK:STDOUT: %.loc16_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.loc16_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc16_14.3: %.3 = bind_name self, %self.loc16_14.1 +// CHECK:STDOUT: %.loc16_9: %.3 = addr_pattern %self.loc16_14.3 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as AddAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.7 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc19_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc19_21: type = ptr_type C [template = constants.%.3] -// CHECK:STDOUT: %self.loc19_14.1: C* = param self -// CHECK:STDOUT: %self.loc19_14.3: C* = bind_name self, %self.loc19_14.1 -// CHECK:STDOUT: %.loc19_9: C* = addr_pattern %self.loc19_14.3 +// CHECK:STDOUT: %.loc19_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.loc19_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc19_14.3: %.3 = bind_name self, %self.loc19_14.1 +// CHECK:STDOUT: %.loc19_9: %.3 = addr_pattern %self.loc19_14.3 // CHECK:STDOUT: %C.ref.loc19_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc19_24.1: C = param other -// CHECK:STDOUT: %other.loc19_24.2: C = bind_name other, %other.loc19_24.1 +// CHECK:STDOUT: %other.loc19_24.1: %C = param other +// CHECK:STDOUT: %other.loc19_24.2: %C = bind_name other, %other.loc19_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,30 +172,30 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr @impl.1.%self.loc16_14.3: C*](); +// CHECK:STDOUT: fn @Op.1[addr @impl.1.%self.loc16_14.3: %.3](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[addr %self: Self*](); +// CHECK:STDOUT: fn @Op.2[addr %self: %.5](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc19_14.3: C*](@impl.2.%other.loc19_24.2: C); +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc19_14.3: %.3](@impl.2.%other.loc19_24.2: %C); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestIncNonRef(%a: C) { +// CHECK:STDOUT: fn @TestIncNonRef(%a: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc30: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc30() [template = ] +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc30() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAddAssignNonRef(%a: C, %b: C) { +// CHECK:STDOUT: 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc40: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc40() [template = ] +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc40() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index ea80fd39928e..8c3e07fb23b2 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -48,39 +48,39 @@ fn TestRef(b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %TestUnary.type: type = fn_type @TestUnary [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %TestUnary: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %TestUnary: %TestUnary.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %.4: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self.1: Negate = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %Op.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Negate, [template] -// CHECK:STDOUT: %.6: in Negate> = assoc_entity element0, file.%import_ref.5 [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Negate, %Op.type.1 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.5 [template] // CHECK:STDOUT: %TestBinary.type: type = fn_type @TestBinary [template] -// CHECK:STDOUT: %TestBinary: = struct_value () [template] +// CHECK:STDOUT: %TestBinary: %TestBinary.type = struct_value () [template] // CHECK:STDOUT: %.7: type = interface_type @Add [template] -// CHECK:STDOUT: %Self.2: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.2: %.7 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.9: in Add> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Add, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestRef.type: type = fn_type @TestRef [template] -// CHECK:STDOUT: %TestRef: = struct_value () [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %TestRef: %TestRef.type = struct_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.10: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.3: AddAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.11: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Self.3: %.10 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.11: type = ptr_type %Self.3 [symbolic] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, [template] -// CHECK:STDOUT: %.13: in AddAssign> = assoc_entity element0, file.%import_ref.15 [template] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, %Op.type.3 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.15 [template] // CHECK:STDOUT: %.14: type = interface_type @Inc [template] -// CHECK:STDOUT: %Self.4: Inc = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.15: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Self.4: %.14 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.15: type = ptr_type %Self.4 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type @Inc, [template] -// CHECK:STDOUT: %.17: in Inc> = assoc_entity element0, file.%import_ref.20 [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type @Inc, %Op.type.4 [template] +// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, file.%import_ref.20 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -93,46 +93,46 @@ fn TestRef(b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %TestUnary.decl: = fn_decl @TestUnary [template = constants.%TestUnary] { +// CHECK:STDOUT: %TestUnary.decl: %TestUnary.type = fn_decl @TestUnary [template = constants.%TestUnary] { // CHECK:STDOUT: %C.ref.loc15_17: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc15_14.1: C = param a -// CHECK:STDOUT: @TestUnary.%a: C = bind_name a, %a.loc15_14.1 +// CHECK:STDOUT: %a.loc15_14.1: %C = param a +// CHECK:STDOUT: @TestUnary.%a: %C = bind_name a, %a.loc15_14.1 // CHECK:STDOUT: %C.ref.loc15_23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestUnary.%return: ref C = var +// CHECK:STDOUT: @TestUnary.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+67, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+69, unloaded -// CHECK:STDOUT: %import_ref.3: in Negate> = import_ref ir4, inst+84, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.3: %.5 = import_ref ir4, inst+84, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.4 = import_ref ir4, inst+80, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+80, unloaded -// CHECK:STDOUT: %TestBinary.decl: = fn_decl @TestBinary [template = constants.%TestBinary] { +// CHECK:STDOUT: %TestBinary.decl: %TestBinary.type = fn_decl @TestBinary [template = constants.%TestBinary] { // CHECK:STDOUT: %C.ref.loc23_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_15.1: C = param a -// CHECK:STDOUT: @TestBinary.%a: C = bind_name a, %a.loc23_15.1 +// CHECK:STDOUT: %a.loc23_15.1: %C = param a +// CHECK:STDOUT: @TestBinary.%a: %C = bind_name a, %a.loc23_15.1 // CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc23_21.1: C = param b -// CHECK:STDOUT: @TestBinary.%b: C = bind_name b, %b.loc23_21.1 +// CHECK:STDOUT: %b.loc23_21.1: %C = param b +// CHECK:STDOUT: @TestBinary.%b: %C = bind_name b, %b.loc23_21.1 // CHECK:STDOUT: %C.ref.loc23_30: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestBinary.%return: ref C = var +// CHECK:STDOUT: @TestBinary.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6: type = import_ref ir4, inst+1, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.7 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.8: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.8: %.8 = import_ref ir4, inst+24, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.9 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+19, unloaded -// CHECK:STDOUT: %TestRef.decl: = fn_decl @TestRef [template = constants.%TestRef] { +// CHECK:STDOUT: %TestRef.decl: %TestRef.type = fn_decl @TestRef [template = constants.%TestRef] { // CHECK:STDOUT: %C.ref.loc31: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc31_12.1: C = param b -// CHECK:STDOUT: @TestRef.%b: C = bind_name b, %b.loc31_12.1 +// CHECK:STDOUT: %b.loc31_12.1: %C = param b +// CHECK:STDOUT: @TestRef.%b: %C = bind_name b, %b.loc31_12.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+26, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.13: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.13: %.12 = import_ref ir4, inst+47, loaded [template = constants.%.13] // CHECK:STDOUT: %import_ref.14 = import_ref ir4, inst+43, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref ir4, inst+43, unloaded // CHECK:STDOUT: %import_ref.16: type = import_ref ir4, inst+49, loaded [template = constants.%.14] // CHECK:STDOUT: %import_ref.17 = import_ref ir4, inst+51, unloaded -// CHECK:STDOUT: %import_ref.18: in Inc> = import_ref ir4, inst+65, loaded [template = constants.%.17] +// CHECK:STDOUT: %import_ref.18: %.16 = import_ref ir4, inst+65, loaded [template = constants.%.17] // CHECK:STDOUT: %import_ref.19 = import_ref ir4, inst+61, unloaded // CHECK:STDOUT: %import_ref.20 = import_ref ir4, inst+61, unloaded // CHECK:STDOUT: } @@ -170,39 +170,39 @@ fn TestRef(b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestUnary(%a: C) -> %return: C { +// CHECK:STDOUT: fn @TestUnary(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C = name_ref a, %a +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[%self: Self]() -> Self; +// CHECK:STDOUT: fn @Op.1[%self: %Self.1]() -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestBinary(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestBinary(%a: %C, %b: %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: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.2](%other: %Self.2) -> %Self.2; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestRef(%b: C) { +// CHECK:STDOUT: fn @TestRef(%b: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.var: ref C = var a -// CHECK:STDOUT: %a: ref C = bind_name a, %a.var -// CHECK:STDOUT: %.loc32_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc32_15.2: init C = class_init (), %a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc32_16: init C = converted %.loc32_15.1, %.loc32_15.2 [template = constants.%struct] +// CHECK:STDOUT: %a.var: ref %C = var a +// CHECK:STDOUT: %a: ref %C = bind_name a, %a.var +// CHECK:STDOUT: %.loc32_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc32_15.2: init %C = class_init (), %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc32_16: init %C = converted %.loc32_15.1, %.loc32_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc32_16 -// CHECK:STDOUT: %a.ref.loc37: ref C = name_ref a, %a -// CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %a.ref.loc41: ref C = name_ref a, %a +// CHECK:STDOUT: %a.ref.loc37: ref %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %a.ref.loc41: ref %C = name_ref a, %a // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.3[addr %self: %.11](%other: %Self.3); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](); +// CHECK:STDOUT: fn @Op.4[addr %self: %.15](); // 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 3b6c30dc4f47..8b72e777820e 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 @@ -49,32 +49,32 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] -// CHECK:STDOUT: %Self.1: Add = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = interface_type @AddAssign [template] -// CHECK:STDOUT: %Self.2: AddAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.6: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] -// CHECK:STDOUT: %Test: = struct_value () [template] -// CHECK:STDOUT: %.9: type = ptr_type {} [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, [template] -// CHECK:STDOUT: %.11: in Add> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %Test: %Test.type = struct_value () [template] +// CHECK:STDOUT: %.9: type = ptr_type %.1 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, [template] -// CHECK:STDOUT: %.13: in AddAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -90,8 +90,8 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+19, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir4, inst+24, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc16: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc16: = name_ref Core, %Core [template = %Core] @@ -99,29 +99,29 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+26, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.7: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+43, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir4, inst+47, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+43, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc19: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, %import_ref.5 [template = constants.%.5] // CHECK:STDOUT: } -// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] { +// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] { // CHECK:STDOUT: %C.ref.loc23_12: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_9.1: C = param a -// CHECK:STDOUT: @Test.%a: C = bind_name a, %a.loc23_9.1 +// CHECK:STDOUT: %a.loc23_9.1: %C = param a +// CHECK:STDOUT: @Test.%a: %C = bind_name a, %a.loc23_9.1 // CHECK:STDOUT: %D.ref.loc23: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc23_15.1: D = param b -// CHECK:STDOUT: @Test.%b: D = bind_name b, %b.loc23_15.1 +// CHECK:STDOUT: %b.loc23_15.1: %D = param b +// CHECK:STDOUT: @Test.%b: %D = bind_name b, %b.loc23_15.1 // CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @Test.%return: ref C = var +// CHECK:STDOUT: @Test.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+19, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %D.ref.loc34: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc34_15.1: D = param b -// CHECK:STDOUT: @TestAssign.%b: D = bind_name b, %b.loc34_15.1 +// CHECK:STDOUT: %b.loc34_15.1: %D = param b +// CHECK:STDOUT: @TestAssign.%b: %D = bind_name b, %b.loc34_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+26, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+43, unloaded @@ -141,16 +141,16 @@ fn TestAssign(b: D) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Add { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc17_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc17_9.1: C = param self -// CHECK:STDOUT: %self.loc17_9.2: C = bind_name self, %self.loc17_9.1 +// CHECK:STDOUT: %self.loc17_9.1: %C = param self +// CHECK:STDOUT: %self.loc17_9.2: %C = bind_name self, %self.loc17_9.1 // CHECK:STDOUT: %C.ref.loc17_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc17_18.1: C = param other -// CHECK:STDOUT: %other.loc17_18.2: C = bind_name other, %other.loc17_18.1 +// CHECK:STDOUT: %other.loc17_18.1: %C = param other +// CHECK:STDOUT: %other.loc17_18.2: %C = bind_name other, %other.loc17_18.1 // CHECK:STDOUT: %C.ref.loc17_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -159,16 +159,16 @@ fn TestAssign(b: D) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as AddAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.5 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.6] -// CHECK:STDOUT: %self.loc20_14.1: C* = param self -// CHECK:STDOUT: %self.loc20_14.3: C* = bind_name self, %self.loc20_14.1 -// CHECK:STDOUT: %.loc20_9: C* = addr_pattern %self.loc20_14.3 +// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.6] +// CHECK:STDOUT: %self.loc20_14.1: %.6 = param self +// CHECK:STDOUT: %self.loc20_14.3: %.6 = bind_name self, %self.loc20_14.1 +// CHECK:STDOUT: %.loc20_9: %.6 = addr_pattern %self.loc20_14.3 // CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc20_24.1: C = param other -// CHECK:STDOUT: %other.loc20_24.2: C = bind_name other, %other.loc20_24.1 +// CHECK:STDOUT: %other.loc20_24.1: %C = param other +// CHECK:STDOUT: %other.loc20_24.2: %C = bind_name other, %other.loc20_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: @@ -187,40 +187,40 @@ fn TestAssign(b: D) { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc17_9.2: C](@impl.1.%other.loc17_18.2: C) -> C; +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc17_9.2: %C](@impl.1.%other.loc17_18.2: %C) -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc20_14.3: C*](@impl.2.%other.loc20_24.2: C); +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc20_14.3: %.6](@impl.2.%other.loc20_24.2: %C); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.7](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Test(%a: C, %b: D) -> %return: C { +// CHECK:STDOUT: fn @Test(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc31_12.1: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc31_12.2: ref C = temporary_storage -// CHECK:STDOUT: %Op.call: init C = call %.loc31_12.1() [template = ] +// CHECK:STDOUT: %.loc31_12.2: ref %C = temporary_storage +// CHECK:STDOUT: %Op.call: init %C = call %.loc31_12.1() [template = ] // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%b: D) { +// CHECK:STDOUT: fn @TestAssign(%b: %D) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.var: ref C = var a -// CHECK:STDOUT: %a: ref C = bind_name a, %a.var -// CHECK:STDOUT: %.loc35_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc35_15.2: init C = class_init (), %a.var [template = constants.%struct] -// CHECK:STDOUT: %.loc35_16: init C = converted %.loc35_15.1, %.loc35_15.2 [template = constants.%struct] +// CHECK:STDOUT: %a.var: ref %C = var a +// CHECK:STDOUT: %a: ref %C = bind_name a, %a.var +// CHECK:STDOUT: %.loc35_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc35_15.2: init %C = class_init (), %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc35_16: init %C = converted %.loc35_15.1, %.loc35_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc35_16 -// CHECK:STDOUT: %a.ref: ref C = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b -// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc42_5: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc42_3: C* = addr_of %a.ref -// CHECK:STDOUT: %Op.call: init () = call %.loc42_5() [template = ] +// CHECK:STDOUT: %.loc42_3: %.6 = addr_of %a.ref +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc42_5() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index a748753c5a1e..a2f0058b4905 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -29,21 +29,21 @@ fn TestOp() { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Inc [template] -// CHECK:STDOUT: %Self: Inc = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.3: type = ptr_type C [template] +// CHECK:STDOUT: %Self: %.2 = 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: %Op.1: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %Self [symbolic] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Inc, [template] -// CHECK:STDOUT: %.9: in Inc> = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Inc, %Op.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,14 +56,14 @@ fn TestOp() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+51, unloaded -// CHECK:STDOUT: %import_ref.3: in Inc> = import_ref ir4, inst+65, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+61, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.8 = import_ref ir4, inst+65, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+61, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Inc.ref: type = name_ref Inc, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] {} +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] {} // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+61, unloaded // CHECK:STDOUT: } @@ -75,13 +75,13 @@ fn TestOp() { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Inc { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc18_21: type = ptr_type C [template = constants.%.3] -// CHECK:STDOUT: %self.loc18_14.1: C* = param self -// CHECK:STDOUT: %self.loc18_14.3: C* = bind_name self, %self.loc18_14.1 -// CHECK:STDOUT: %.loc18_9: C* = addr_pattern %self.loc18_14.3 +// CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.3] +// CHECK:STDOUT: %self.loc18_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc18_14.3: %.3 = bind_name self, %self.loc18_14.1 +// CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self.loc18_14.3 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: @@ -95,24 +95,24 @@ fn TestOp() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[addr @impl.%self.loc18_14.3: C*](); +// CHECK:STDOUT: fn @Op.1[addr @impl.%self.loc18_14.3: %.3](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[addr %self: Self*](); +// CHECK:STDOUT: fn @Op.2[addr %self: %.5](); // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { // CHECK:STDOUT: !entry: // 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: %.loc22_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc22_15.2: init C = class_init (), %c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc22_16: init C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var +// CHECK:STDOUT: %.loc22_15.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc22_15.2: init %C = class_init (), %c.var [template = constants.%struct] +// 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: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3: = bound_method %c.ref, %.1 -// CHECK:STDOUT: %.loc23_5: C* = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init () = call %.loc23_3(%.loc23_5) +// CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index 14ebd24c066b..ddc899cfaa87 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @LeftShift [template] -// CHECK:STDOUT: %Self.1: LeftShift = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @LeftShiftAssign [template] -// CHECK:STDOUT: %Self.2: LeftShiftAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @LeftShift, [template] -// CHECK:STDOUT: %.11: in LeftShift> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @LeftShift, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @LeftShiftAssign, [template] -// CHECK:STDOUT: %.13: in LeftShiftAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @LeftShiftAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+162, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+164, unloaded -// CHECK:STDOUT: %import_ref.3: in LeftShift> = import_ref ir5, inst+184, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+180, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir5, inst+184, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir5, inst+180, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+186, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+188, unloaded -// CHECK:STDOUT: %import_ref.7: in LeftShiftAssign> = import_ref ir5, inst+207, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+203, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir5, inst+207, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir5, inst+203, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %LeftShiftAssign.ref: type = name_ref LeftShiftAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+162, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+180, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir5, inst+186, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir5, inst+203, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as LeftShift { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as LeftShiftAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 63134cf21dfd..befd5857fe3c 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Mod [template] -// CHECK:STDOUT: %Self.1: Mod = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @ModAssign [template] -// CHECK:STDOUT: %Self.2: ModAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Mod, [template] -// CHECK:STDOUT: %.11: in Mod> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Mod, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @ModAssign, [template] -// CHECK:STDOUT: %.13: in ModAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @ModAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+245, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+247, unloaded -// CHECK:STDOUT: %import_ref.3: in Mod> = import_ref ir4, inst+267, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+263, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir4, inst+267, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+263, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+269, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+271, unloaded -// CHECK:STDOUT: %import_ref.7: in ModAssign> = import_ref ir4, inst+290, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+286, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir4, inst+290, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+286, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %ModAssign.ref: type = name_ref ModAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+245, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+263, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+269, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+286, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Mod { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as ModAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index 735b50351c19..124b75d4b03b 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Mul [template] -// CHECK:STDOUT: %Self.1: Mul = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @MulAssign [template] -// CHECK:STDOUT: %Self.2: MulAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Mul, [template] -// CHECK:STDOUT: %.11: in Mul> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Mul, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @MulAssign, [template] -// CHECK:STDOUT: %.13: in MulAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @MulAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+151, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+153, unloaded -// CHECK:STDOUT: %import_ref.3: in Mul> = import_ref ir4, inst+173, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+169, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir4, inst+173, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+169, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+175, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+177, unloaded -// CHECK:STDOUT: %import_ref.7: in MulAssign> = import_ref ir4, inst+196, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+192, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir4, inst+196, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+192, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %MulAssign.ref: type = name_ref MulAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+151, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+169, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+175, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+192, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Mul { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as MulAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index bcbaea38adc4..87fd4b89a288 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -30,19 +30,19 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Negate [template] -// CHECK:STDOUT: %Self: Negate = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Negate, [template] -// CHECK:STDOUT: %.7: in Negate> = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Negate, %Op.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,19 +55,19 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+67, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+69, unloaded -// CHECK:STDOUT: %import_ref.3: in Negate> = import_ref ir4, inst+84, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+80, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.6 = import_ref ir4, inst+84, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+80, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Negate.ref: type = name_ref Negate, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc23_11.1 +// CHECK:STDOUT: %a.loc23_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc23_11.1 // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+67, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+80, unloaded @@ -80,13 +80,13 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: witness = (file.%import_ref.4) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Negate { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -100,23 +100,23 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.%self.loc18_9.2: C]() -> @impl.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.%self.loc18_9.2: %C]() -> @impl.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self]() -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self]() -> %Self; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc23: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc24(%a.ref) to %.loc23 +// CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc24(%a.ref) to %.loc23 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index fc2cd2d4f456..8fcdcc8795fe 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -80,44 +80,44 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Ordered [template] -// CHECK:STDOUT: %Self: Ordered = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type.1: type = fn_type @Less.1 [template] -// CHECK:STDOUT: %Less.1: = struct_value () [template] +// CHECK:STDOUT: %Less.1: %Less.type.1 = struct_value () [template] // CHECK:STDOUT: %LessOrEquivalent.type.1: type = fn_type @LessOrEquivalent.1 [template] -// CHECK:STDOUT: %LessOrEquivalent.1: = struct_value () [template] +// CHECK:STDOUT: %LessOrEquivalent.1: %LessOrEquivalent.type.1 = struct_value () [template] // CHECK:STDOUT: %Greater.type.1: type = fn_type @Greater.1 [template] -// CHECK:STDOUT: %Greater.1: = struct_value () [template] +// CHECK:STDOUT: %Greater.1: %Greater.type.1 = struct_value () [template] // CHECK:STDOUT: %GreaterOrEquivalent.type.1: type = fn_type @GreaterOrEquivalent.1 [template] -// CHECK:STDOUT: %GreaterOrEquivalent.1: = struct_value () [template] +// CHECK:STDOUT: %GreaterOrEquivalent.1: %GreaterOrEquivalent.type.1 = struct_value () [template] // CHECK:STDOUT: %Less.type.2: type = fn_type @Less.2 [template] -// CHECK:STDOUT: %Less.2: = struct_value () [template] +// CHECK:STDOUT: %Less.2: %Less.type.2 = struct_value () [template] // CHECK:STDOUT: %LessOrEquivalent.type.2: type = fn_type @LessOrEquivalent.2 [template] -// CHECK:STDOUT: %LessOrEquivalent.2: = struct_value () [template] +// CHECK:STDOUT: %LessOrEquivalent.2: %LessOrEquivalent.type.2 = struct_value () [template] // CHECK:STDOUT: %Greater.type.2: type = fn_type @Greater.2 [template] -// CHECK:STDOUT: %Greater.2: = struct_value () [template] +// 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: = struct_value () [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: %TestLess.type: type = fn_type @TestLess [template] -// CHECK:STDOUT: %TestLess: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.7: in Ordered> = assoc_entity element0, file.%import_ref.17 [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, %Less.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.17 [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] -// CHECK:STDOUT: %TestLessEqual: = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.9: in Ordered> = assoc_entity element1, file.%import_ref.20 [template] +// CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Ordered, %LessOrEquivalent.type.2 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element1, file.%import_ref.20 [template] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] -// CHECK:STDOUT: %TestGreater: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.11: in Ordered> = assoc_entity element2, file.%import_ref.23 [template] +// CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Ordered, %Greater.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element2, file.%import_ref.23 [template] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] -// CHECK:STDOUT: %TestGreaterEqual: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.13: in Ordered> = assoc_entity element3, file.%import_ref.26 [template] +// CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @Ordered, %GreaterOrEquivalent.type.2 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element3, file.%import_ref.26 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -132,32 +132,32 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir6, inst+51, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.2: in Ordered> = import_ref ir6, inst+93, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.2: %.8 = import_ref ir6, inst+93, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.3 = import_ref ir6, inst+53, unloaded -// CHECK:STDOUT: %import_ref.4: in Ordered> = import_ref ir6, inst+133, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.5: in Ordered> = import_ref ir6, inst+73, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.6: in Ordered> = import_ref ir6, inst+113, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.7: = import_ref ir6, inst+69, loaded [template = constants.%Less.2] -// CHECK:STDOUT: %import_ref.8: = import_ref ir6, inst+89, loaded [template = constants.%LessOrEquivalent.2] -// CHECK:STDOUT: %import_ref.9: = import_ref ir6, inst+109, loaded [template = constants.%Greater.2] -// CHECK:STDOUT: %import_ref.10: = import_ref ir6, inst+129, loaded [template = constants.%GreaterOrEquivalent.2] +// CHECK:STDOUT: %import_ref.4: %.12 = import_ref ir6, inst+133, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.5: %.6 = import_ref ir6, inst+73, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.6: %.10 = import_ref ir6, inst+113, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.7: %Less.type.2 = import_ref ir6, inst+69, loaded [template = constants.%Less.2] +// CHECK:STDOUT: %import_ref.8: %LessOrEquivalent.type.2 = import_ref ir6, inst+89, loaded [template = constants.%LessOrEquivalent.2] +// CHECK:STDOUT: %import_ref.9: %Greater.type.2 = import_ref ir6, inst+109, loaded [template = constants.%Greater.2] +// CHECK:STDOUT: %import_ref.10: %GreaterOrEquivalent.type.2 = import_ref ir6, inst+129, loaded [template = constants.%GreaterOrEquivalent.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Ordered.ref: type = name_ref Ordered, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.13: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.14: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.15: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestLess.decl: = fn_decl @TestLess [template = constants.%TestLess] { +// CHECK:STDOUT: %import_ref.11: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.12: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.13: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.14: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.15: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %C.ref.loc13_16: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc13_13.1: C = param a -// CHECK:STDOUT: @TestLess.%a: C = bind_name a, %a.loc13_13.1 +// CHECK:STDOUT: %a.loc13_13.1: %C = param a +// CHECK:STDOUT: @TestLess.%a: %C = bind_name a, %a.loc13_13.1 // CHECK:STDOUT: %C.ref.loc13_22: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc13_19.1: C = param b -// CHECK:STDOUT: @TestLess.%b: C = bind_name b, %b.loc13_19.1 +// CHECK:STDOUT: %b.loc13_19.1: %C = param b +// CHECK:STDOUT: @TestLess.%b: %C = bind_name b, %b.loc13_19.1 // CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %bool.make_type.loc13 [template = bool] // CHECK:STDOUT: %.loc13_28.2: type = converted %bool.make_type.loc13, %.loc13_28.1 [template = bool] @@ -165,14 +165,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.16: type = import_ref ir6, inst+51, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.17 = import_ref ir6, inst+69, unloaded -// CHECK:STDOUT: %import_ref.18: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestLessEqual.decl: = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { +// CHECK:STDOUT: %import_ref.18: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLessEqual.decl: %TestLessEqual.type = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { // CHECK:STDOUT: %C.ref.loc17_21: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc17_18.1: C = param a -// CHECK:STDOUT: @TestLessEqual.%a: C = bind_name a, %a.loc17_18.1 +// CHECK:STDOUT: %a.loc17_18.1: %C = param a +// CHECK:STDOUT: @TestLessEqual.%a: %C = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %C.ref.loc17_27: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc17_24.1: C = param b -// CHECK:STDOUT: @TestLessEqual.%b: C = bind_name b, %b.loc17_24.1 +// CHECK:STDOUT: %b.loc17_24.1: %C = param b +// CHECK:STDOUT: @TestLessEqual.%b: %C = bind_name b, %b.loc17_24.1 // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_33.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_33.2: type = converted %bool.make_type.loc17, %.loc17_33.1 [template = bool] @@ -180,14 +180,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.19: type = import_ref ir6, inst+51, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.20 = import_ref ir6, inst+89, unloaded -// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestGreater.decl: = fn_decl @TestGreater [template = constants.%TestGreater] { +// CHECK:STDOUT: %import_ref.21: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreater.decl: %TestGreater.type = fn_decl @TestGreater [template = constants.%TestGreater] { // CHECK:STDOUT: %C.ref.loc21_19: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc21_16.1: C = param a -// CHECK:STDOUT: @TestGreater.%a: C = bind_name a, %a.loc21_16.1 +// CHECK:STDOUT: %a.loc21_16.1: %C = param a +// CHECK:STDOUT: @TestGreater.%a: %C = bind_name a, %a.loc21_16.1 // CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc21_22.1: C = param b -// CHECK:STDOUT: @TestGreater.%b: C = bind_name b, %b.loc21_22.1 +// CHECK:STDOUT: %b.loc21_22.1: %C = param b +// CHECK:STDOUT: @TestGreater.%b: %C = bind_name b, %b.loc21_22.1 // CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_31.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] // CHECK:STDOUT: %.loc21_31.2: type = converted %bool.make_type.loc21, %.loc21_31.1 [template = bool] @@ -195,14 +195,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.22: type = import_ref ir6, inst+51, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.23 = import_ref ir6, inst+109, unloaded -// CHECK:STDOUT: %import_ref.24: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestGreaterEqual.decl: = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { +// CHECK:STDOUT: %import_ref.24: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreaterEqual.decl: %TestGreaterEqual.type = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { // CHECK:STDOUT: %C.ref.loc25_24: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc25_21.1: C = param a -// CHECK:STDOUT: @TestGreaterEqual.%a: C = bind_name a, %a.loc25_21.1 +// CHECK:STDOUT: %a.loc25_21.1: %C = param a +// CHECK:STDOUT: @TestGreaterEqual.%a: %C = bind_name a, %a.loc25_21.1 // CHECK:STDOUT: %C.ref.loc25_30: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc25_27.1: C = param b -// CHECK:STDOUT: @TestGreaterEqual.%b: C = bind_name b, %b.loc25_27.1 +// CHECK:STDOUT: %b.loc25_27.1: %C = param b +// CHECK:STDOUT: @TestGreaterEqual.%b: %C = bind_name b, %b.loc25_27.1 // CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_36.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_36.2: type = converted %bool.make_type.loc25, %.loc25_36.1 [template = bool] @@ -222,50 +222,50 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: witness = (file.%import_ref.7, file.%import_ref.8, file.%import_ref.9, file.%import_ref.10) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: C as Ordered { -// CHECK:STDOUT: %Less.decl: = fn_decl @Less.1 [template = constants.%Less.1] { +// CHECK:STDOUT: impl @impl: %C as %.2 { +// CHECK:STDOUT: %Less.decl: %Less.type.1 = fn_decl @Less.1 [template = constants.%Less.1] { // CHECK:STDOUT: %C.ref.loc7_17: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc7_11.1: C = param self -// CHECK:STDOUT: %self.loc7_11.2: C = bind_name self, %self.loc7_11.1 +// CHECK:STDOUT: %self.loc7_11.1: %C = param self +// CHECK:STDOUT: %self.loc7_11.2: %C = bind_name self, %self.loc7_11.1 // CHECK:STDOUT: %C.ref.loc7_27: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc7_20.1: C = param other -// CHECK:STDOUT: %other.loc7_20.2: C = bind_name other, %other.loc7_20.1 +// CHECK:STDOUT: %other.loc7_20.1: %C = param other +// CHECK:STDOUT: %other.loc7_20.2: %C = bind_name other, %other.loc7_20.1 // CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_33.1: type = value_of_initializer %bool.make_type.loc7 [template = bool] // CHECK:STDOUT: %.loc7_33.2: type = converted %bool.make_type.loc7, %.loc7_33.1 [template = bool] // CHECK:STDOUT: %return.var.loc7: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %LessOrEquivalent.decl: = fn_decl @LessOrEquivalent.1 [template = constants.%LessOrEquivalent.1] { +// CHECK:STDOUT: %LessOrEquivalent.decl: %LessOrEquivalent.type.1 = fn_decl @LessOrEquivalent.1 [template = constants.%LessOrEquivalent.1] { // CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc8_23.1: C = param self -// CHECK:STDOUT: %self.loc8_23.2: C = bind_name self, %self.loc8_23.1 +// CHECK:STDOUT: %self.loc8_23.1: %C = param self +// CHECK:STDOUT: %self.loc8_23.2: %C = bind_name self, %self.loc8_23.1 // CHECK:STDOUT: %C.ref.loc8_39: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc8_32.1: C = param other -// CHECK:STDOUT: %other.loc8_32.2: C = bind_name other, %other.loc8_32.1 +// CHECK:STDOUT: %other.loc8_32.1: %C = param other +// CHECK:STDOUT: %other.loc8_32.2: %C = bind_name other, %other.loc8_32.1 // CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_45.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] // CHECK:STDOUT: %.loc8_45.2: type = converted %bool.make_type.loc8, %.loc8_45.1 [template = bool] // CHECK:STDOUT: %return.var.loc8: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Greater.decl: = fn_decl @Greater.1 [template = constants.%Greater.1] { +// CHECK:STDOUT: %Greater.decl: %Greater.type.1 = fn_decl @Greater.1 [template = constants.%Greater.1] { // CHECK:STDOUT: %C.ref.loc9_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc9_14.1: C = param self -// CHECK:STDOUT: %self.loc9_14.2: C = bind_name self, %self.loc9_14.1 +// CHECK:STDOUT: %self.loc9_14.1: %C = param self +// CHECK:STDOUT: %self.loc9_14.2: %C = bind_name self, %self.loc9_14.1 // CHECK:STDOUT: %C.ref.loc9_30: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc9_23.1: C = param other -// CHECK:STDOUT: %other.loc9_23.2: C = bind_name other, %other.loc9_23.1 +// CHECK:STDOUT: %other.loc9_23.1: %C = param other +// CHECK:STDOUT: %other.loc9_23.2: %C = bind_name other, %other.loc9_23.1 // CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] // CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type.loc9, %.loc9_36.1 [template = bool] // CHECK:STDOUT: %return.var.loc9: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %GreaterOrEquivalent.decl: = fn_decl @GreaterOrEquivalent.1 [template = constants.%GreaterOrEquivalent.1] { +// CHECK:STDOUT: %GreaterOrEquivalent.decl: %GreaterOrEquivalent.type.1 = fn_decl @GreaterOrEquivalent.1 [template = constants.%GreaterOrEquivalent.1] { // CHECK:STDOUT: %C.ref.loc10_32: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc10_26.1: C = param self -// CHECK:STDOUT: %self.loc10_26.2: C = bind_name self, %self.loc10_26.1 +// CHECK:STDOUT: %self.loc10_26.1: %C = param self +// CHECK:STDOUT: %self.loc10_26.2: %C = bind_name self, %self.loc10_26.1 // CHECK:STDOUT: %C.ref.loc10_42: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc10_35.1: C = param other -// CHECK:STDOUT: %other.loc10_35.2: C = bind_name other, %other.loc10_35.1 +// CHECK:STDOUT: %other.loc10_35.1: %C = param other +// CHECK:STDOUT: %other.loc10_35.2: %C = bind_name other, %other.loc10_35.1 // CHECK:STDOUT: %bool.make_type.loc10: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc10_48.1: type = value_of_initializer %bool.make_type.loc10 [template = bool] // CHECK:STDOUT: %.loc10_48.2: type = converted %bool.make_type.loc10, %.loc10_48.1 [template = bool] @@ -288,27 +288,27 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Less.1[@impl.%self.loc7_11.2: C](@impl.%other.loc7_20.2: C) -> bool; +// CHECK:STDOUT: fn @Less.1[@impl.%self.loc7_11.2: %C](@impl.%other.loc7_20.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @LessOrEquivalent.1[@impl.%self.loc8_23.2: C](@impl.%other.loc8_32.2: C) -> bool; +// CHECK:STDOUT: fn @LessOrEquivalent.1[@impl.%self.loc8_23.2: %C](@impl.%other.loc8_32.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Greater.1[@impl.%self.loc9_14.2: C](@impl.%other.loc9_23.2: C) -> bool; +// CHECK:STDOUT: fn @Greater.1[@impl.%self.loc9_14.2: %C](@impl.%other.loc9_23.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @GreaterOrEquivalent.1[@impl.%self.loc10_26.2: C](@impl.%other.loc10_35.2: C) -> bool; +// CHECK:STDOUT: fn @GreaterOrEquivalent.1[@impl.%self.loc10_26.2: %C](@impl.%other.loc10_35.2: %C) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Less.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Less.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @LessOrEquivalent.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @LessOrEquivalent.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Greater.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Greater.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @GreaterOrEquivalent.2[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @GreaterOrEquivalent.2[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestLess(%a: C, %b: C) -> bool { +// CHECK:STDOUT: fn @TestLess(%a: %C, %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: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Less.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Less.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Less.1] // CHECK:STDOUT: %.loc14_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Less.call: init bool = call %.loc14_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -316,11 +316,11 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: return %.loc14_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestLessEqual(%a: C, %b: C) -> bool { +// CHECK:STDOUT: fn @TestLessEqual(%a: %C, %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: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%LessOrEquivalent.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %LessOrEquivalent.type.2 = interface_witness_access @impl.%.1, element1 [template = constants.%LessOrEquivalent.1] // CHECK:STDOUT: %.loc18_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -328,11 +328,11 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: return %.loc18_16.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestGreater(%a: C, %b: C) -> bool { +// CHECK:STDOUT: fn @TestGreater(%a: %C, %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: %.1: = interface_witness_access @impl.%.1, element2 [template = constants.%Greater.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Greater.type.2 = interface_witness_access @impl.%.1, element2 [template = constants.%Greater.1] // CHECK:STDOUT: %.loc22_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -340,11 +340,11 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: return %.loc22_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestGreaterEqual(%a: C, %b: C) -> bool { +// CHECK:STDOUT: fn @TestGreaterEqual(%a: %C, %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: %.1: = interface_witness_access @impl.%.1, element3 [template = constants.%GreaterOrEquivalent.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %GreaterOrEquivalent.type.2 = interface_witness_access @impl.%.1, element3 [template = constants.%GreaterOrEquivalent.1] // CHECK:STDOUT: %.loc26_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call @@ -359,34 +359,34 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] -// CHECK:STDOUT: %TestLess: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = ptr_type %.1 [template] // CHECK:STDOUT: %.4: type = interface_type @Ordered [template] -// CHECK:STDOUT: %Self: Ordered = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] -// CHECK:STDOUT: %Less: = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.6: in Ordered> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Less: %Less.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Ordered, %Less.type [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] -// CHECK:STDOUT: %TestLessEqual: = struct_value () [template] +// CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [template] // CHECK:STDOUT: %LessOrEquivalent.type: type = fn_type @LessOrEquivalent [template] -// CHECK:STDOUT: %LessOrEquivalent: = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.8: in Ordered> = assoc_entity element1, file.%import_ref.15 [template] +// CHECK:STDOUT: %LessOrEquivalent: %LessOrEquivalent.type = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @Ordered, %LessOrEquivalent.type [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element1, file.%import_ref.15 [template] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] -// CHECK:STDOUT: %TestGreater: = struct_value () [template] +// CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] -// CHECK:STDOUT: %Greater: = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.10: in Ordered> = assoc_entity element2, file.%import_ref.18 [template] +// CHECK:STDOUT: %Greater: %Greater.type = struct_value () [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type @Ordered, %Greater.type [template] +// CHECK:STDOUT: %.10: %.9 = assoc_entity element2, file.%import_ref.18 [template] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] -// CHECK:STDOUT: %TestGreaterEqual: = struct_value () [template] +// CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [template] // CHECK:STDOUT: %GreaterOrEquivalent.type: type = fn_type @GreaterOrEquivalent [template] -// CHECK:STDOUT: %GreaterOrEquivalent: = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @Ordered, [template] -// CHECK:STDOUT: %.12: in Ordered> = assoc_entity element3, file.%import_ref.21 [template] +// CHECK:STDOUT: %GreaterOrEquivalent: %GreaterOrEquivalent.type = struct_value () [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @Ordered, %GreaterOrEquivalent.type [template] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element3, file.%import_ref.21 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -400,38 +400,38 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestLess.decl: = fn_decl @TestLess [template = constants.%TestLess] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %D.ref.loc6_16: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc6_13.1: D = param a -// CHECK:STDOUT: @TestLess.%a: D = bind_name a, %a.loc6_13.1 +// CHECK:STDOUT: %a.loc6_13.1: %D = param a +// CHECK:STDOUT: @TestLess.%a: %D = bind_name a, %a.loc6_13.1 // CHECK:STDOUT: %D.ref.loc6_22: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc6_19.1: D = param b -// CHECK:STDOUT: @TestLess.%b: D = bind_name b, %b.loc6_19.1 +// CHECK:STDOUT: %b.loc6_19.1: %D = param b +// CHECK:STDOUT: @TestLess.%b: %D = bind_name b, %b.loc6_19.1 // CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_28.1: type = value_of_initializer %bool.make_type.loc6 [template = bool] // CHECK:STDOUT: %.loc6_28.2: type = converted %bool.make_type.loc6, %.loc6_28.1 [template = bool] // CHECK:STDOUT: @TestLess.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir6, inst+51, loaded [template = constants.%.4] -// CHECK:STDOUT: %import_ref.3: in Ordered> = import_ref ir6, inst+93, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.3: %.7 = import_ref ir6, inst+93, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.4 = import_ref ir6, inst+53, unloaded -// CHECK:STDOUT: %import_ref.5: in Ordered> = import_ref ir6, inst+133, loaded [template = constants.%.12] -// CHECK:STDOUT: %import_ref.6: in Ordered> = import_ref ir6, inst+73, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.7: in Ordered> = import_ref ir6, inst+113, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.5: %.11 = import_ref ir6, inst+133, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.6: %.5 = import_ref ir6, inst+73, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.7: %.9 = import_ref ir6, inst+113, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.8 = import_ref ir6, inst+69, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref ir6, inst+89, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir6, inst+109, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref ir6, inst+129, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref ir6, inst+69, unloaded -// CHECK:STDOUT: %import_ref.13: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestLessEqual.decl: = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { +// CHECK:STDOUT: %import_ref.13: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLessEqual.decl: %TestLessEqual.type = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { // CHECK:STDOUT: %D.ref.loc14_21: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc14_18.1: D = param a -// CHECK:STDOUT: @TestLessEqual.%a: D = bind_name a, %a.loc14_18.1 +// CHECK:STDOUT: %a.loc14_18.1: %D = param a +// CHECK:STDOUT: @TestLessEqual.%a: %D = bind_name a, %a.loc14_18.1 // CHECK:STDOUT: %D.ref.loc14_27: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc14_24.1: D = param b -// CHECK:STDOUT: @TestLessEqual.%b: D = bind_name b, %b.loc14_24.1 +// CHECK:STDOUT: %b.loc14_24.1: %D = param b +// CHECK:STDOUT: @TestLessEqual.%b: %D = bind_name b, %b.loc14_24.1 // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_33.2: type = converted %bool.make_type.loc14, %.loc14_33.1 [template = bool] @@ -439,14 +439,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.14: type = import_ref ir6, inst+51, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.15 = import_ref ir6, inst+89, unloaded -// CHECK:STDOUT: %import_ref.16: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestGreater.decl: = fn_decl @TestGreater [template = constants.%TestGreater] { +// CHECK:STDOUT: %import_ref.16: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreater.decl: %TestGreater.type = fn_decl @TestGreater [template = constants.%TestGreater] { // CHECK:STDOUT: %D.ref.loc22_19: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc22_16.1: D = param a -// CHECK:STDOUT: @TestGreater.%a: D = bind_name a, %a.loc22_16.1 +// CHECK:STDOUT: %a.loc22_16.1: %D = param a +// CHECK:STDOUT: @TestGreater.%a: %D = bind_name a, %a.loc22_16.1 // CHECK:STDOUT: %D.ref.loc22_25: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc22_22.1: D = param b -// CHECK:STDOUT: @TestGreater.%b: D = bind_name b, %b.loc22_22.1 +// CHECK:STDOUT: %b.loc22_22.1: %D = param b +// CHECK:STDOUT: @TestGreater.%b: %D = bind_name b, %b.loc22_22.1 // CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_31.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_31.2: type = converted %bool.make_type.loc22, %.loc22_31.1 [template = bool] @@ -454,14 +454,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.17: type = import_ref ir6, inst+51, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.18 = import_ref ir6, inst+109, unloaded -// CHECK:STDOUT: %import_ref.19: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %TestGreaterEqual.decl: = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { +// CHECK:STDOUT: %import_ref.19: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreaterEqual.decl: %TestGreaterEqual.type = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { // CHECK:STDOUT: %D.ref.loc30_24: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc30_21.1: D = param a -// CHECK:STDOUT: @TestGreaterEqual.%a: D = bind_name a, %a.loc30_21.1 +// CHECK:STDOUT: %a.loc30_21.1: %D = param a +// CHECK:STDOUT: @TestGreaterEqual.%a: %D = bind_name a, %a.loc30_21.1 // CHECK:STDOUT: %D.ref.loc30_30: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc30_27.1: D = param b -// CHECK:STDOUT: @TestGreaterEqual.%b: D = bind_name b, %b.loc30_27.1 +// CHECK:STDOUT: %b.loc30_27.1: %D = param b +// CHECK:STDOUT: @TestGreaterEqual.%b: %D = bind_name b, %b.loc30_27.1 // CHECK:STDOUT: %bool.make_type.loc30: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc30_36.1: type = value_of_initializer %bool.make_type.loc30 [template = bool] // CHECK:STDOUT: %.loc30_36.2: type = converted %bool.make_type.loc30, %.loc30_36.1 [template = bool] @@ -488,39 +488,39 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestLess(%a: D, %b: D) -> bool { +// CHECK:STDOUT: fn @TestLess(%a: %D, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Less[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Less[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestLessEqual(%a: D, %b: D) -> bool { +// CHECK:STDOUT: fn @TestLessEqual(%a: %D, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @LessOrEquivalent[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @LessOrEquivalent[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestGreater(%a: D, %b: D) -> bool { +// CHECK:STDOUT: fn @TestGreater(%a: %D, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Greater[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @Greater[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestGreaterEqual(%a: D, %b: D) -> bool { +// CHECK:STDOUT: fn @TestGreaterEqual(%a: %D, %b: %D) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: D = name_ref a, %a -// CHECK:STDOUT: %b.ref: D = name_ref b, %b +// CHECK:STDOUT: %a.ref: %D = name_ref a, %a +// CHECK:STDOUT: %b.ref: %D = name_ref b, %b // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @GreaterOrEquivalent[%self: Self](%other: Self) -> bool; +// CHECK:STDOUT: fn @GreaterOrEquivalent[%self: %Self](%other: %Self) -> bool; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index 72e648671847..e9a8798d1c08 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @RightShift [template] -// CHECK:STDOUT: %Self.1: RightShift = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @RightShiftAssign [template] -// CHECK:STDOUT: %Self.2: RightShiftAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @RightShift, [template] -// CHECK:STDOUT: %.11: in RightShift> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @RightShift, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @RightShiftAssign, [template] -// CHECK:STDOUT: %.13: in RightShiftAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @RightShiftAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+209, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+211, unloaded -// CHECK:STDOUT: %import_ref.3: in RightShift> = import_ref ir5, inst+231, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+227, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir5, inst+231, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir5, inst+227, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+233, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+235, unloaded -// CHECK:STDOUT: %import_ref.7: in RightShiftAssign> = import_ref ir5, inst+254, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+250, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir5, inst+254, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir5, inst+250, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %RightShiftAssign.ref: type = name_ref RightShiftAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+209, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+227, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir5, inst+233, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir5, inst+250, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as RightShift { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as RightShiftAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 84e34e5f1c8a..1ec704aa3221 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -37,32 +37,32 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Sub [template] -// CHECK:STDOUT: %Self.1: Sub = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %Self.1: %.2 = 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: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %Op.2: = struct_value () [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 {} [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.1 [template] +// CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @SubAssign [template] -// CHECK:STDOUT: %Self.2: SubAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type C [template] +// CHECK:STDOUT: %Self.2: %.6 = bind_symbolic_name Self 0 [symbolic] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %Op.3: = struct_value () [template] -// CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] +// CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] +// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %Op.4: %Op.type.4 = struct_value () [template] // CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] -// CHECK:STDOUT: %TestOp: = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Sub, [template] -// CHECK:STDOUT: %.11: in Sub> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Sub, %Op.type.2 [template] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, file.%import_ref.10 [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %TestAssign: = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @SubAssign, [template] -// CHECK:STDOUT: %.13: in SubAssign> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @SubAssign, %Op.type.4 [template] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+86, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+88, unloaded -// CHECK:STDOUT: %import_ref.3: in Sub> = import_ref ir4, inst+108, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+104, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.10 = import_ref ir4, inst+108, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref ir4, inst+104, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,33 +85,33 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+110, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+112, unloaded -// CHECK:STDOUT: %import_ref.7: in SubAssign> = import_ref ir4, inst+131, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+127, loaded [template = constants.%Op.4] +// CHECK:STDOUT: %import_ref.7: %.12 = import_ref ir4, inst+131, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: %Op.type.4 = import_ref ir4, inst+127, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %SubAssign.ref: type = name_ref SubAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { +// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: C = param a -// CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 +// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: C = param b -// CHECK:STDOUT: @TestOp.%b: C = bind_name b, %b.loc26_17.1 +// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @TestOp.%return: ref C = var +// CHECK:STDOUT: @TestOp.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+86, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+104, unloaded -// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { +// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: C* = param a -// CHECK:STDOUT: @TestAssign.%a: C* = bind_name a, %a.loc30_15.1 +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: C = param b -// CHECK:STDOUT: @TestAssign.%b: C = bind_name b, %b.loc30_22.1 +// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+110, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+127, unloaded @@ -131,16 +131,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = (file.%import_ref.8) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: C as Sub { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { +// CHECK:STDOUT: impl @impl.1: %C as %.2 { +// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: C = param self -// CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 +// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: C = param other -// CHECK:STDOUT: %other.loc18_18.2: C = bind_name other, %other.loc18_18.1 +// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %return.var: ref C = var +// CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: @@ -149,16 +149,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: witness = %.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: C as SubAssign { -// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { +// CHECK:STDOUT: impl @impl.2: %C as %.6 { +// CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // 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.%.7] -// CHECK:STDOUT: %self.loc23_14.1: C* = param self -// CHECK:STDOUT: %self.loc23_14.3: C* = bind_name self, %self.loc23_14.1 -// CHECK:STDOUT: %.loc23_9: C* = addr_pattern %self.loc23_14.3 +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 +// CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: C = param other -// CHECK:STDOUT: %other.loc23_24.2: C = bind_name other, %other.loc23_24.1 +// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: @@ -172,43 +172,43 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { +// CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: %C](@impl.1.%other.loc18_18.2: %C) -> @impl.1.%return.var: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_13.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc19_13.2: init %C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init %C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self; +// CHECK:STDOUT: fn @Op.2[%self: %Self.1](%other: %Self.1) -> %Self.1; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: C*](@impl.2.%other.loc23_24.2: C) { +// CHECK:STDOUT: fn @Op.3[addr @impl.2.%self.loc23_14.3: %.7](@impl.2.%other.loc23_24.2: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4[addr %self: Self*](%other: Self); +// CHECK:STDOUT: fn @Op.4[addr %self: %.8](%other: %Self.2); // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestOp(%a: C, %b: C) -> %return: C { +// CHECK:STDOUT: fn @TestOp(%a: %C, %b: %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: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %a.ref: %C = name_ref a, %a +// CHECK:STDOUT: %b.ref: %C = name_ref b, %b +// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc26: ref C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a: C*, %b: C) { +// CHECK:STDOUT: fn @TestAssign(%a: %.7, %b: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: C* = 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: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %a.ref: %.7 = 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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 -// CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 -// CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // 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 e9b82619bfd2..296d6e83dfec 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -20,9 +20,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,8 +31,8 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 27dc253cf57c..b85951e25942 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -46,7 +46,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -57,13 +57,13 @@ fn Main() { // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_32.loc4, %.loc4_8.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_32.loc5, %.loc5_8.1 [template = i32] @@ -89,10 +89,10 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -103,15 +103,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_32, %.loc4_8.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -150,10 +150,10 @@ fn Main() { // 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: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -167,11 +167,11 @@ fn Main() { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -188,8 +188,8 @@ fn Main() { // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // 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: = name_ref Foo, @C.%Foo.decl [template = constants.%Foo] -// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref() +// 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: 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 faad0127b278..d910d6e8f5a0 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -44,7 +44,7 @@ import library "var"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,7 +53,7 @@ import library "var"; // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(); @@ -63,7 +63,7 @@ import library "var"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,7 +72,7 @@ import library "var"; // CHECK:STDOUT: .Foo = %Foo // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_32, %.loc4_10.1 [template = i32] diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index c1d006d67d21..09a6b14cc8dc 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -76,7 +76,7 @@ var d: i32 = d_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,25 +96,25 @@ var d: i32 = d_ref; // CHECK:STDOUT: %import_ref.3: ref = import_ref ir0, inst+13, loaded // CHECK:STDOUT: %import_ref.4: ref = import_ref ir0, inst+17, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] 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 6516210d1786..9ef9b8c263b2 100644 --- a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon +++ b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon @@ -30,10 +30,10 @@ var a: () = A(); // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc7_9.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var +// 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 @__global_init() { diff --git a/toolchain/check/testdata/packages/loaded_global.carbon b/toolchain/check/testdata/packages/loaded_global.carbon index c1a7bd5ee795..8e548ceb4aa2 100644 --- a/toolchain/check/testdata/packages/loaded_global.carbon +++ b/toolchain/check/testdata/packages/loaded_global.carbon @@ -43,7 +43,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,7 +52,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -62,7 +62,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,28 +72,28 @@ var package_b: () = package.B(); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .package_a = %package_a // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %.loc6_17.1: () = tuple_literal () +// 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 () = var package_a -// CHECK:STDOUT: %package_a: ref () = bind_name package_a, %package_a.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref.loc4: = name_ref A, file.%import_ref [template = constants.%A] -// CHECK:STDOUT: %A.call.loc4: init () = call %A.ref.loc4() +// CHECK:STDOUT: %A.ref.loc4: %A.type = name_ref A, file.%import_ref [template = constants.%A] +// CHECK:STDOUT: %A.call.loc4: init %.1 = 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: = name_ref A, file.%import_ref [template = constants.%A] -// CHECK:STDOUT: %A.call.loc6: init () = call %A.ref.loc6() +// CHECK:STDOUT: %A.ref.loc6: %A.type = name_ref A, file.%import_ref [template = constants.%A] +// CHECK:STDOUT: %A.call.loc6: init %.1 = call %A.ref.loc6() // CHECK:STDOUT: assign file.%package_a.var, %A.call.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -103,7 +103,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -112,7 +112,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B(); @@ -122,7 +122,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -132,28 +132,28 @@ var package_b: () = package.B(); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: .package_b = %package_b // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+2, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref: %B.type = import_ref ir1, inst+2, loaded [template = constants.%B] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () +// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %b.var: ref () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %.loc8_17.1: () = tuple_literal () +// 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 () = var package_b -// CHECK:STDOUT: %package_b: ref () = bind_name package_b, %package_b.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %B.ref.loc6: = name_ref B, file.%import_ref [template = constants.%B] -// CHECK:STDOUT: %B.call.loc6: init () = call %B.ref.loc6() +// CHECK:STDOUT: %B.ref.loc6: %B.type = name_ref B, file.%import_ref [template = constants.%B] +// CHECK:STDOUT: %B.call.loc6: init %.1 = 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: = name_ref B, file.%import_ref [template = constants.%B] -// CHECK:STDOUT: %B.call.loc8: init () = call %B.ref.loc8() +// CHECK:STDOUT: %B.ref.loc8: %B.type = name_ref B, file.%import_ref [template = constants.%B] +// CHECK:STDOUT: %B.call.loc8: init %.1 = 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 d1969b1caf06..2048dfd91ad9 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -206,8 +206,8 @@ alias C = Other.C; // 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, () [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: ()} [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -218,9 +218,9 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: () = tuple_literal () +// 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -232,14 +232,14 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C() { @@ -279,7 +279,7 @@ alias C = Other.C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -303,7 +303,7 @@ alias C = Other.C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -327,7 +327,7 @@ alias C = Other.C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -351,10 +351,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -368,8 +368,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -380,13 +380,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: {.x: ()} = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init () = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init () = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -396,10 +396,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -413,8 +413,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+2, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir3, inst+7, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -425,13 +425,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_26.1: {.x: ()} = struct_literal (%.loc7_25.1) -// CHECK:STDOUT: %.loc7_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_25.2: init () = tuple_init () to %.loc7_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_26.3: init () = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -441,10 +441,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -458,8 +458,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+2, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir3, inst+7, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -470,13 +470,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: {.x: ()} = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init () = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init () = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -486,10 +486,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -503,8 +503,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+8, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -515,13 +515,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: {.x: ()} = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init () = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init () = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -531,10 +531,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -548,8 +548,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+8, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -560,13 +560,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_26.1: {.x: ()} = struct_literal (%.loc7_25.1) -// CHECK:STDOUT: %.loc7_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_25.2: init () = tuple_init () to %.loc7_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_26.3: init () = converted %.loc7_25.1, %.loc7_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -576,10 +576,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -593,8 +593,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+8, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -605,13 +605,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_26.1: {.x: ()} = struct_literal (%.loc6_25.1) -// CHECK:STDOUT: %.loc6_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_25.2: init () = tuple_init () to %.loc6_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_26.3: init () = converted %.loc6_25.1, %.loc6_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -621,10 +621,10 @@ alias C = Other.C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -638,8 +638,8 @@ alias C = Other.C; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+8, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -650,13 +650,13 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_25.1: () = tuple_literal () -// CHECK:STDOUT: %.loc11_26.1: {.x: ()} = struct_literal (%.loc11_25.1) -// CHECK:STDOUT: %.loc11_26.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc11_25.2: init () = tuple_init () to %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_26.3: init () = converted %.loc11_25.1, %.loc11_25.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -684,7 +684,7 @@ alias C = Other.C; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -694,10 +694,10 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} // CHECK:STDOUT: %Other.ref: = name_ref Other, %Other [template = %Other] -// CHECK:STDOUT: %import_ref.1: = import_ref ir2, inst+1, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.1: %C.type = import_ref ir2, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+1, unloaded -// CHECK:STDOUT: %C.ref: = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %C: = bind_alias C, %import_ref.1 [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %import_ref.1 [template = constants.%C] +// CHECK:STDOUT: %C: %C.type = bind_alias C, %import_ref.1 [template = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C(); @@ -707,7 +707,7 @@ alias C = Other.C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { 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 701ba9cebe27..c9e31a2ce1d0 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -223,14 +223,14 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -243,14 +243,14 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -260,22 +260,22 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %.loc4_10.1: () = tuple_literal () +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// 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.loc4_6.1: () = param x -// CHECK:STDOUT: @F.%x: () = bind_name x, %x.loc4_6.1 +// CHECK:STDOUT: %x.loc4_6.1: %.1 = param x +// CHECK:STDOUT: @F.%x: %.1 = bind_name x, %x.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%x: ()) { +// CHECK:STDOUT: fn @F(%x: %.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -285,14 +285,14 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F2.type: type = fn_type @F2 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F2: = struct_value () [template] +// CHECK:STDOUT: %F2: %F2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F2 = %F2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F2.decl: = fn_decl @F2 [template = constants.%F2] {} +// CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [template = constants.%F2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F2() { @@ -305,9 +305,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -315,14 +315,14 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .F = %import_ref // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+1, loaded [template = constants.%F] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -342,11 +342,11 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %F2.type: type = fn_type @F2 [template] -// CHECK:STDOUT: %F2: = struct_value () [template] +// CHECK:STDOUT: %F2: %F2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -355,19 +355,19 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded [template = constants.%F] -// CHECK:STDOUT: %import_ref.2: = import_ref ir2, inst+1, loaded [template = constants.%F2] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.1: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2: %F2.type = import_ref ir2, inst+1, loaded [template = constants.%F2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref.loc8: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.1 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: %Other.ref.loc9: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F2.ref: = name_ref F2, file.%import_ref.2 [template = constants.%F2] -// CHECK:STDOUT: %F2.call: init () = call %F2.ref() +// CHECK:STDOUT: %F2.ref: %F2.type = name_ref F2, file.%import_ref.2 [template = constants.%F2] +// CHECK:STDOUT: %F2.call: init %.1 = call %F2.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -380,9 +380,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -391,16 +391,16 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.1: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+1, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.1 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -420,9 +420,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -431,16 +431,16 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.1: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+6, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref.1 [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -451,7 +451,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -460,8 +460,8 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded // CHECK:STDOUT: %Other: = namespace %import_ref.1, [template] {} -// CHECK:STDOUT: %import_ref.2: = import_ref ir2, inst+1, loaded [template = constants.%F] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.2: %F.type = import_ref ir2, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -474,7 +474,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -485,7 +485,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %.loc13: = namespace [template] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -498,7 +498,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -511,7 +511,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: %Nested: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -524,7 +524,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -534,7 +534,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: %Other: = namespace [template] { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -547,7 +547,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: constants { // CHECK:STDOUT: %UseF.type: type = fn_type @UseF [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %UseF: = struct_value () [template] +// CHECK:STDOUT: %UseF: %UseF.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -556,7 +556,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .UseF = %UseF.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %UseF.decl: = fn_decl @UseF [template = constants.%UseF] {} +// CHECK:STDOUT: %UseF.decl: %UseF.type = fn_decl @UseF [template = constants.%UseF] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UseF() { diff --git a/toolchain/check/testdata/packages/no_prelude/export_import.carbon b/toolchain/check/testdata/packages/no_prelude/export_import.carbon index 4d7bae4b18a4..9b4ca14fdb1a 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_import.carbon @@ -171,8 +171,8 @@ var indirect_c: C = {.x = ()}; // 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, () [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: ()} [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,9 +183,9 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: () = tuple_literal () +// 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -248,10 +248,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -263,8 +263,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -275,13 +275,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -291,10 +291,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -306,8 +306,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -318,13 +318,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc11_20.1: {.x: ()} = struct_literal (%.loc11_19.1) -// CHECK:STDOUT: %.loc11_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc11_19.2: init () = tuple_init () to %.loc11_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_20.3: init () = converted %.loc11_19.1, %.loc11_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -334,10 +334,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -349,8 +349,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -361,13 +361,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc4_20.1: {.x: ()} = struct_literal (%.loc4_19.1) -// CHECK:STDOUT: %.loc4_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc4_19.2: init () = tuple_init () to %.loc4_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_20.3: init () = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -377,10 +377,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -392,8 +392,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir3, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -404,13 +404,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -420,10 +420,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -435,8 +435,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -447,13 +447,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -463,10 +463,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -478,8 +478,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -490,13 +490,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -506,10 +506,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -521,8 +521,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -533,13 +533,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -549,10 +549,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -564,8 +564,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -576,13 +576,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -592,10 +592,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -607,8 +607,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir3, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -619,13 +619,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -645,10 +645,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -660,8 +660,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -672,13 +672,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -688,10 +688,10 @@ var indirect_c: C = {.x = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -705,8 +705,8 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+7, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %indirect_c.var: ref C = var indirect_c -// CHECK:STDOUT: %indirect_c: ref C = bind_name indirect_c, %indirect_c.var +// CHECK:STDOUT: %indirect_c.var: ref %C = var indirect_c +// CHECK:STDOUT: %indirect_c: ref %C = bind_name indirect_c, %indirect_c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -717,13 +717,13 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_28.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_29.1: {.x: ()} = struct_literal (%.loc6_28.1) -// CHECK:STDOUT: %.loc6_29.2: ref () = class_element_access file.%indirect_c.var, element0 -// CHECK:STDOUT: %.loc6_28.2: init () = tuple_init () to %.loc6_29.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.3: init () = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon index a8aec43c0d5c..9aaa3a7221df 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon @@ -118,11 +118,11 @@ var d: D = {.y = ()}; // 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, () [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: ()} [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = unbound_element_type D, () [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: ()} [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %D, %.1 [template] +// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,9 +135,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: () = tuple_literal () +// 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -145,9 +145,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc9_11.1: () = tuple_literal () +// 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: = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc9_8: %.4 = field_decl y, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -170,7 +170,7 @@ var d: D = {.y = ()}; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -196,7 +196,7 @@ var d: D = {.y = ()}; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -231,10 +231,10 @@ var d: D = {.y = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -246,8 +246,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+10, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -258,13 +258,13 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -274,10 +274,10 @@ var d: D = {.y = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -289,8 +289,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+10, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -301,13 +301,13 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -317,10 +317,10 @@ var d: D = {.y = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -332,8 +332,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+10, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -344,13 +344,13 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -359,7 +359,7 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.y: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.y: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -375,8 +375,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_19: () = tuple_literal () -// CHECK:STDOUT: %.loc10_20: {.y: ()} = struct_literal (%.loc10_19) +// CHECK:STDOUT: %.loc10_19: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc10_20: %.2 = struct_literal (%.loc10_19) // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -386,10 +386,10 @@ var d: D = {.y = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -401,8 +401,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+10, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -413,13 +413,13 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -429,14 +429,14 @@ var d: D = {.y = ()}; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: ()} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.y: ()} [template] -// CHECK:STDOUT: %struct.2: D = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %D = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -451,13 +451,13 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+10, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %import_ref.5 = import_ref ir5, inst+12, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+16, unloaded // CHECK:STDOUT: %D.ref: type = name_ref D, %import_ref.2 [template = constants.%D] -// CHECK:STDOUT: %d.var: ref D = var d -// CHECK:STDOUT: %d: ref D = bind_name d, %d.var +// CHECK:STDOUT: %d.var: ref %D = var d +// CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -474,21 +474,21 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc8_20.1: {.x: ()} = struct_literal (%.loc8_19.1) -// CHECK:STDOUT: %.loc8_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc8_19.2: init () = tuple_init () to %.loc8_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_20.3: init () = converted %.loc8_19.1, %.loc8_19.2 [template = constants.%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: %.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_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: () = tuple_literal () -// CHECK:STDOUT: %.loc9_20.1: {.y: ()} = struct_literal (%.loc9_19.1) -// CHECK:STDOUT: %.loc9_20.2: ref () = class_element_access file.%d.var, element0 -// CHECK:STDOUT: %.loc9_19.2: init () = tuple_init () to %.loc9_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc9_20.3: init () = converted %.loc9_19.1, %.loc9_19.2 [template = constants.%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: %.loc9_19.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc9_20.1: %.4 = 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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/export_name.carbon b/toolchain/check/testdata/packages/no_prelude/export_name.carbon index d316fd802e62..ecd9576e9d88 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_name.carbon @@ -209,11 +209,11 @@ private export C; // 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, () [template] -// CHECK:STDOUT: %.3: type = struct_type {.x: ()} [template] +// CHECK:STDOUT: %.2: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.3: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = unbound_element_type NSC, () [template] -// CHECK:STDOUT: %.5: type = struct_type {.y: ()} [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %NSC, %.1 [template] +// CHECK:STDOUT: %.5: type = struct_type {.y: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -229,9 +229,9 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: () = tuple_literal () +// 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: = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.2 = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -239,9 +239,9 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NSC { -// CHECK:STDOUT: %.loc10_11.1: () = tuple_literal () +// 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: = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc10_8: %.4 = field_decl y, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NSC @@ -253,9 +253,9 @@ private export C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.3: type = struct_type {.y: ()} [template] +// CHECK:STDOUT: %.3: type = struct_type {.y: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -309,9 +309,9 @@ private export C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.3: type = struct_type {.y: ()} [template] +// CHECK:STDOUT: %.3: type = struct_type {.y: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -356,14 +356,14 @@ private export C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: ()} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.y: ()} [template] -// CHECK:STDOUT: %struct.2: NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -382,14 +382,14 @@ private export C; // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+12, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+11, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+20, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+19, unloaded // CHECK:STDOUT: %NSC.ref: type = name_ref NSC, %import_ref.3 [template = constants.%NSC] -// CHECK:STDOUT: %nsc.var: ref NSC = var nsc -// CHECK:STDOUT: %nsc: ref NSC = bind_name nsc, %nsc.var +// CHECK:STDOUT: %nsc.var: ref %NSC = var nsc +// CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -406,21 +406,21 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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: () = tuple_literal () -// CHECK:STDOUT: %.loc7_27.1: {.y: ()} = struct_literal (%.loc7_26.1) -// CHECK:STDOUT: %.loc7_27.2: ref () = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc7_26.2: init () = tuple_init () to %.loc7_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_27.3: init () = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%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: %.loc7_26.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc7_27.1: %.4 = 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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -430,14 +430,14 @@ private export C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: ()} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.y: ()} [template] -// CHECK:STDOUT: %struct.2: NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -456,14 +456,14 @@ private export C; // CHECK:STDOUT: %import_ref.4 = import_ref ir0, inst+11, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir0, inst+12, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %import_ref.6 = import_ref ir0, inst+19, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir0, inst+20, unloaded // CHECK:STDOUT: %NSC.ref: type = name_ref NSC, %import_ref.3 [template = constants.%NSC] -// CHECK:STDOUT: %nsc.var: ref NSC = var nsc -// CHECK:STDOUT: %nsc: ref NSC = bind_name nsc, %nsc.var +// CHECK:STDOUT: %nsc.var: ref %NSC = var nsc +// CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -480,21 +480,21 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc4_20.1: {.x: ()} = struct_literal (%.loc4_19.1) -// CHECK:STDOUT: %.loc4_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc4_19.2: init () = tuple_init () to %.loc4_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_20.3: init () = converted %.loc4_19.1, %.loc4_19.2 [template = constants.%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: %.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_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: () = tuple_literal () -// CHECK:STDOUT: %.loc5_27.1: {.y: ()} = struct_literal (%.loc5_26.1) -// CHECK:STDOUT: %.loc5_27.2: ref () = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc5_26.2: init () = tuple_init () to %.loc5_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc5_27.3: init () = converted %.loc5_26.1, %.loc5_26.2 [template = constants.%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: %.loc5_26.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc5_27.1: %.4 = 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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -504,14 +504,14 @@ private export C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: ()} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.y: ()} [template] -// CHECK:STDOUT: %struct.2: NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -530,14 +530,14 @@ private export C; // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+11, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+12, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+19, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+20, unloaded // CHECK:STDOUT: %NSC.ref: type = name_ref NSC, %import_ref.3 [template = constants.%NSC] -// CHECK:STDOUT: %nsc.var: ref NSC = var nsc -// CHECK:STDOUT: %nsc: ref NSC = bind_name nsc, %nsc.var +// CHECK:STDOUT: %nsc.var: ref %NSC = var nsc +// CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -554,21 +554,21 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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: () = tuple_literal () -// CHECK:STDOUT: %.loc7_27.1: {.y: ()} = struct_literal (%.loc7_26.1) -// CHECK:STDOUT: %.loc7_27.2: ref () = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc7_26.2: init () = tuple_init () to %.loc7_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_27.3: init () = converted %.loc7_26.1, %.loc7_26.2 [template = constants.%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: %.loc7_26.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc7_27.1: %.4 = 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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -612,7 +612,7 @@ private export C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -641,14 +641,14 @@ private export C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: ()} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.y: ()} [template] -// CHECK:STDOUT: %struct.2: NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -667,14 +667,14 @@ private export C; // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+7, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+13, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+17, unloaded // CHECK:STDOUT: %NSC.ref: type = name_ref NSC, %import_ref.3 [template = constants.%NSC] -// CHECK:STDOUT: %nsc.var: ref NSC = var nsc -// CHECK:STDOUT: %nsc: ref NSC = bind_name nsc, %nsc.var +// CHECK:STDOUT: %nsc.var: ref %NSC = var nsc +// CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -691,21 +691,21 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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: () = tuple_literal () -// CHECK:STDOUT: %.loc8_27.1: {.y: ()} = struct_literal (%.loc8_26.1) -// CHECK:STDOUT: %.loc8_27.2: ref () = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc8_26.2: init () = tuple_init () to %.loc8_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_27.3: init () = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%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: %.loc8_26.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc8_27.1: %.4 = 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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -715,14 +715,14 @@ private export C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct.1: %C = struct_value (%tuple) [template] // CHECK:STDOUT: %NSC: type = class_type @NSC [template] -// CHECK:STDOUT: %.4: type = struct_type {.y: ()} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.y: ()} [template] -// CHECK:STDOUT: %struct.2: NSC = struct_value (%tuple) [template] +// CHECK:STDOUT: %.4: type = struct_type {.y: %.1} [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] +// CHECK:STDOUT: %struct.2: %NSC = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -741,14 +741,14 @@ private export C; // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+12, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+11, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+20, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+19, unloaded // CHECK:STDOUT: %NSC.ref: type = name_ref NSC, %import_ref.3 [template = constants.%NSC] -// CHECK:STDOUT: %nsc.var: ref NSC = var nsc -// CHECK:STDOUT: %nsc: ref NSC = bind_name nsc, %nsc.var +// CHECK:STDOUT: %nsc.var: ref %NSC = var nsc +// CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -765,21 +765,21 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc7_20.1: {.x: ()} = struct_literal (%.loc7_19.1) -// CHECK:STDOUT: %.loc7_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc7_19.2: init () = tuple_init () to %.loc7_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc7_20.3: init () = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%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: %.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_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: () = tuple_literal () -// CHECK:STDOUT: %.loc8_27.1: {.y: ()} = struct_literal (%.loc8_26.1) -// CHECK:STDOUT: %.loc8_27.2: ref () = class_element_access file.%nsc.var, element0 -// CHECK:STDOUT: %.loc8_26.2: init () = tuple_init () to %.loc8_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc8_27.3: init () = converted %.loc8_26.1, %.loc8_26.2 [template = constants.%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: %.loc8_26.1: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc8_27.1: %.4 = 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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -802,7 +802,7 @@ private export C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -832,10 +832,10 @@ private export C; // 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: ()} [template] -// CHECK:STDOUT: %.3: type = ptr_type {.x: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] +// CHECK:STDOUT: %struct: %C = struct_value (%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -847,8 +847,8 @@ private export C; // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+12, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+11, unloaded // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %c.var: ref C = var c -// CHECK:STDOUT: %c: ref C = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref %C = var c +// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -859,13 +859,13 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_19.1: () = tuple_literal () -// CHECK:STDOUT: %.loc6_20.1: {.x: ()} = struct_literal (%.loc6_19.1) -// CHECK:STDOUT: %.loc6_20.2: ref () = class_element_access file.%c.var, element0 -// CHECK:STDOUT: %.loc6_19.2: init () = tuple_init () to %.loc6_20.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_20.3: init () = converted %.loc6_19.1, %.loc6_19.2 [template = constants.%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: %.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_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 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -875,7 +875,7 @@ private export C; // 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: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.x: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { 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 7bd75872e845..9eacf71b112e 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 @@ -41,8 +41,8 @@ export C.n; // 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, {} [template] -// CHECK:STDOUT: %.4: type = struct_type {.n: {}} [template] +// CHECK:STDOUT: %.3: type = unbound_element_type %C, %.1 [template] +// CHECK:STDOUT: %.4: type = struct_type {.n: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,9 +53,9 @@ export C.n; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: {} = struct_literal () +// 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: = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc5_8: %.3 = field_decl n, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -67,7 +67,7 @@ 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 = struct_type {.n: {}} [template] +// CHECK:STDOUT: %.2: type = struct_type {.n: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { 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 95c197804f97..f0780ebf0d2d 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,10 +34,10 @@ export C2(T:! type); // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C1.1: = struct_value () [template] +// CHECK:STDOUT: %C1.1: %C1.type = struct_value () [template] // CHECK:STDOUT: %C1.2: type = class_type @C1 [template] // CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [template] -// CHECK:STDOUT: %C2.1: = struct_value () [template] +// CHECK:STDOUT: %C2.1: %C2.type = struct_value () [template] // CHECK:STDOUT: %C2.2: type = class_type @C2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,11 +46,11 @@ export C2(T:! type); // CHECK:STDOUT: .C1 = %C1.decl // CHECK:STDOUT: .C2 = %C2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C1.decl: = class_decl @C1 [template = constants.%C1.1] { +// CHECK:STDOUT: %C1.decl: %C1.type = class_decl @C1 [template = constants.%C1.1] { // CHECK:STDOUT: %T.loc4_10.1: type = param T // CHECK:STDOUT: %T.loc4_10.2: type = bind_symbolic_name T 0, %T.loc4_10.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %C2.decl: = class_decl @C2 [template = constants.%C2.1] { +// CHECK:STDOUT: %C2.decl: %C2.type = class_decl @C2 [template = constants.%C2.1] { // CHECK:STDOUT: %T.loc5_10.1: type = param T // CHECK:STDOUT: %T.loc5_10.2: type = bind_symbolic_name T 0, %T.loc5_10.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -65,10 +65,10 @@ export C2(T:! type); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %C1: = struct_value () [template] +// CHECK:STDOUT: %C1: %C1.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, [symbolic] // CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [template] -// CHECK:STDOUT: %C2: = struct_value () [template] +// CHECK:STDOUT: %C2: %C2.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,12 +76,12 @@ export C2(T:! type); // CHECK:STDOUT: .C1 = %C1 // CHECK:STDOUT: .C2 = %C2 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+4, loaded [template = constants.%C1] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+11, loaded [template = constants.%C2] -// CHECK:STDOUT: %C1: = export C1, %import_ref.1 [template = constants.%C1] +// CHECK:STDOUT: %import_ref.1: %C1.type = import_ref ir1, inst+4, loaded [template = constants.%C1] +// CHECK:STDOUT: %import_ref.2: %C2.type = import_ref ir1, inst+11, loaded [template = constants.%C2] +// CHECK:STDOUT: %C1: %C1.type = export C1, %import_ref.1 [template = constants.%C1] // CHECK:STDOUT: %T.loc11_11.1: type = param T // CHECK:STDOUT: %T.loc11_11.2: type = bind_symbolic_name T 0, %T.loc11_11.1 [symbolic = constants.%T] -// CHECK:STDOUT: %C2: = export C2, %import_ref.2 [template = constants.%C2] +// CHECK:STDOUT: %C2: %C2.type = export C2, %import_ref.2 [template = constants.%C2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C1; diff --git a/toolchain/check/testdata/packages/unused_lazy_import.carbon b/toolchain/check/testdata/packages/unused_lazy_import.carbon index a0fc9bb6d0b1..9f82df0a047d 100644 --- a/toolchain/check/testdata/packages/unused_lazy_import.carbon +++ b/toolchain/check/testdata/packages/unused_lazy_import.carbon @@ -23,7 +23,7 @@ impl package Implicit; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,7 +32,7 @@ impl package Implicit; // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index d0a702e068ee..06b05d1d1be1 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -18,9 +18,9 @@ fn F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } @@ -31,14 +31,14 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -53,9 +53,9 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_16: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: assign %n.var, %.loc12_16 // CHECK:STDOUT: %n.ref: ref i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_13: i32* = addr_of %n.ref +// CHECK:STDOUT: %.loc13_13: %.3 = addr_of %n.ref // CHECK:STDOUT: %.loc13_12: ref i32 = deref %.loc13_13 -// CHECK:STDOUT: %.loc13_11: i32* = addr_of %.loc13_12 +// CHECK:STDOUT: %.loc13_11: %.3 = 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 658200b11217..6cd4fbc900eb 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -25,19 +25,19 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.4, %.5) [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 (i32, i32) [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.4, %.5) [template] +// CHECK:STDOUT: %.9: type = ptr_type %.8 [template] +// CHECK:STDOUT: %tuple: %.8 = tuple_value (%.4, %.5) [template] // CHECK:STDOUT: %.10: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -47,17 +47,17 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -69,17 +69,17 @@ fn F() { // 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 {.a: i32, .b: i32} = var s -// CHECK:STDOUT: %s: ref {.a: i32, .b: i32} = bind_name s, %s.var +// CHECK:STDOUT: %s.var: ref %.2 = var s +// CHECK:STDOUT: %s: ref %.2 = bind_name s, %s.var // CHECK:STDOUT: %.loc12_37: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc12_45: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_46.1: {.a: i32, .b: i32} = struct_literal (%.loc12_37, %.loc12_45) +// CHECK:STDOUT: %.loc12_46.1: %.2 = 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.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 {.a: i32, .b: i32} = struct_init (%.loc12_46.3, %.loc12_46.5) to %s.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_47: init {.a: i32, .b: i32} = converted %.loc12_46.1, %.loc12_46.6 [template = constants.%struct] +// 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: 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] @@ -88,73 +88,73 @@ fn F() { // 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 {.a: i32, .b: i32} [template = constants.%.3] -// CHECK:STDOUT: %p.var: ref {.a: i32, .b: i32}* = var p -// CHECK:STDOUT: %p: ref {.a: i32, .b: i32}* = bind_name p, %p.var -// CHECK:STDOUT: %s.ref.loc14: ref {.a: i32, .b: i32} = name_ref s, %s -// CHECK:STDOUT: %.loc14_32: {.a: i32, .b: i32}* = addr_of %s.ref.loc14 +// 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: 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 i32* = var q -// CHECK:STDOUT: %q: ref i32* = bind_name q, %q.var -// CHECK:STDOUT: %s.ref.loc15: ref {.a: i32, .b: i32} = name_ref s, %s +// 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_19: ref i32 = struct_access %s.ref.loc15, element0 -// CHECK:STDOUT: %.loc15_17: i32* = addr_of %.loc15_19 +// CHECK:STDOUT: %.loc15_17: %.6 = 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 i32* = var r -// CHECK:STDOUT: %r: ref i32* = bind_name r, %r.var -// CHECK:STDOUT: %s.ref.loc16: ref {.a: i32, .b: i32} = name_ref s, %s +// 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_19: ref i32 = struct_access %s.ref.loc16, element1 -// CHECK:STDOUT: %.loc16_17: i32* = addr_of %.loc16_19 +// CHECK:STDOUT: %.loc16_17: %.6 = 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: (type, type) = tuple_literal (%int.make_type_32.loc18_11, %int.make_type_32.loc18_16) +// CHECK:STDOUT: %.loc18_19.1: %.7 = 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 (i32, i32) = var t -// CHECK:STDOUT: %t: ref (i32, i32) = bind_name t, %t.var +// CHECK:STDOUT: %t.var: ref %.8 = var t +// CHECK:STDOUT: %t: ref %.8 = bind_name t, %t.var // CHECK:STDOUT: %.loc18_24: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc18_27: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_28.1: (i32, i32) = tuple_literal (%.loc18_24, %.loc18_27) +// CHECK:STDOUT: %.loc18_28.1: %.8 = 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.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 (i32, i32) = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc18_29: init (i32, i32) = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple] +// 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: 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 i32* = var t0 -// CHECK:STDOUT: %t0: ref i32* = bind_name t0, %t0.var -// CHECK:STDOUT: %t.ref.loc19: ref (i32, i32) = name_ref t, %t +// 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_literal 0 [template = constants.%.10] // CHECK:STDOUT: %.loc19_22: ref i32 = tuple_index %t.ref.loc19, %.loc19_21 -// CHECK:STDOUT: %.loc19_18: i32* = addr_of %.loc19_22 +// CHECK:STDOUT: %.loc19_18: %.6 = addr_of %.loc19_22 // 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 i32* = var t1 -// CHECK:STDOUT: %t1: ref i32* = bind_name t1, %t1.var -// CHECK:STDOUT: %t.ref.loc20: ref (i32, i32) = name_ref t, %t +// 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_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc20_22: ref i32 = tuple_index %t.ref.loc20, %.loc20_21 -// CHECK:STDOUT: %.loc20_18: i32* = addr_of %.loc20_22 +// CHECK:STDOUT: %.loc20_18: %.6 = addr_of %.loc20_22 // 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 b5391bd2aa2a..037d70a8bd9c 100644 --- a/toolchain/check/testdata/pointer/arrow.carbon +++ b/toolchain/check/testdata/pointer/arrow.carbon @@ -29,13 +29,13 @@ fn Foo(ptr: C*) { // 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: %Member: = struct_value () [template] -// CHECK:STDOUT: %.2: type = ptr_type C [template] -// CHECK:STDOUT: %.3: type = unbound_element_type C, C* [template] -// CHECK:STDOUT: %.4: type = struct_type {.field: C*} [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: %Foo.type: type = fn_type @Foo [template] -// CHECK:STDOUT: %Foo: = struct_value () [template] -// CHECK:STDOUT: %.5: type = ptr_type {.field: C*} [template] +// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] +// CHECK:STDOUT: %.5: type = ptr_type %.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,23 +46,23 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc16: type = ptr_type C [template = constants.%.2] -// CHECK:STDOUT: %ptr.loc16_8.1: C* = param ptr -// CHECK:STDOUT: @Foo.%ptr: C* = bind_name ptr, %ptr.loc16_8.1 +// CHECK:STDOUT: %.loc16: type = ptr_type %C [template = constants.%.2] +// CHECK:STDOUT: %ptr.loc16_8.1: %.2 = param ptr +// CHECK:STDOUT: @Foo.%ptr: %.2 = bind_name ptr, %ptr.loc16_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %Member.decl: = fn_decl @Member [template = constants.%Member] { +// CHECK:STDOUT: %Member.decl: %Member.type = fn_decl @Member [template = constants.%Member] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc12_13.1: C = param self -// CHECK:STDOUT: %self.loc12_13.2: C = bind_name self, %self.loc12_13.1 +// CHECK:STDOUT: %self.loc12_13.1: %C = param self +// CHECK:STDOUT: %self.loc12_13.2: %C = bind_name self, %self.loc12_13.1 // 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: = field_decl field, element0 [template] +// CHECK:STDOUT: %.loc13_15: type = ptr_type %C [template = constants.%.2] +// CHECK:STDOUT: %.loc13_12: %.3 = field_decl field, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -70,38 +70,38 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: .field = %.loc13_12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Member[@C.%self.loc12_13.2: C](); +// CHECK:STDOUT: fn @Member[@C.%self.loc12_13.2: %C](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Foo(%ptr: C*) { +// CHECK:STDOUT: fn @Foo(%ptr: %.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ptr.ref.loc17: C* = name_ref ptr, %ptr -// CHECK:STDOUT: %.loc17_4.1: ref C = deref %ptr.ref.loc17 -// CHECK:STDOUT: %Member.ref.loc17: = name_ref Member, @C.%Member.decl [template = constants.%Member] +// CHECK:STDOUT: %ptr.ref.loc17: %.2 = 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 () = call %.loc17_9(%.loc17_4.2) -// CHECK:STDOUT: %ptr.ref.loc18: C* = name_ref ptr, %ptr -// CHECK:STDOUT: %.loc18_6.1: ref C = deref %ptr.ref.loc18 -// CHECK:STDOUT: %Member.ref.loc18: = name_ref Member, @C.%Member.decl [template = constants.%Member] +// 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: %.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 () = call %.loc18_6.2(%.loc18_6.3) -// CHECK:STDOUT: %ptr.ref.loc20: C* = name_ref ptr, %ptr -// CHECK:STDOUT: %.loc20_4: ref C = deref %ptr.ref.loc20 -// CHECK:STDOUT: %field.ref.loc20: = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc20_9: ref C* = class_element_access %.loc20_4, element0 -// CHECK:STDOUT: %ptr.ref.loc21: C* = name_ref ptr, %ptr -// CHECK:STDOUT: %.loc21_6.1: ref C = deref %ptr.ref.loc21 -// CHECK:STDOUT: %field.ref.loc21: = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc21_6.2: ref C* = class_element_access %.loc21_6.1, element0 -// CHECK:STDOUT: %ptr.ref.loc23: C* = name_ref ptr, %ptr -// CHECK:STDOUT: %.loc23_6.1: ref C = deref %ptr.ref.loc23 -// CHECK:STDOUT: %field.ref.loc23_6: = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc23_6.2: ref C* = class_element_access %.loc23_6.1, element0 -// CHECK:STDOUT: %.loc23_6.3: C* = bind_value %.loc23_6.2 -// CHECK:STDOUT: %.loc23_13.1: ref C = deref %.loc23_6.3 -// CHECK:STDOUT: %field.ref.loc23_13: = name_ref field, @C.%.loc13_12 [template = @C.%.loc13_12] -// CHECK:STDOUT: %.loc23_13.2: ref C* = class_element_access %.loc23_13.1, element0 +// 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: %.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: %.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: %.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: %.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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 39c7692b057b..66cce112ed4c 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -20,9 +20,9 @@ fn F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } @@ -33,15 +33,15 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -59,13 +59,13 @@ fn F() -> 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 i32* = var p -// CHECK:STDOUT: %p: ref i32* = bind_name p, %p.var +// CHECK:STDOUT: %p.var: ref %.3 = var p +// CHECK:STDOUT: %p: ref %.3 = bind_name p, %p.var // CHECK:STDOUT: %n.ref: ref i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_17: i32* = addr_of %n.ref +// CHECK:STDOUT: %.loc13_17: %.3 = addr_of %n.ref // CHECK:STDOUT: assign %p.var, %.loc13_17 -// CHECK:STDOUT: %p.ref: ref i32* = name_ref p, %p -// CHECK:STDOUT: %.loc15_11: i32* = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref %.3 = name_ref p, %p +// CHECK:STDOUT: %.loc15_11: %.3 = 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 bf055b67e521..b8d379354aa1 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_error.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_error.carbon @@ -29,7 +29,7 @@ fn Test() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Test: = struct_value () [template] +// CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,7 +38,7 @@ fn Test() { // CHECK:STDOUT: .Test = %Test.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] {} +// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Test() { diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 0eeccb86b9fa..495451b20619 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -104,14 +104,14 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %AddressOfLiteral.type: type = fn_type @AddressOfLiteral [template] -// CHECK:STDOUT: %AddressOfLiteral: = struct_value () [template] +// CHECK:STDOUT: %AddressOfLiteral: %AddressOfLiteral.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: type = ptr_type i32 [template] // CHECK:STDOUT: %.5: bool = bool_literal true [template] @@ -123,24 +123,24 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %.11: i32 = int_literal 1 [template] // CHECK:STDOUT: %.12: i32 = int_literal 2 [template] // CHECK:STDOUT: %.13: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %.14: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %.14: type = ptr_type %.13 [template] // CHECK:STDOUT: %.15: i32 = int_literal 5 [template] -// CHECK:STDOUT: %.16: type = ptr_type {.a: i32} [template] +// CHECK:STDOUT: %.16: type = ptr_type %.2 [template] // CHECK:STDOUT: %AddressOfOperator.type: type = fn_type @AddressOfOperator [template] -// CHECK:STDOUT: %AddressOfOperator: = struct_value () [template] +// CHECK:STDOUT: %AddressOfOperator: %AddressOfOperator.type = struct_value () [template] // CHECK:STDOUT: %.17: bool = bool_literal false [template] // CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [template] -// CHECK:STDOUT: %AddressOfCall: = struct_value () [template] +// CHECK:STDOUT: %AddressOfCall: %AddressOfCall.type = struct_value () [template] // CHECK:STDOUT: %AddressOfType.type: type = fn_type @AddressOfType [template] -// CHECK:STDOUT: %AddressOfType: = struct_value () [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 const i32 [template] +// CHECK:STDOUT: %.20: type = ptr_type %.19 [template] // CHECK:STDOUT: %AddressOfTupleElementValue.type: type = fn_type @AddressOfTupleElementValue [template] -// CHECK:STDOUT: %AddressOfTupleElementValue: = struct_value () [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.11, %.12) [template] +// CHECK:STDOUT: %AddressOfTupleElementValue: %AddressOfTupleElementValue.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.13 = tuple_value (%.11, %.12) [template] // CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [template] -// CHECK:STDOUT: %AddressOfParam: = struct_value () [template] +// CHECK:STDOUT: %AddressOfParam: %AddressOfParam.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -156,62 +156,62 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: .AddressOfParam = %AddressOfParam.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_16.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_16.2: type = converted %int.make_type_32.loc13, %.loc13_16.1 [template = i32] // CHECK:STDOUT: %.loc13_19: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: @H.%return: ref {.a: i32} = var +// CHECK:STDOUT: @H.%return: ref %.2 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %AddressOfLiteral.decl: = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} -// CHECK:STDOUT: %AddressOfOperator.decl: = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} -// CHECK:STDOUT: %AddressOfCall.decl: = fn_decl @AddressOfCall [template = constants.%AddressOfCall] {} -// CHECK:STDOUT: %AddressOfType.decl: = fn_decl @AddressOfType [template = constants.%AddressOfType] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AddressOfTupleElementValue.decl: = fn_decl @AddressOfTupleElementValue [template = constants.%AddressOfTupleElementValue] {} -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %AddressOfParam.decl: = fn_decl @AddressOfParam [template = constants.%AddressOfParam] { +// CHECK:STDOUT: %AddressOfLiteral.decl: %AddressOfLiteral.type = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} +// CHECK:STDOUT: %AddressOfOperator.decl: %AddressOfOperator.type = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} +// CHECK:STDOUT: %AddressOfCall.decl: %AddressOfCall.type = fn_decl @AddressOfCall [template = constants.%AddressOfCall] {} +// CHECK:STDOUT: %AddressOfType.decl: %AddressOfType.type = fn_decl @AddressOfType [template = constants.%AddressOfType] {} +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AddressOfTupleElementValue.decl: %AddressOfTupleElementValue.type = fn_decl @AddressOfTupleElementValue [template = constants.%AddressOfTupleElementValue] {} +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AddressOfParam.decl: %AddressOfParam.type = fn_decl @AddressOfParam [template = constants.%AddressOfParam] { // CHECK:STDOUT: %int.make_type_32.loc95: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc95_26.1: type = value_of_initializer %int.make_type_32.loc95 [template = i32] // CHECK:STDOUT: %.loc95_26.2: type = converted %int.make_type_32.loc95, %.loc95_26.1 [template = i32] // CHECK:STDOUT: %param.loc95_19.1: i32 = param param // CHECK:STDOUT: @AddressOfParam.%param: i32 = bind_name param, %param.loc95_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @H() -> {.a: i32}; +// CHECK:STDOUT: fn @H() -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfLiteral() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc20_4: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_3: i32* = addr_of [template = ] +// CHECK:STDOUT: %.loc20_3: %.4 = addr_of [template = ] // CHECK:STDOUT: %.loc25_4: bool = bool_literal true [template = constants.%.5] -// CHECK:STDOUT: %.loc25_3: bool* = addr_of [template = ] +// CHECK:STDOUT: %.loc25_3: %.6 = addr_of [template = ] // CHECK:STDOUT: %.loc30_4: f64 = float_literal 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc30_3: f64* = addr_of [template = ] +// CHECK:STDOUT: %.loc30_3: %.8 = addr_of [template = ] // CHECK:STDOUT: %.loc35_4: String = string_literal "Hello" [template = constants.%.10] -// CHECK:STDOUT: %.loc35_3: String* = addr_of [template = ] +// CHECK:STDOUT: %.loc35_3: %.9 = addr_of [template = ] // CHECK:STDOUT: %.loc40_5: i32 = int_literal 1 [template = constants.%.11] // CHECK:STDOUT: %.loc40_8: i32 = int_literal 2 [template = constants.%.12] -// CHECK:STDOUT: %.loc40_9: (i32, i32) = tuple_literal (%.loc40_5, %.loc40_8) -// CHECK:STDOUT: %.loc40_3: (i32, i32)* = addr_of [template = ] +// 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_literal 5 [template = constants.%.15] -// CHECK:STDOUT: %.loc45_11: {.a: i32} = struct_literal (%.loc45_10) -// CHECK:STDOUT: %.loc45_3: {.a: i32}* = addr_of [template = ] +// CHECK:STDOUT: %.loc45_11: %.2 = struct_literal (%.loc45_10) +// CHECK:STDOUT: %.loc45_3: %.16 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -227,37 +227,37 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: !and.result: // CHECK:STDOUT: %.loc53_10.2: bool = block_arg !and.result [template = constants.%.17] -// CHECK:STDOUT: %.loc53_3: bool* = addr_of [template = ] -// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init {.a: i32} = call %H.ref() -// CHECK:STDOUT: %.loc58_5.1: ref {.a: i32} = temporary_storage -// CHECK:STDOUT: %.loc58_5.2: ref {.a: i32} = temporary %.loc58_5.1, %H.call +// CHECK:STDOUT: %.loc53_3: %.6 = 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: %.loc58_7: ref i32 = struct_access %.loc58_5.2, element0 -// CHECK:STDOUT: %.loc58_3: i32* = addr_of [template = ] +// 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: bool* = addr_of [template = ] +// CHECK:STDOUT: %.loc63_3: %.6 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfCall() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init i32 = call %G.ref() -// CHECK:STDOUT: %.loc71: i32* = addr_of [template = ] +// CHECK:STDOUT: %.loc71: %.4 = 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: type* = addr_of [template = ] +// CHECK:STDOUT: %.loc79: %.18 = 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 const i32 [template = constants.%.20] -// CHECK:STDOUT: %.loc84_3: type* = addr_of [template = ] +// CHECK:STDOUT: %.loc84_14: type = ptr_type %.19 [template = constants.%.20] +// CHECK:STDOUT: %.loc84_3: %.18 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -265,12 +265,12 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc92_6: i32 = int_literal 1 [template = constants.%.11] // CHECK:STDOUT: %.loc92_9: i32 = int_literal 2 [template = constants.%.12] -// CHECK:STDOUT: %.loc92_10.1: (i32, i32) = tuple_literal (%.loc92_6, %.loc92_9) +// CHECK:STDOUT: %.loc92_10.1: %.13 = tuple_literal (%.loc92_6, %.loc92_9) // CHECK:STDOUT: %.loc92_12: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.loc92_6, %.loc92_9) [template = constants.%tuple] -// CHECK:STDOUT: %.loc92_10.2: (i32, i32) = converted %.loc92_10.1, %tuple [template = constants.%tuple] +// 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_13: i32 = tuple_index %.loc92_10.2, %.loc92_12 [template = constants.%.11] -// CHECK:STDOUT: %.loc92_3: i32* = addr_of [template = ] +// CHECK:STDOUT: %.loc92_3: %.4 = addr_of [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -280,10 +280,10 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %.loc99_22.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc99_22.2: type = converted %int.make_type_32, %.loc99_22.1 [template = i32] // CHECK:STDOUT: %.loc99_22.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %param_addr.var: ref i32* = var param_addr -// CHECK:STDOUT: %param_addr: ref i32* = bind_name param_addr, %param_addr.var +// 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: %param.ref: i32 = name_ref param, %param -// CHECK:STDOUT: %.loc99_26: i32* = addr_of [template = ] +// CHECK:STDOUT: %.loc99_26: %.4 = 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 ab7b9c05776a..0e103a80f00e 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -23,7 +23,7 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,14 +31,14 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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] // CHECK:STDOUT: %undeclared.ref.loc15: = name_ref undeclared, [template = ] // CHECK:STDOUT: %.loc15_14: ref = deref // CHECK:STDOUT: %n: i32 = bind_name n, -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_32.loc19, %.loc19_9.1 [template = i32] diff --git a/toolchain/check/testdata/pointer/fail_deref_function.carbon b/toolchain/check/testdata/pointer/fail_deref_function.carbon index 06360fc42b3c..6522a6ba6cd2 100644 --- a/toolchain/check/testdata/pointer/fail_deref_function.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_function.carbon @@ -25,7 +25,7 @@ fn A() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,14 +34,14 @@ fn A() { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref.loc16: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref.loc16: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: ref = deref -// CHECK:STDOUT: %A.ref.loc20: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref.loc20: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc20: ref = deref // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon index 7ca211e8dfc2..02e6fe16430c 100644 --- a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon @@ -27,7 +27,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,7 +38,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 792ff5b25129..3dfc0edc10d7 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -45,12 +45,12 @@ fn Deref(n: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Deref.type: type = fn_type @Deref [template] -// CHECK:STDOUT: %Deref: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [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: {} = struct_value () [template] +// CHECK:STDOUT: %struct: %.2 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,8 +59,8 @@ fn Deref(n: i32) { // CHECK:STDOUT: .Deref = %Deref.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Deref.decl: = fn_decl @Deref [template = constants.%Deref] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Deref.decl: %Deref.type = fn_decl @Deref [template = constants.%Deref] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32, %.loc11_13.1 [template = i32] @@ -77,21 +77,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: () = tuple_literal () -// CHECK:STDOUT: %tuple.loc26: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc26_5.2: () = converted %.loc26_5.1, %tuple.loc26 [template = constants.%tuple] +// 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_3: ref = deref %.loc26_5.2 -// CHECK:STDOUT: %.loc31_4.1: () = tuple_literal () -// CHECK:STDOUT: %tuple.loc31: () = tuple_value () [template = constants.%tuple] -// CHECK:STDOUT: %.loc31_4.2: () = converted %.loc31_4.1, %tuple.loc31 [template = constants.%tuple] +// 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_5: ref = deref %.loc31_4.2 -// CHECK:STDOUT: %.loc36_5.1: {} = struct_literal () -// CHECK:STDOUT: %struct.loc36: {} = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc36_5.2: {} = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct] +// 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_3: ref = deref %.loc36_5.2 -// CHECK:STDOUT: %.loc40_4.1: {} = struct_literal () -// CHECK:STDOUT: %struct.loc40: {} = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc40_4.2: {} = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct] +// 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_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 8edd5039d2db..88265f11f47a 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -26,7 +26,7 @@ var p2: i32->foo; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,14 +36,14 @@ var p2: i32->foo; // CHECK:STDOUT: .p2 = %p2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // 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_8: ref = deref %.loc18_9.2 // CHECK:STDOUT: %p.var: ref = var p // CHECK:STDOUT: %p: ref = bind_name p, %p.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_9.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_9.2: type = converted %int.make_type_32.loc22, %.loc22_9.1 [template = i32] diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index 466210aec902..6d38753db728 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -19,13 +19,13 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = const_type {} [template] -// CHECK:STDOUT: %.3: type = ptr_type const {} [template] -// CHECK:STDOUT: %.4: type = ptr_type {} [template] -// CHECK:STDOUT: %.5: type = const_type {}* [template] +// CHECK:STDOUT: %.2: type = const_type %.1 [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] +// 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: %ConstMismatch: = struct_value () [template] +// CHECK:STDOUT: %ConstMismatch: %ConstMismatch.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,24 +34,24 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: .ConstMismatch = %ConstMismatch.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ConstMismatch.decl: = fn_decl @ConstMismatch [template = constants.%ConstMismatch] { -// CHECK:STDOUT: %.loc11_28: {} = struct_literal () +// CHECK:STDOUT: %ConstMismatch.decl: %ConstMismatch.type = fn_decl @ConstMismatch [template = constants.%ConstMismatch] { +// CHECK:STDOUT: %.loc11_28: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_21.1: type = converted %.loc11_28, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_21.2: type = const_type {} [template = constants.%.2] -// CHECK:STDOUT: %.loc11_29: type = ptr_type const {} [template = constants.%.3] -// CHECK:STDOUT: %p.loc11_18.1: const {}* = param p -// CHECK:STDOUT: @ConstMismatch.%p: const {}* = bind_name p, %p.loc11_18.1 -// CHECK:STDOUT: %.loc11_43: {} = struct_literal () +// CHECK:STDOUT: %.loc11_21.2: type = const_type %.1 [template = constants.%.2] +// CHECK:STDOUT: %.loc11_29: type = ptr_type %.2 [template = constants.%.3] +// CHECK:STDOUT: %p.loc11_18.1: %.3 = param p +// CHECK:STDOUT: @ConstMismatch.%p: %.3 = bind_name p, %p.loc11_18.1 +// CHECK:STDOUT: %.loc11_43: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_44.1: type = converted %.loc11_43, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_44.2: type = ptr_type {} [template = constants.%.4] -// CHECK:STDOUT: %.loc11_35: type = const_type {}* [template = constants.%.5] -// CHECK:STDOUT: @ConstMismatch.%return: ref const ({}*) = var +// CHECK:STDOUT: %.loc11_44.2: type = ptr_type %.1 [template = constants.%.4] +// CHECK:STDOUT: %.loc11_35: type = const_type %.4 [template = constants.%.5] +// CHECK:STDOUT: @ConstMismatch.%return: ref %.5 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConstMismatch(%p: const {}*) -> const ({}*) { +// CHECK:STDOUT: fn @ConstMismatch(%p: %.3) -> %.5 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const {}* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 3c8d7c778208..cff5825021b6 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -26,7 +26,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } @@ -38,19 +38,19 @@ var a: i32* = a_ref; // CHECK:STDOUT: .a_ref = %a_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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: %a_orig.var: ref i32 = var a_orig // CHECK:STDOUT: %a_orig: ref i32 = bind_name a_orig, %a_orig.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 i32* = var a_ref -// CHECK:STDOUT: %a_ref: ref i32* = bind_name a_ref, %a_ref.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -60,7 +60,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %.loc4: i32 = int_literal 0 [template = constants.%.2] // 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: i32* = addr_of %a_orig.ref +// CHECK:STDOUT: %.loc5: %.3 = addr_of %a_orig.ref // CHECK:STDOUT: assign file.%a_ref.var, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -70,7 +70,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -82,23 +82,23 @@ var a: i32* = a_ref; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+12, unloaded -// CHECK:STDOUT: %import_ref.2: ref i32* = import_ref ir0, inst+23, loaded +// CHECK:STDOUT: %import_ref.2: ref %.2 = import_ref ir0, inst+23, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 i32* = var a -// CHECK:STDOUT: %a: ref i32* = bind_name a, %a.var +// 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: %a_ref.ref: ref i32* = name_ref a_ref, file.%import_ref.2 -// CHECK:STDOUT: %.loc4: i32* = bind_value %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, file.%import_ref.2 +// CHECK:STDOUT: %.loc4: %.2 = 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 a02fa6e49944..e4181d39783c 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -18,14 +18,14 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] -// CHECK:STDOUT: %.3: type = ptr_type const i32 [template] -// CHECK:STDOUT: %.4: type = const_type const i32* [template] -// CHECK:STDOUT: %.5: type = ptr_type const (const i32*) [template] -// CHECK:STDOUT: %.6: type = const_type const (const 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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,36 +34,36 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.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 const i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_16: type = const_type const i32* [template = constants.%.4] -// CHECK:STDOUT: %.loc12_34: type = ptr_type const (const i32*) [template = constants.%.5] -// CHECK:STDOUT: %.loc12_9: type = const_type const (const i32*)* [template = constants.%.6] -// CHECK:STDOUT: %p.loc12_6.1: const (const (const i32*)*) = param p -// CHECK:STDOUT: @F.%p: const (const (const i32*)*) = bind_name p, %p.loc12_6.1 +// 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: %p.loc12_6.1: %.6 = param p +// CHECK:STDOUT: @F.%p: %.6 = bind_name p, %p.loc12_6.1 // 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: @F.%return: ref const i32 = var +// CHECK:STDOUT: @F.%return: ref %.2 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%p: const (const (const i32*)*)) -> const i32 { +// CHECK:STDOUT: fn @F(%p: %.6) -> %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const (const (const i32*)*) = name_ref p, %p -// CHECK:STDOUT: %.loc13_11.1: ref const (const i32*) = deref %p.ref -// CHECK:STDOUT: %.loc13_11.2: const (const i32*) = bind_value %.loc13_11.1 -// CHECK:STDOUT: %.loc13_10.1: ref const i32 = deref %.loc13_11.2 -// CHECK:STDOUT: %.loc13_10.2: const i32 = bind_value %.loc13_10.1 +// 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: 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 e0abe9f7733b..87119bbd3e77 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -21,14 +21,14 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: %Ptr.type: type = fn_type @Ptr [template] -// CHECK:STDOUT: %Ptr: = struct_value () [template] +// CHECK:STDOUT: %Ptr: %Ptr.type = struct_value () [template] // CHECK:STDOUT: %.3: type = const_type i32 [template] -// CHECK:STDOUT: %.4: type = ptr_type const i32 [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %ConstPtr.type: type = fn_type @ConstPtr [template] -// CHECK:STDOUT: %ConstPtr: = struct_value () [template] +// CHECK:STDOUT: %ConstPtr: %ConstPtr.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,51 +38,51 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: .ConstPtr = %ConstPtr.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Ptr.decl: = fn_decl @Ptr [template = constants.%Ptr] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Ptr.decl: %Ptr.type = fn_decl @Ptr [template = constants.%Ptr] { // 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: %p.loc11_8.1: i32* = param p -// CHECK:STDOUT: @Ptr.%p: i32* = bind_name p, %p.loc11_8.1 +// CHECK:STDOUT: %p.loc11_8.1: %.2 = param p +// CHECK:STDOUT: @Ptr.%p: %.2 = bind_name p, %p.loc11_8.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: @Ptr.%return: ref i32* = var +// CHECK:STDOUT: @Ptr.%return: ref %.2 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %ConstPtr.decl: = fn_decl @ConstPtr [template = constants.%ConstPtr] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConstPtr.decl: %ConstPtr.type = fn_decl @ConstPtr [template = constants.%ConstPtr] { // 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 const i32 [template = constants.%.4] -// CHECK:STDOUT: %p.loc15_13.1: const i32* = param p -// CHECK:STDOUT: @ConstPtr.%p: const i32* = bind_name p, %p.loc15_13.1 +// CHECK:STDOUT: %.loc15_25: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: %p.loc15_13.1: %.4 = param p +// CHECK:STDOUT: @ConstPtr.%p: %.4 = bind_name p, %p.loc15_13.1 // 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 const i32 [template = constants.%.4] -// CHECK:STDOUT: @ConstPtr.%return: ref const i32* = var +// CHECK:STDOUT: %.loc15_42: type = ptr_type %.3 [template = constants.%.4] +// CHECK:STDOUT: @ConstPtr.%return: ref %.4 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Ptr(%p: i32*) -> i32* { +// CHECK:STDOUT: fn @Ptr(%p: %.2) -> %.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: i32* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.2 = name_ref p, %p // CHECK:STDOUT: return %p.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConstPtr(%p: const i32*) -> const i32* { +// CHECK:STDOUT: fn @ConstPtr(%p: %.4) -> %.4 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: const i32* = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.4 = 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 085ac038d418..74d665566af5 100644 --- a/toolchain/check/testdata/return/code_after_return.carbon +++ b/toolchain/check/testdata/return/code_after_return.carbon @@ -18,9 +18,9 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -30,8 +30,8 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index d8f9336c377c..ad16fbd0fe9d 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -25,11 +25,11 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] @@ -43,9 +43,9 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] @@ -56,7 +56,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_32, %.loc11_18.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index bb9e19854147..5792e8854f42 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -21,11 +21,11 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %ReturnType.type: type = fn_type @ReturnType [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %ReturnType: = struct_value () [template] +// CHECK:STDOUT: %ReturnType: %ReturnType.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] -// CHECK:STDOUT: %Six: = struct_value () [template] +// CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,12 +36,12 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: .Six = %Six.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ReturnType.decl: = fn_decl @ReturnType [template = constants.%ReturnType] { +// CHECK:STDOUT: %ReturnType.decl: %ReturnType.type = fn_decl @ReturnType [template = constants.%ReturnType] { // CHECK:STDOUT: @ReturnType.%return: ref type = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Six.decl: = fn_decl @Six [template = constants.%Six] { -// CHECK:STDOUT: %ReturnType.ref: = name_ref ReturnType, %ReturnType.decl [template = constants.%ReturnType] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Six.decl: %Six.type = fn_decl @Six [template = constants.%Six] { +// CHECK:STDOUT: %ReturnType.ref: %ReturnType.type = name_ref ReturnType, %ReturnType.decl [template = constants.%ReturnType] // CHECK:STDOUT: %ReturnType.call: init type = call %ReturnType.ref() // CHECK:STDOUT: %.loc17_24.1: type = value_of_initializer %ReturnType.call // CHECK:STDOUT: %.loc17_24.2: type = converted %ReturnType.call, %.loc17_24.1 diff --git a/toolchain/check/testdata/return/fail_error_in_type.carbon b/toolchain/check/testdata/return/fail_error_in_type.carbon index c41ee95be37a..e70792a759c9 100644 --- a/toolchain/check/testdata/return/fail_error_in_type.carbon +++ b/toolchain/check/testdata/return/fail_error_in_type.carbon @@ -18,7 +18,7 @@ fn Six() -> x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Six: = struct_value () [template] +// CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,7 +27,7 @@ fn Six() -> x; // CHECK:STDOUT: .Six = %Six.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Six.decl: = fn_decl @Six [template = constants.%Six] { +// CHECK:STDOUT: %Six.decl: %Six.type = fn_decl @Six [template = constants.%Six] { // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] // CHECK:STDOUT: @Six.%return: ref = var // 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 9068bc844d1d..8d87fe2e1c00 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -35,13 +35,13 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] -// CHECK:STDOUT: %Six: = struct_value () [template] +// CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: %y: type = bind_symbolic_name y 0 [symbolic] // CHECK:STDOUT: %HalfDozen.type: type = fn_type @HalfDozen [template] -// CHECK:STDOUT: %HalfDozen: = struct_value () [template] +// CHECK:STDOUT: %HalfDozen: %HalfDozen.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} @@ -54,7 +54,7 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @HalfDozen() -> y { +// CHECK:STDOUT: fn @HalfDozen() -> %y { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc24: i32 = int_literal 6 [template = constants.%.2] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index 539b66f53a2c..54224b122995 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -19,9 +19,9 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,8 +30,8 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] 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 592298b802da..2407a3b234ab 100644 --- a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon +++ b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon @@ -19,7 +19,7 @@ fn F() -> () { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,14 +28,14 @@ fn F() -> () { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %.loc11_12.1: () = tuple_literal () +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// 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: @F.%return: ref () = var +// CHECK:STDOUT: @F.%return: ref %.1 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> () { +// CHECK:STDOUT: fn @F() -> %.1 { // 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 41359a142d3e..fd75351ca6a8 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 @@ -20,9 +20,9 @@ fn Procedure() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] -// CHECK:STDOUT: %Procedure: = struct_value () [template] +// CHECK:STDOUT: %Procedure: %Procedure.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,8 +31,8 @@ fn Procedure() -> i32 { // CHECK:STDOUT: .Procedure = %Procedure.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Procedure.decl: = fn_decl @Procedure [template = constants.%Procedure] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Procedure.decl: %Procedure.type = fn_decl @Procedure [template = constants.%Procedure] { // 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] 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 a78a4aeabb96..594f62c48ca1 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -37,19 +37,19 @@ fn G() -> C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.4: type = unbound_element_type C, i32 [template] +// CHECK:STDOUT: %.4: type = unbound_element_type %C, i32 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: C = struct_value (%.3, %.7) [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.3, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,20 +60,20 @@ fn G() -> C { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @G.%return: ref C = var +// CHECK:STDOUT: @G.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,11 +81,11 @@ 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc23_16: %.4 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc23_28: %.4 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -108,21 +108,21 @@ fn G() -> C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G() -> %return: C { +// CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %c: ref C = bind_name c, %return +// CHECK:STDOUT: %c: ref %C = bind_name c, %return // CHECK:STDOUT: %.loc25_29: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: %.loc25_37: i32 = int_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_38.1: {.a: i32, .b: i32} = struct_literal (%.loc25_29, %.loc25_37) +// CHECK:STDOUT: %.loc25_38.1: %.5 = 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.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.%.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: %.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 -// CHECK:STDOUT: %c.ref: ref C = name_ref c, %c +// CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 938078d31289..cd3632ad23d5 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 @@ -24,7 +24,7 @@ fn Procedure() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Procedure: = struct_value () [template] +// CHECK:STDOUT: %Procedure: %Procedure.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,15 +33,15 @@ fn Procedure() { // CHECK:STDOUT: .Procedure = %Procedure.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Procedure.decl: = fn_decl @Procedure [template = constants.%Procedure] {} +// CHECK:STDOUT: %Procedure.decl: %Procedure.type = fn_decl @Procedure [template = constants.%Procedure] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Procedure() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_20.1: () = tuple_literal () +// 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: () = bind_name v, -// CHECK:STDOUT: %.loc18_25: () = tuple_literal () +// CHECK:STDOUT: %v: %.1 = bind_name v, +// CHECK:STDOUT: %.loc18_25: %.1 = 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 3b0acd38acbc..178a1ddfb18e 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -44,14 +44,14 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %SameScope.type: type = fn_type @SameScope [template] -// CHECK:STDOUT: %SameScope: = struct_value () [template] +// CHECK:STDOUT: %SameScope: %SameScope.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] -// CHECK:STDOUT: %DifferentScopes: = struct_value () [template] +// CHECK:STDOUT: %DifferentScopes: %DifferentScopes.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,24 +61,24 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: .DifferentScopes = %DifferentScopes.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %SameScope.decl: = fn_decl @SameScope [template = constants.%SameScope] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %SameScope.decl: %SameScope.type = fn_decl @SameScope [template = constants.%SameScope] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11, %.loc11_19.1 [template = i32] // CHECK:STDOUT: @SameScope.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %DifferentScopes.decl: = fn_decl @DifferentScopes [template = constants.%DifferentScopes] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %DifferentScopes.decl: %DifferentScopes.type = fn_decl @DifferentScopes [template = constants.%DifferentScopes] { // CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_25.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_25.2: type = converted %int.make_type_32.loc26, %.loc26_25.1 [template = i32] // CHECK:STDOUT: @DifferentScopes.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 131a6cfc2a8f..ac9950d35a8c 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -24,12 +24,12 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mismatch.type: type = fn_type @Mismatch [template] -// CHECK:STDOUT: %Mismatch: = struct_value () [template] +// CHECK:STDOUT: %Mismatch: %Mismatch.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,14 +39,14 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: .Mismatch = %Mismatch.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Mismatch.decl: = fn_decl @Mismatch [template = constants.%Mismatch] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mismatch.decl: %Mismatch.type = fn_decl @Mismatch [template = constants.%Mismatch] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_32, %.loc11_18.1 [template = i32] // CHECK:STDOUT: @Mismatch.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index b19be4a87c79..282333b5548e 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -20,9 +20,9 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,8 +32,8 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] diff --git a/toolchain/check/testdata/return/fail_value_disallowed.carbon b/toolchain/check/testdata/return/fail_value_disallowed.carbon index 6bba1fdb474e..d06ff137f81c 100644 --- a/toolchain/check/testdata/return/fail_value_disallowed.carbon +++ b/toolchain/check/testdata/return/fail_value_disallowed.carbon @@ -23,7 +23,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,7 +33,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index b37d766f2876..bb0af159fc25 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -23,9 +23,9 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,8 +34,8 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index 1867c7f39787..33ff29406732 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -19,9 +19,9 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] -// CHECK:STDOUT: %Six: = struct_value () [template] +// CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -34,8 +34,8 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %x.var: ref type = var x // CHECK:STDOUT: %x: ref type = bind_name x, %x.var -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Six.decl: = fn_decl @Six [template = constants.%Six] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Six.decl: %Six.type = fn_decl @Six [template = constants.%Six] { // CHECK:STDOUT: %x.ref: ref type = name_ref x, %x // CHECK:STDOUT: %.loc15: type = bind_value %x.ref // CHECK:STDOUT: @Six.%return: ref = var 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 f9e5e894f6b5..2344719a0fbb 100644 --- a/toolchain/check/testdata/return/missing_return_no_return_type.carbon +++ b/toolchain/check/testdata/return/missing_return_no_return_type.carbon @@ -16,7 +16,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -25,7 +25,7 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/return/no_value.carbon b/toolchain/check/testdata/return/no_value.carbon index 20b4d61e12ca..e8499ee4a4b4 100644 --- a/toolchain/check/testdata/return/no_value.carbon +++ b/toolchain/check/testdata/return/no_value.carbon @@ -17,7 +17,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,7 +26,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index a1c21538d56a..46c515c2ff2c 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -29,17 +29,17 @@ fn G() -> i32 { // 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: %Int32: = struct_value () [template] -// CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: C = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,31 +52,31 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: @F.%return: ref C = var +// CHECK:STDOUT: @F.%return: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32, %.loc21_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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: = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc12_8: %.2 = 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: = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc13_8: %.2 = field_decl b, element1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -86,19 +86,19 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %return: C { +// CHECK:STDOUT: fn @F() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %result: ref C = bind_name result, %return +// CHECK:STDOUT: %result: ref %C = bind_name result, %return // CHECK:STDOUT: %.loc17_34: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc17_42: i32 = int_literal 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_43.1: {.a: i32, .b: i32} = struct_literal (%.loc17_34, %.loc17_42) +// CHECK:STDOUT: %.loc17_43.1: %.3 = 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.%.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.%.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: %.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 // CHECK:STDOUT: return %result to %return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 26e5c4ba5877..8f76e7446372 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -32,16 +32,16 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %UnrelatedScopes.type: type = fn_type @UnrelatedScopes [template] -// CHECK:STDOUT: %UnrelatedScopes: = struct_value () [template] +// CHECK:STDOUT: %UnrelatedScopes: %UnrelatedScopes.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %EnclosingButAfter.type: type = fn_type @EnclosingButAfter [template] -// CHECK:STDOUT: %EnclosingButAfter: = struct_value () [template] +// CHECK:STDOUT: %EnclosingButAfter: %EnclosingButAfter.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,18 +51,18 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: .EnclosingButAfter = %EnclosingButAfter.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %UnrelatedScopes.decl: = fn_decl @UnrelatedScopes [template = constants.%UnrelatedScopes] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %UnrelatedScopes.decl: %UnrelatedScopes.type = fn_decl @UnrelatedScopes [template = constants.%UnrelatedScopes] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11, %.loc11_25.1 [template = i32] // CHECK:STDOUT: @UnrelatedScopes.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %EnclosingButAfter.decl: = fn_decl @EnclosingButAfter [template = constants.%EnclosingButAfter] { +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %EnclosingButAfter.decl: %EnclosingButAfter.type = fn_decl @EnclosingButAfter [template = constants.%EnclosingButAfter] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc21_25.2: type = converted %bool.make_type, %.loc21_25.1 [template = bool] @@ -73,8 +73,8 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc21_34.2: type = converted %int.make_type_32.loc21, %.loc21_34.1 [template = i32] // CHECK:STDOUT: @EnclosingButAfter.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 92321581182b..cd7783e14dad 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -17,12 +17,12 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] -// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,24 +31,24 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // 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: @Main.%return: ref {.a: i32} = var +// CHECK:STDOUT: @Main.%return: ref %.2 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Main() -> {.a: i32} { +// CHECK:STDOUT: fn @Main() -> %.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_16: i32 = int_literal 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_17: {.a: i32} = struct_literal (%.loc12_16) -// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.loc12_16) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_18: {.a: i32} = converted %.loc12_17, %struct [template = constants.%struct] +// 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: return %.loc12_18 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index cc551b6938c8..b7b969222679 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -18,15 +18,15 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 15 [template] // CHECK:STDOUT: %.6: i32 = int_literal 35 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,34 +35,34 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // 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: (type, type) = tuple_literal (%int.make_type_32.loc12_15, %int.make_type_32.loc12_20) +// CHECK:STDOUT: %.loc12_23.1: %.2 = 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: @Main.%return: ref (i32, i32) = var +// CHECK:STDOUT: @Main.%return: ref %.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Main() -> %return: (i32, i32) { +// CHECK:STDOUT: fn @Main() -> %return: %.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_11: i32 = int_literal 15 [template = constants.%.5] // CHECK:STDOUT: %.loc13_15: i32 = int_literal 35 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_17.1: (i32, i32) = tuple_literal (%.loc13_11, %.loc13_15) +// CHECK:STDOUT: %.loc13_17.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc13_17.3, %.loc13_17.5) to %return [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_18: init (i32, i32) = converted %.loc13_17.1, %.loc13_17.6 [template = constants.%tuple] +// 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: 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 e0057bd0bad3..870ac16606f2 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -17,9 +17,9 @@ fn Main() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -29,8 +29,8 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] diff --git a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon index 8f2245f4f65a..64004cd12407 100644 --- a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon +++ b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon @@ -19,7 +19,7 @@ fn F() { a.b; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,7 +28,7 @@ fn F() { a.b; } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 9d05e7a525a0..22e0944a1e6f 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -18,7 +18,7 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: } @@ -29,20 +29,20 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.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: {} = struct_literal () +// CHECK:STDOUT: %.loc14: %.3 = 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 3ed0f88e370f..20013348a3fc 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -28,16 +28,16 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc14_9.1: {} = struct_literal () +// CHECK:STDOUT: %.loc14_9.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref {} = var x -// CHECK:STDOUT: %x: ref {} = bind_name x, %x.var +// 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: %.loc14_19: i32 = int_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_20: {.a: i32} = struct_literal (%.loc14_19) +// CHECK:STDOUT: %.loc14_20: %.4 = 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 6e050538ea37..bff1790e4320 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -57,14 +57,14 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = struct_type {.b: i32, .c: i32} [template] -// CHECK:STDOUT: %.6: type = ptr_type {.b: i32, .c: i32} [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: %.7: i32 = int_literal 3 [template] // CHECK:STDOUT: %.8: i32 = int_literal 4 [template] // CHECK:STDOUT: } @@ -77,12 +77,12 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_16.1: type = value_of_initializer %int.make_type_32.loc18_16 [template = i32] // CHECK:STDOUT: %.loc18_16.2: type = converted %int.make_type_32.loc18_16, %.loc18_16.1 [template = i32] @@ -100,42 +100,42 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: %.loc18_56.2: type = converted %int.make_type_32.loc18_56, %.loc18_56.1 [template = i32] // CHECK:STDOUT: @F.%return: ref = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc27_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_13.1: type = value_of_initializer %int.make_type_32.loc27_13 [template = i32] // CHECK:STDOUT: %.loc27_13.2: type = converted %int.make_type_32.loc27_13, %.loc27_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc27_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_22.1: type = value_of_initializer %int.make_type_32.loc27_22 [template = i32] // CHECK:STDOUT: %.loc27_22.2: type = converted %int.make_type_32.loc27_22, %.loc27_22.1 [template = i32] // CHECK:STDOUT: %.loc27_35: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc27_36: {.a: i32} = struct_literal (%.loc27_35) +// CHECK:STDOUT: %.loc27_36: %.3 = struct_literal (%.loc27_35) // CHECK:STDOUT: %v: = bind_name v, -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] // CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_32.loc36, %.loc36_8.1 [template = i32] // CHECK:STDOUT: %.loc36_22: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc36_32: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %w: i32 = bind_name w, -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.b: i32, .c: i32} = var y -// CHECK:STDOUT: %y: ref {.b: i32, .c: i32} = bind_name y, %y.var +// CHECK:STDOUT: %y.var: ref %.5 = var y +// CHECK:STDOUT: %y: ref %.5 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index 2051d5b4a7dd..30c36401ff78 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -24,7 +24,7 @@ var y: {.b: i32} = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: type = struct_type {.b: i32} [template] @@ -37,20 +37,20 @@ var y: {.b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 {.b: i32} = var y -// CHECK:STDOUT: %y: ref {.b: i32} = bind_name y, %y.var +// 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"; @@ -58,9 +58,9 @@ var y: {.b: i32} = x; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_26: i32 = int_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_27: {.b: i32} = struct_literal (%.loc15_26) +// CHECK:STDOUT: %.loc15_27: %.4 = struct_literal (%.loc15_26) // CHECK:STDOUT: assign file.%x.var, -// CHECK:STDOUT: %x.ref: ref {.a: i32} = 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_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index bc48b07a4ebe..a88bd0754996 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -18,7 +18,7 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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] @@ -30,13 +30,13 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -44,7 +44,7 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_26: f64 = float_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_29: {.b: f64} = struct_literal (%.loc14_26) +// CHECK:STDOUT: %.loc14_29: %.4 = 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 d5a5a3af71d6..14beacacae9a 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -20,12 +20,12 @@ var y: i32 = x.b; // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [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: {.a: f64} = struct_value (%.4) [template] +// CHECK:STDOUT: %struct: %.3 = struct_value (%.4) [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,14 +36,14 @@ var y: i32 = x.b; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // 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 {.a: f64} = var x -// CHECK:STDOUT: %x: ref {.a: f64} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -58,11 +58,11 @@ var y: i32 = x.b; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: f64 = float_literal 4 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_29.1: {.a: f64} = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_29.2: init {.a: f64} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_30: init {.a: f64} = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct] +// 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: assign file.%x.var, %.loc11_30 -// CHECK:STDOUT: %x.ref: ref {.a: f64} = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.3 = 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 51530161b291..ddbb76724293 100644 --- a/toolchain/check/testdata/struct/fail_member_of_function.carbon +++ b/toolchain/check/testdata/struct/fail_member_of_function.carbon @@ -20,7 +20,7 @@ fn A() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,12 +29,12 @@ fn A() { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: return // 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 484354b11576..e2055b8b27cb 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -19,10 +19,10 @@ var y: i32 = x.b; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 4 [template] -// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,14 +32,14 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] @@ -52,11 +52,11 @@ var y: i32 = x.b; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: i32 = int_literal 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_27.1: {.a: i32} = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: init {.a: i32} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init {.a: i32} = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] +// 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: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref {.a: i32} = 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_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index cfebef0c7297..70f0cabc5dff 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -18,9 +18,9 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } @@ -31,17 +31,17 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32, .b: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32, .b: i32} = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -49,7 +49,7 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_35: i32 = int_literal 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_36: {.a: i32} = struct_literal (%.loc14_35) +// CHECK:STDOUT: %.loc14_36: %.5 = 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 7e3f023775ee..400adcc1ff88 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -18,7 +18,7 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -28,14 +28,14 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 7c06e67b6d3b..7eeaf312a206 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -27,7 +27,7 @@ var x: {.a = 1}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc14_14: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_15: {.a: i32} = struct_literal (%.loc14_14) +// CHECK:STDOUT: %.loc14_15: %.2 = struct_literal (%.loc14_14) // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index ca8b18eb300d..66eea3a5cfd2 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -28,20 +28,20 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] -// CHECK:STDOUT: %struct.1: {.a: i32} = struct_value (%.3) [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: (i32,)} [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: {.b: i32, .c: (i32,)}, .d: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type {.b: i32, .c: (i32,)} [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: {.b: i32, .c: (i32,)}*, .d: i32} [template] -// CHECK:STDOUT: %.10: type = ptr_type {.a: {.b: i32, .c: (i32,)}*, .d: i32} [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.3) [template] -// CHECK:STDOUT: %struct.2: {.b: i32, .c: (i32,)} = struct_value (%.3, %tuple) [template] -// CHECK:STDOUT: %struct.3: {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_value (%struct.2, %.3) [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,31 +51,31 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: .b_ref = %b_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var a_ref -// CHECK:STDOUT: %a_ref: ref {.a: i32} = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_36.1: (type,) = tuple_literal (%int.make_type_32.loc5_32) +// CHECK:STDOUT: %.loc5_36.1: %.4 = 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: (i32,)} [template = constants.%.6] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: i32, .c: %.5} [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: {.b: i32, .c: (i32,)}, .d: i32} [template = constants.%.7] -// CHECK:STDOUT: %b_ref.var: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = var b_ref -// CHECK:STDOUT: %b_ref: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = bind_name b_ref, %b_ref.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -83,29 +83,29 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_30: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_31.1: {.a: i32} = struct_literal (%.loc4_30) -// CHECK:STDOUT: %.loc4_31.2: init {.a: i32} = struct_init (%.loc4_30) to file.%a_ref.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc4_32: init {.a: i32} = converted %.loc4_31.1, %.loc4_31.2 [template = constants.%struct.1] +// 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: assign file.%a_ref.var, %.loc4_32 // CHECK:STDOUT: %.loc6_17: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc6_26: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_28.1: (i32,) = tuple_literal (%.loc6_26) -// CHECK:STDOUT: %.loc6_29.1: {.b: i32, .c: (i32,)} = struct_literal (%.loc6_17, %.loc6_28.1) +// 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_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_38.1: {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_literal (%.loc6_29.1, %.loc6_37) -// CHECK:STDOUT: %.loc6_38.2: ref {.b: i32, .c: (i32,)} = struct_access file.%b_ref.var, element0 +// 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_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 (i32,) = struct_access %.loc6_38.2, element1 -// CHECK:STDOUT: %.loc6_28.2: init (i32,) = tuple_init (%.loc6_26) to %.loc6_29.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.5: init (i32,) = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.6: init (i32,) = initialize_from %.loc6_29.5 to %.loc6_29.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.7: init {.b: i32, .c: (i32,)} = struct_init (%.loc6_29.3, %.loc6_29.6) to %.loc6_38.2 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc6_38.3: init {.b: i32, .c: (i32,)} = converted %.loc6_29.1, %.loc6_29.7 [template = constants.%struct.2] +// 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_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 {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_init (%.loc6_38.3, %.loc6_38.5) to file.%b_ref.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc6_39: init {.a: {.b: i32, .c: (i32,)}, .d: i32} = converted %.loc6_38.1, %.loc6_38.6 [template = constants.%struct.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: assign file.%b_ref.var, %.loc6_39 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -115,15 +115,15 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: (i32,)} [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: {.b: i32, .c: (i32,)}, .d: i32} [template] -// CHECK:STDOUT: %.7: type = ptr_type {.b: i32, .c: (i32,)} [template] -// CHECK:STDOUT: %.8: type = struct_type {.a: {.b: i32, .c: (i32,)}*, .d: i32} [template] -// CHECK:STDOUT: %.9: type = ptr_type {.a: {.b: i32, .c: (i32,)}*, .d: 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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -134,68 +134,68 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: ref {.a: i32} = import_ref ir0, inst+16, loaded -// CHECK:STDOUT: %import_ref.2: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = import_ref ir0, inst+59, loaded +// CHECK:STDOUT: %import_ref.1: ref %.2 = import_ref ir0, inst+16, loaded +// CHECK:STDOUT: %import_ref.2: ref %.6 = import_ref ir0, inst+59, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var a -// CHECK:STDOUT: %a: ref {.a: i32} = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.2 = var a +// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_28: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_32.1: (type,) = tuple_literal (%int.make_type_32.loc5_28) +// CHECK:STDOUT: %.loc5_32.1: %.3 = 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: (i32,)} [template = constants.%.5] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: i32, .c: %.4} [template = constants.%.5] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: {.b: i32, .c: (i32,)}, .d: i32} [template = constants.%.6] -// CHECK:STDOUT: %b.var: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = var b -// CHECK:STDOUT: %b: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = bind_name b, %b.var +// 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: } // 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 {.a: i32} = name_ref a_ref, file.%import_ref.1 +// CHECK:STDOUT: %a_ref.ref: ref %.2 = name_ref a_ref, file.%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 {.a: i32} = struct_init (%.loc4_20.2) to file.%a.var -// CHECK:STDOUT: %.loc4_25: init {.a: i32} = converted %a_ref.ref, %.loc4_20.3 +// 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: assign file.%a.var, %.loc4_25 -// CHECK:STDOUT: %b_ref.ref: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = name_ref b_ref, file.%import_ref.2 -// CHECK:STDOUT: %.loc5_47.1: ref {.b: i32, .c: (i32,)} = struct_access %b_ref.ref, element0 +// CHECK:STDOUT: %b_ref.ref: ref %.6 = name_ref b_ref, file.%import_ref.2 +// CHECK:STDOUT: %.loc5_47.1: ref %.5 = 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 {.b: i32, .c: (i32,)} = struct_access file.%b.var, element0 +// CHECK:STDOUT: %.loc5_47.4: ref %.5 = 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 (i32,) = struct_access %.loc5_47.1, element1 +// CHECK:STDOUT: %.loc5_47.7: ref %.4 = 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 (i32,) = struct_access %.loc5_47.4, element1 -// CHECK:STDOUT: %.loc5_47.11: init (i32,) = tuple_init (%.loc5_47.9) to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.12: init (i32,) = converted %.loc5_47.7, %.loc5_47.11 -// CHECK:STDOUT: %.loc5_47.13: init (i32,) = initialize_from %.loc5_47.12 to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.14: init {.b: i32, .c: (i32,)} = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4 -// CHECK:STDOUT: %.loc5_47.15: init {.b: i32, .c: (i32,)} = converted %.loc5_47.1, %.loc5_47.14 +// 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.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 {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var -// CHECK:STDOUT: %.loc5_52: init {.a: {.b: i32, .c: (i32,)}, .d: i32} = converted %b_ref.ref, %.loc5_47.20 +// 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: assign file.%b.var, %.loc5_52 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index a6a21cd4aefb..56ad795b7658 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -19,18 +19,18 @@ fn F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.x: i32, .y: i32, .z: i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .y: i32, .z: i32} [template] +// CHECK:STDOUT: %.4: type = ptr_type %.2 [template] // CHECK:STDOUT: %.5: i32 = int_literal 3 [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: i32, .b: {.x: i32, .y: i32, .z: i32}, .c: i32} [template] -// CHECK:STDOUT: %.7: type = struct_type {.a: i32, .b: {.x: i32, .y: i32, .z: i32}*, .c: i32} [template] -// CHECK:STDOUT: %.8: type = ptr_type {.a: i32, .b: {.x: i32, .y: i32, .z: i32}*, .c: i32} [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,10 +40,10 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // 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] // CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_32.loc11_16, %.loc11_16.1 [template = i32] @@ -54,10 +54,10 @@ fn F() -> 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: @G.%return: ref {.x: i32, .y: i32, .z: i32} = var +// CHECK:STDOUT: @G.%return: ref %.2 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // 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] @@ -67,28 +67,28 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G() -> {.x: i32, .y: i32, .z: i32}; +// CHECK:STDOUT: fn @G() -> %.2; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_16: i32 = int_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc14_25.1: ref {.x: i32, .y: i32, .z: i32} = temporary_storage -// CHECK:STDOUT: %G.call: init {.x: i32, .y: i32, .z: i32} = call %G.ref() to %.loc14_25.1 +// 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_literal 3 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_35.1: {.a: i32, .b: {.x: i32, .y: i32, .z: i32}, .c: i32} = struct_literal (%.loc14_16, %G.call, %.loc14_34) -// CHECK:STDOUT: %.loc14_25.2: ref {.x: i32, .y: i32, .z: i32} = temporary %.loc14_25.1, %G.call +// 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.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: {.x: i32, .y: i32, .z: i32} = struct_value (%.loc14_25.4, %.loc14_25.6, %.loc14_25.8) -// CHECK:STDOUT: %.loc14_35.2: {.x: i32, .y: i32, .z: i32} = converted %G.call, %struct.loc14_25 -// CHECK:STDOUT: %struct.loc14_35: {.a: i32, .b: {.x: i32, .y: i32, .z: i32}, .c: i32} = struct_value (%.loc14_16, %.loc14_35.2, %.loc14_34) -// CHECK:STDOUT: %.loc14_35.3: {.a: i32, .b: {.x: i32, .y: i32, .z: i32}, .c: i32} = converted %.loc14_35.1, %struct.loc14_35 -// CHECK:STDOUT: %.loc14_36: {.x: i32, .y: i32, .z: i32} = struct_access %.loc14_35.3, element1 +// 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: %.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 b746ba3a98b8..34a630c0b431 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -18,14 +18,14 @@ var z: i32 = y; // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 {.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_literal 1 [template] -// CHECK:STDOUT: %struct: {.a: f64, .b: i32} = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: %.3 = struct_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,24 +37,24 @@ var z: i32 = y; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] // 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: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: f64, .b: i32} = var x -// CHECK:STDOUT: %x: ref {.a: f64, .b: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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] // CHECK:STDOUT: %y.var: ref i32 = var y // CHECK:STDOUT: %y: ref i32 = bind_name y, %y.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.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] @@ -70,15 +70,15 @@ var z: i32 = y; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_35: f64 = float_literal 0 [template = constants.%.5] // CHECK:STDOUT: %.loc11_45: i32 = int_literal 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_46.1: {.a: f64, .b: i32} = struct_literal (%.loc11_35, %.loc11_45) +// CHECK:STDOUT: %.loc11_46.1: %.3 = 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.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 {.a: f64, .b: i32} = struct_init (%.loc11_46.3, %.loc11_46.5) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_47: init {.a: f64, .b: i32} = converted %.loc11_46.1, %.loc11_46.6 [template = constants.%struct] +// 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: assign file.%x.var, %.loc11_47 -// CHECK:STDOUT: %x.ref: ref {.a: f64, .b: i32} = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.3 = 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 b8134d1fc47e..238a8ef98da9 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -19,17 +19,17 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: (i32, i32, i32), .b: (i32, i32, i32)} [template] -// CHECK:STDOUT: %.5: type = ptr_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.6: type = struct_type {.a: (i32, i32, i32)*, .b: (i32, i32, i32)*} [template] -// CHECK:STDOUT: %.7: type = ptr_type {.a: (i32, i32, i32)*, .b: (i32, i32, i32)*} [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,14 +39,14 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11_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: (type, type, type) = 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: %.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.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] @@ -54,27 +54,27 @@ fn G() { // 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: @F.%return: ref (i32, i32, i32) = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> (i32, i32, i32); +// CHECK:STDOUT: fn @F() -> %.3; // 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: (type, type, type) = 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: %.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.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] @@ -85,7 +85,7 @@ fn G() { // 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: (type, type, type) = 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: %.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.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] @@ -93,18 +93,18 @@ fn G() { // 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: (i32, i32, i32), .b: (i32, i32, i32)} [template = constants.%.4] -// CHECK:STDOUT: %v.var: ref {.a: (i32, i32, i32), .b: (i32, i32, i32)} = var v -// CHECK:STDOUT: %v: ref {.a: (i32, i32, i32), .b: (i32, i32, i32)} = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14_61: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_74.1: ref (i32, i32, i32) = struct_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_62: init (i32, i32, i32) = call %F.ref.loc14_61() to %.loc14_74.1 -// CHECK:STDOUT: %F.ref.loc14_71: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_74.2: ref (i32, i32, i32) = struct_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_72: init (i32, i32, i32) = call %F.ref.loc14_71() to %.loc14_74.2 -// CHECK:STDOUT: %.loc14_74.3: {.a: (i32, i32, i32), .b: (i32, i32, i32)} = struct_literal (%F.call.loc14_62, %F.call.loc14_72) -// CHECK:STDOUT: %.loc14_74.4: init {.a: (i32, i32, i32), .b: (i32, i32, i32)} = struct_init (%F.call.loc14_62, %F.call.loc14_72) to %v.var -// CHECK:STDOUT: %.loc14_75: init {.a: (i32, i32, i32), .b: (i32, i32, i32)} = converted %.loc14_74.3, %.loc14_74.4 +// 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: %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: %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: 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 200a8a93641f..b5558d274ab4 100644 --- a/toolchain/check/testdata/struct/no_prelude/empty.carbon +++ b/toolchain/check/testdata/struct/no_prelude/empty.carbon @@ -16,7 +16,7 @@ var y: {} = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: {} = struct_value () [template] +// CHECK:STDOUT: %struct: %.1 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -24,25 +24,25 @@ var y: {} = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_9.1: {} = struct_literal () +// CHECK:STDOUT: %.loc11_9.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref {} = var x -// CHECK:STDOUT: %x: ref {} = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9.1: {} = struct_literal () +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = bind_name x, %x.var +// CHECK:STDOUT: %.loc12_9.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %y.var: ref {} = var y -// CHECK:STDOUT: %y: ref {} = bind_name y, %y.var +// 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_14.1: {} = struct_literal () -// CHECK:STDOUT: %.loc11_14.2: init {} = struct_init () to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_15: init {} = converted %.loc11_14.1, %.loc11_14.2 [template = constants.%struct] +// CHECK:STDOUT: %.loc11_14.1: %.1 = struct_literal () +// CHECK:STDOUT: %.loc11_14.2: init %.1 = struct_init () to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_15: init %.1 = converted %.loc11_14.1, %.loc11_14.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_15 -// CHECK:STDOUT: %x.ref: ref {} = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_13: init {} = struct_init () to file.%y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_14: init {} = converted %x.ref, %.loc12_13 [template = constants.%struct] +// CHECK:STDOUT: %x.ref: ref %.1 = name_ref x, file.%x +// CHECK:STDOUT: %.loc12_13: init %.1 = struct_init () to file.%y.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_14: init %.1 = converted %x.ref, %.loc12_13 [template = constants.%struct] // CHECK:STDOUT: assign file.%y.var, %.loc12_14 // CHECK:STDOUT: return // 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 22a57364c489..3e4fa00fcea0 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon @@ -17,27 +17,27 @@ var x: {.a: {}} = {.b = {}}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %.2: type = struct_type {.a: {}} [template] +// CHECK:STDOUT: %.2: type = struct_type {.a: %.1} [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %.4: type = struct_type {.a: ()} [template] -// CHECK:STDOUT: %.5: type = struct_type {.b: {}} [template] +// CHECK:STDOUT: %.4: type = struct_type {.a: %.3} [template] +// CHECK:STDOUT: %.5: type = struct_type {.b: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_14.1: {} = struct_literal () +// CHECK:STDOUT: %.loc14_14.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc14_14.2: type = converted %.loc14_14.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_15: type = struct_type {.a: {}} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref {.a: {}} = var x -// CHECK:STDOUT: %x: ref {.a: {}} = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_15: type = struct_type {.a: %.1} [template = constants.%.2] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_26: {} = struct_literal () -// CHECK:STDOUT: %.loc14_27: {.b: {}} = struct_literal (%.loc14_26) +// CHECK:STDOUT: %.loc14_26: %.1 = struct_literal () +// CHECK:STDOUT: %.loc14_27: %.5 = struct_literal (%.loc14_26) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon b/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon index c69c938ad901..9c84bef02523 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon @@ -24,8 +24,8 @@ var p: Incomplete* = &s.a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.1: type = struct_type {.a: Incomplete} [template] -// CHECK:STDOUT: %.2: type = ptr_type Incomplete [template] +// CHECK:STDOUT: %.1: type = struct_type {.a: %Incomplete} [template] +// CHECK:STDOUT: %.2: type = ptr_type %Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,13 +36,13 @@ var p: Incomplete* = &s.a; // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} // CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc19: type = struct_type {.a: Incomplete} [template = constants.%.1] +// CHECK:STDOUT: %.loc19: type = struct_type {.a: %Incomplete} [template = constants.%.1] // CHECK:STDOUT: %s.var: ref = var s // CHECK:STDOUT: %s: ref = bind_name s, %s.var // CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc21: type = ptr_type Incomplete [template = constants.%.2] -// CHECK:STDOUT: %p.var: ref Incomplete* = var p -// CHECK:STDOUT: %p: ref Incomplete* = bind_name p, %p.var +// CHECK:STDOUT: %.loc21: type = ptr_type %Incomplete [template = constants.%.2] +// CHECK:STDOUT: %p.var: ref %.2 = var p +// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 3ad16766a812..068f22800d5c 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -16,10 +16,10 @@ var y: {.a: i32} = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 4 [template] -// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,20 +29,20 @@ var y: {.a: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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 {.a: i32} = var y -// CHECK:STDOUT: %y: ref {.a: i32} = bind_name y, %y.var +// CHECK:STDOUT: %y.var: ref %.2 = var y +// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -50,15 +50,15 @@ var y: {.a: i32} = x; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: i32 = int_literal 4 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_27.1: {.a: i32} = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: init {.a: i32} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init {.a: i32} = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] +// 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: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref {.a: i32} = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.2 = 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 {.a: i32} = struct_init (%.loc12_20.2) to file.%y.var -// CHECK:STDOUT: %.loc12_21: init {.a: i32} = converted %x.ref, %.loc12_20.3 +// 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: 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 fe698a868e9b..05468d8ffba3 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -22,20 +22,20 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %MakeI32.type: type = fn_type @MakeI32 [template] -// CHECK:STDOUT: %MakeI32: = struct_value () [template] +// CHECK:STDOUT: %MakeI32: %MakeI32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %MakeF64.type: type = fn_type @MakeF64 [template] -// CHECK:STDOUT: %MakeF64: = struct_value () [template] +// CHECK:STDOUT: %MakeF64: %MakeF64.type = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: f64} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] -// CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: f64} [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 {.b: f64, .a: i32} [template] +// CHECK:STDOUT: %.6: type = ptr_type %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,24 +46,24 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %MakeI32.decl: = fn_decl @MakeI32 [template = constants.%MakeI32] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MakeI32.decl: %MakeI32.type = fn_decl @MakeI32 [template = constants.%MakeI32] { // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11, %.loc11_17.1 [template = i32] // CHECK:STDOUT: @MakeI32.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %MakeF64.decl: = fn_decl @MakeF64 [template = constants.%MakeF64] { +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %MakeF64.decl: %MakeF64.type = fn_decl @MakeF64 [template = constants.%MakeF64] { // CHECK:STDOUT: %.loc12_17.1: i32 = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc12: init type = call constants.%Float(%.loc12_17.1) [template = f64] // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %float.make_type.loc12 [template = f64] // CHECK:STDOUT: %.loc12_17.3: type = converted %float.make_type.loc12, %.loc12_17.2 [template = f64] // CHECK:STDOUT: @MakeF64.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // 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] @@ -72,12 +72,12 @@ fn F() -> {.a: i32, .b: 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: @F.%return: ref {.a: i32, .b: f64} = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -88,7 +88,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeF64() -> f64; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> %return: {.a: i32, .b: f64} { +// CHECK:STDOUT: fn @F() -> %return: %.3 { // 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] @@ -98,18 +98,18 @@ fn F() -> {.a: i32, .b: 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: %MakeF64.ref: = name_ref MakeF64, file.%MakeF64.decl [template = constants.%MakeF64] +// 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: = name_ref MakeI32, file.%MakeI32.decl [template = constants.%MakeI32] +// 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: {.b: f64, .a: i32} = struct_literal (%MakeF64.call, %MakeI32.call) +// CHECK:STDOUT: %.loc15_62.1: %.5 = 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: {.a: i32, .b: f64} = struct_value (%.loc15_62.3, %.loc15_62.5) -// CHECK:STDOUT: %.loc15_63: {.a: i32, .b: f64} = converted %.loc15_62.1, %struct.loc15 -// CHECK:STDOUT: %x: {.a: i32, .b: f64} = bind_name x, %.loc15_63 +// 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: i32 = int_literal 64 [template = constants.%.2] // 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] @@ -118,21 +118,21 @@ fn F() -> {.a: i32, .b: f64} { // 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: {.a: i32, .b: f64} = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.3 = 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: {.b: f64, .a: i32} = struct_value (%.loc16_31.1, %.loc16_31.2) -// CHECK:STDOUT: %.loc16_32: {.b: f64, .a: i32} = converted %x.ref, %struct.loc16 -// CHECK:STDOUT: %y: {.b: f64, .a: i32} = bind_name y, %.loc16_32 -// CHECK:STDOUT: %y.ref: {.b: f64, .a: i32} = name_ref y, %y +// 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: %.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 {.a: i32, .b: f64} = struct_init (%.loc17_10.3, %.loc17_10.6) to %return -// CHECK:STDOUT: %.loc17_11: init {.a: i32, .b: f64} = converted %y.ref, %.loc17_10.7 +// 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: 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 bdddd110a466..3e1ca07ecdbf 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -16,15 +16,15 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: (i32,)} [template] -// CHECK:STDOUT: %.5: type = ptr_type {.a: i32, .b: (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_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.7) [template] -// CHECK:STDOUT: %struct: {.a: i32, .b: (i32,)} = struct_value (%.6, %tuple) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.7) [template] +// CHECK:STDOUT: %struct: %.4 = struct_value (%.6, %tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,32 +34,32 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%Int32() [template = i32] // 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: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_27.1: (type,) = tuple_literal (%int.make_type_32.loc11_23) +// CHECK:STDOUT: %.loc11_27.1: %.2 = 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: (i32,)} [template = constants.%.4] -// CHECK:STDOUT: %x.var: ref {.a: i32, .b: (i32,)} = var x -// CHECK:STDOUT: %x: ref {.a: i32, .b: (i32,)} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12_23: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_27.1: (type,) = tuple_literal (%int.make_type_32.loc12_23) +// CHECK:STDOUT: %.loc12_27.1: %.2 = 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: (i32,)} [template = constants.%.4] -// CHECK:STDOUT: %y.var: ref {.a: i32, .b: (i32,)} = var y -// CHECK:STDOUT: %y: ref {.a: i32, .b: (i32,)} = bind_name y, %y.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -68,31 +68,31 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_38: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %.loc11_47: i32 = int_literal 2 [template = constants.%.7] -// CHECK:STDOUT: %.loc11_49.1: (i32,) = tuple_literal (%.loc11_47) -// CHECK:STDOUT: %.loc11_50.1: {.a: i32, .b: (i32,)} = struct_literal (%.loc11_38, %.loc11_49.1) +// 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_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 (i32,) = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_49.2: init (i32,) = tuple_init (%.loc11_47) to %.loc11_50.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.5: init (i32,) = converted %.loc11_49.1, %.loc11_49.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.6: init (i32,) = initialize_from %.loc11_50.5 to %.loc11_50.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.7: init {.a: i32, .b: (i32,)} = struct_init (%.loc11_50.3, %.loc11_50.6) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_51: init {.a: i32, .b: (i32,)} = converted %.loc11_50.1, %.loc11_50.7 [template = constants.%struct] +// 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: assign file.%x.var, %.loc11_51 -// CHECK:STDOUT: %x.ref: ref {.a: i32, .b: (i32,)} = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.4 = 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 (i32,) = struct_access %x.ref, element1 +// CHECK:STDOUT: %.loc12_32.5: ref %.3 = 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 (i32,) = struct_access file.%y.var, element1 -// CHECK:STDOUT: %.loc12_32.9: init (i32,) = tuple_init (%.loc12_32.7) to %.loc12_32.8 -// CHECK:STDOUT: %.loc12_32.10: init (i32,) = converted %.loc12_32.5, %.loc12_32.9 -// CHECK:STDOUT: %.loc12_32.11: init (i32,) = initialize_from %.loc12_32.10 to %.loc12_32.8 -// CHECK:STDOUT: %.loc12_32.12: init {.a: i32, .b: (i32,)} = struct_init (%.loc12_32.4, %.loc12_32.11) to file.%y.var -// CHECK:STDOUT: %.loc12_33: init {.a: i32, .b: (i32,)} = converted %x.ref, %.loc12_32.12 +// 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: 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 e4a03e64ccbf..91313db3834a 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -19,12 +19,12 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 {.a: i32, .b: i32} [template] +// CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,54 +34,54 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%Int32() [template = i32] // 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: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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_35: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_43: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_44: {.a: i32, .b: i32} = struct_literal (%.loc11_35, %.loc11_43) -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.loc11_35, %.loc11_43) [template = constants.%struct] -// CHECK:STDOUT: %.loc11_45: {.a: i32, .b: i32} = converted %.loc11_44, %struct [template = constants.%struct] -// CHECK:STDOUT: %v: {.a: i32, .b: i32} = bind_name v, %.loc11_45 -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.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: %v.ref: {.a: i32, .b: i32} = name_ref v, %v -// CHECK:STDOUT: %w: {.a: i32, .b: i32} = bind_name w, %v.ref -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %v.ref: %.2 = name_ref v, %v +// CHECK:STDOUT: %w: %.2 = bind_name w, %v.ref +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32, .b: i32} = var x -// CHECK:STDOUT: %x: ref {.a: i32, .b: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %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 {.a: i32, .b: i32} = var y -// CHECK:STDOUT: %y: ref {.a: i32, .b: i32} = bind_name y, %y.var +// CHECK:STDOUT: %y.var: ref %.2 = var y +// CHECK:STDOUT: %y: ref %.2 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -90,15 +90,15 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_35: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc14_43: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_44.1: {.a: i32, .b: i32} = struct_literal (%.loc14_35, %.loc14_43) +// CHECK:STDOUT: %.loc14_44.1: %.2 = 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.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 {.a: i32, .b: i32} = struct_init (%.loc14_44.3, %.loc14_44.5) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_45: init {.a: i32, .b: i32} = converted %.loc14_44.1, %.loc14_44.6 [template = constants.%struct] +// 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: assign file.%x.var, %.loc14_45 -// CHECK:STDOUT: %x.ref: ref {.a: i32, .b: i32} = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.2 = 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 @@ -107,8 +107,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 {.a: i32, .b: i32} = struct_init (%.loc15_29.4, %.loc15_29.8) to file.%y.var -// CHECK:STDOUT: %.loc15_30: init {.a: i32, .b: i32} = converted %x.ref, %.loc15_29.9 +// 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: assign file.%y.var, %.loc15_30 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_assign_nested.carbon b/toolchain/check/testdata/tuples/fail_assign_nested.carbon index e98709d423eb..5c3dd7a096d3 100644 --- a/toolchain/check/testdata/tuples/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_nested.carbon @@ -18,14 +18,14 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type ((type, 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 ((i32, i32), (i32, i32)) [template] -// CHECK:STDOUT: %.6: type = ptr_type (i32, i32) [template] -// CHECK:STDOUT: %.7: type = tuple_type ((i32, i32)*, (i32, i32)*) [template] -// CHECK:STDOUT: %.8: type = ptr_type ((i32, i32)*, (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_literal 1 [template] // CHECK:STDOUT: %.10: i32 = int_literal 2 [template] // CHECK:STDOUT: %.11: i32 = int_literal 3 [template] @@ -33,7 +33,7 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: %.13: i32 = int_literal 4 [template] // CHECK:STDOUT: %.14: i32 = int_literal 5 [template] // CHECK:STDOUT: %.15: i32 = int_literal 6 [template] -// CHECK:STDOUT: %.16: type = tuple_type ((i32, i32, i32), (i32, i32, i32)) [template] +// CHECK:STDOUT: %.16: type = tuple_type (%.12, %.12) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,17 +42,17 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_18: (type, type) = tuple_literal (%int.make_type_32.loc14_10, %int.make_type_32.loc14_15) -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc14_18: %.2 = tuple_literal (%int.make_type_32.loc14_10, %int.make_type_32.loc14_15) +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_30: (type, type) = tuple_literal (%int.make_type_32.loc14_22, %int.make_type_32.loc14_27) -// CHECK:STDOUT: %.loc14_31.1: ((type, type), (type, type)) = tuple_literal (%.loc14_18, %.loc14_30) +// 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_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] @@ -64,8 +64,8 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // 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 ((i32, i32), (i32, i32)) = var x -// CHECK:STDOUT: %x: ref ((i32, i32), (i32, i32)) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.5 = var x +// CHECK:STDOUT: %x: ref %.5 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -75,12 +75,12 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: %.loc14_37: i32 = int_literal 1 [template = constants.%.9] // CHECK:STDOUT: %.loc14_40: i32 = int_literal 2 [template = constants.%.10] // CHECK:STDOUT: %.loc14_43: i32 = int_literal 3 [template = constants.%.11] -// CHECK:STDOUT: %.loc14_44: (i32, i32, i32) = tuple_literal (%.loc14_37, %.loc14_40, %.loc14_43) +// CHECK:STDOUT: %.loc14_44: %.12 = tuple_literal (%.loc14_37, %.loc14_40, %.loc14_43) // CHECK:STDOUT: %.loc14_48: i32 = int_literal 4 [template = constants.%.13] // CHECK:STDOUT: %.loc14_51: i32 = int_literal 5 [template = constants.%.14] // CHECK:STDOUT: %.loc14_54: i32 = int_literal 6 [template = constants.%.15] -// CHECK:STDOUT: %.loc14_55: (i32, i32, i32) = tuple_literal (%.loc14_48, %.loc14_51, %.loc14_54) -// CHECK:STDOUT: %.loc14_56: ((i32, i32, i32), (i32, i32, i32)) = tuple_literal (%.loc14_44, %.loc14_55) +// 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: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon index e6c4625d7b49..caee75d5e7d9 100644 --- a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon @@ -18,10 +18,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: f64 = float_literal 65.890000000000001 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, f64) [template] @@ -33,18 +33,18 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) +// CHECK:STDOUT: %.loc14_17.1: %.2 = 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 (i32, i32) = var x -// CHECK:STDOUT: %x: ref (i32, i32) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -53,7 +53,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_22: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc14_25: f64 = float_literal 65.890000000000001 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_30.1: (i32, f64) = tuple_literal (%.loc14_22, %.loc14_25) +// CHECK:STDOUT: %.loc14_30.1: %.7 = tuple_literal (%.loc14_22, %.loc14_25) // CHECK:STDOUT: %.loc14_30.2: ref i32 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_30.3: init i32 = initialize_from %.loc14_22 to %.loc14_30.2 [template = constants.%.5] // CHECK:STDOUT: assign file.%x.var, diff --git a/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon index d39718b25412..3c3ed4013254 100644 --- a/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon @@ -26,10 +26,10 @@ var p: Incomplete* = &t[1]; // 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: %Int32: = struct_value () [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: %.3: type = tuple_type (i32, %Incomplete) [template] +// CHECK:STDOUT: %.4: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,19 +42,19 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} -// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // 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: (type, type) = tuple_literal (%int.make_type_32, %Incomplete.ref.loc19) +// CHECK:STDOUT: %.loc19_24.1: %.2 = 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: %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 Incomplete* = var p -// CHECK:STDOUT: %p: ref Incomplete* = bind_name p, %p.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete; diff --git a/toolchain/check/testdata/tuples/fail_too_few_element.carbon b/toolchain/check/testdata/tuples/fail_too_few_element.carbon index d079bb258697..21dd384c4393 100644 --- a/toolchain/check/testdata/tuples/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuples/fail_too_few_element.carbon @@ -18,10 +18,10 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: type = tuple_type (i32) [template] // CHECK:STDOUT: } @@ -32,18 +32,18 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) +// CHECK:STDOUT: %.loc14_17.1: %.2 = 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 (i32, i32) = var x -// CHECK:STDOUT: %x: ref (i32, i32) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -51,7 +51,7 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_22: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_25: (i32,) = tuple_literal (%.loc14_22) +// CHECK:STDOUT: %.loc14_25: %.6 = tuple_literal (%.loc14_22) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_type_assign.carbon b/toolchain/check/testdata/tuples/fail_type_assign.carbon index b226e8143a85..40684c8344e1 100644 --- a/toolchain/check/testdata/tuples/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuples/fail_type_assign.carbon @@ -18,7 +18,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: } @@ -29,15 +29,15 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_14.1: (type,) = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc14_14.1: %.2 = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc14_14.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_14.3: type = converted %int.make_type_32, %.loc14_14.2 [template = i32] // CHECK:STDOUT: %.loc14_14.4: type = converted %.loc14_14.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %x.var: ref (i32,) = var x -// CHECK:STDOUT: %x: ref (i32,) = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -45,7 +45,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: %.loc14: (type,) = tuple_literal (%int.make_type_32) +// CHECK:STDOUT: %.loc14: %.2 = tuple_literal (%int.make_type_32) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_value_as_type.carbon b/toolchain/check/testdata/tuples/fail_value_as_type.carbon index c7963ae7b30a..e41c4c52c9d6 100644 --- a/toolchain/check/testdata/tuples/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuples/fail_value_as_type.carbon @@ -27,7 +27,7 @@ var x: (1, ); // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc14_9: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc14_12: (i32,) = tuple_literal (%.loc14_9) +// CHECK:STDOUT: %.loc14_12: %.2 = tuple_literal (%.loc14_9) // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/import.carbon b/toolchain/check/testdata/tuples/import.carbon index 14898600c54e..28d555bc9127 100644 --- a/toolchain/check/testdata/tuples/import.carbon +++ b/toolchain/check/testdata/tuples/import.carbon @@ -27,27 +27,27 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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_literal 0 [template] -// CHECK:STDOUT: %tuple.1: (i32,) = tuple_value (%.4) [template] -// CHECK:STDOUT: %.5: type = tuple_type ((type,), type) [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 (((type,), type), (type, type)) [template] -// CHECK:STDOUT: %.8: type = tuple_type ((i32,), i32) [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 (((i32,), i32), (i32, i32)) [template] -// CHECK:STDOUT: %.11: type = ptr_type (i32, i32) [template] -// CHECK:STDOUT: %.12: type = ptr_type ((i32,), i32) [template] -// CHECK:STDOUT: %.13: type = tuple_type (((i32,), i32)*, (i32, i32)*) [template] -// CHECK:STDOUT: %.14: type = ptr_type (((i32,), i32)*, (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_literal 1 [template] // CHECK:STDOUT: %.16: i32 = int_literal 2 [template] // CHECK:STDOUT: %.17: i32 = int_literal 3 [template] -// CHECK:STDOUT: %tuple.2: ((i32,), i32) = tuple_value (%tuple.1, %.15) [template] -// CHECK:STDOUT: %tuple.3: (i32, i32) = tuple_value (%.16, %.17) [template] -// CHECK:STDOUT: %tuple.4: (((i32,), i32), (i32, i32)) = tuple_value (%tuple.2, %tuple.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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,26 +57,26 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: .b_ref = %b_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_17.1: (type,) = tuple_literal (%int.make_type_32.loc4) +// CHECK:STDOUT: %.loc4_17.1: %.2 = 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 (i32,) = var a_ref -// CHECK:STDOUT: %a_ref: ref (i32,) = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_19: (type,) = tuple_literal (%int.make_type_32.loc5_15) -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_19: %.2 = tuple_literal (%int.make_type_32.loc5_15) +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_25: ((type,), type) = tuple_literal (%.loc5_19, %int.make_type_32.loc5_22) -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_25: %.5 = tuple_literal (%.loc5_19, %int.make_type_32.loc5_22) +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_29: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_34: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_37: (type, type) = tuple_literal (%int.make_type_32.loc5_29, %int.make_type_32.loc5_34) -// CHECK:STDOUT: %.loc5_38.1: (((type,), type), (type, type)) = tuple_literal (%.loc5_25, %.loc5_37) +// 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_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] @@ -89,8 +89,8 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // 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 (((i32,), i32), (i32, i32)) = var b_ref -// CHECK:STDOUT: %b_ref: ref (((i32,), i32), (i32, i32)) = bind_name b_ref, %b_ref.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -98,36 +98,36 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_22: i32 = int_literal 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_24.1: (i32,) = tuple_literal (%.loc4_22) -// CHECK:STDOUT: %.loc4_24.2: init (i32,) = tuple_init (%.loc4_22) to file.%a_ref.var [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc4_25: init (i32,) = converted %.loc4_24.1, %.loc4_24.2 [template = constants.%tuple.1] +// 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: assign file.%a_ref.var, %.loc4_25 // CHECK:STDOUT: %.loc5_45: i32 = int_literal 0 [template = constants.%.4] -// CHECK:STDOUT: %.loc5_47.1: (i32,) = tuple_literal (%.loc5_45) +// CHECK:STDOUT: %.loc5_47.1: %.3 = tuple_literal (%.loc5_45) // CHECK:STDOUT: %.loc5_50: i32 = int_literal 1 [template = constants.%.15] -// CHECK:STDOUT: %.loc5_51.1: ((i32,), i32) = tuple_literal (%.loc5_47.1, %.loc5_50) +// CHECK:STDOUT: %.loc5_51.1: %.8 = tuple_literal (%.loc5_47.1, %.loc5_50) // CHECK:STDOUT: %.loc5_55: i32 = int_literal 2 [template = constants.%.16] // CHECK:STDOUT: %.loc5_58: i32 = int_literal 3 [template = constants.%.17] -// CHECK:STDOUT: %.loc5_59.1: (i32, i32) = tuple_literal (%.loc5_55, %.loc5_58) -// CHECK:STDOUT: %.loc5_60.1: (((i32,), i32), (i32, i32)) = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %.loc5_60.2: ref ((i32,), i32) = tuple_access file.%b_ref.var, element0 -// CHECK:STDOUT: %.loc5_51.2: ref (i32,) = tuple_access %.loc5_60.2, element0 -// CHECK:STDOUT: %.loc5_47.2: init (i32,) = tuple_init (%.loc5_45) to %.loc5_51.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.3: init (i32,) = converted %.loc5_47.1, %.loc5_47.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.4: init (i32,) = initialize_from %.loc5_51.3 to %.loc5_51.2 [template = constants.%tuple.1] +// 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_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 ((i32,), i32) = tuple_init (%.loc5_51.4, %.loc5_51.6) to %.loc5_60.2 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_60.3: init ((i32,), i32) = converted %.loc5_51.1, %.loc5_51.7 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_60.4: ref (i32, i32) = tuple_access file.%b_ref.var, element1 +// 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_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.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 (i32, i32) = tuple_init (%.loc5_59.3, %.loc5_59.5) to %.loc5_60.4 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc5_60.5: init (i32, i32) = converted %.loc5_59.1, %.loc5_59.6 [template = constants.%tuple.3] -// CHECK:STDOUT: %.loc5_60.6: init (((i32,), i32), (i32, i32)) = tuple_init (%.loc5_60.3, %.loc5_60.5) to file.%b_ref.var [template = constants.%tuple.4] -// CHECK:STDOUT: %.loc5_61: init (((i32,), i32), (i32, i32)) = converted %.loc5_60.1, %.loc5_60.6 [template = constants.%tuple.4] +// 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: assign file.%b_ref.var, %.loc5_61 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -137,19 +137,19 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 ((type,), type) [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 (((type,), type), (type, type)) [template] -// CHECK:STDOUT: %.7: type = tuple_type ((i32,), i32) [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 (((i32,), i32), (i32, i32)) [template] -// CHECK:STDOUT: %.10: type = ptr_type (i32, i32) [template] -// CHECK:STDOUT: %.11: type = ptr_type ((i32,), i32) [template] -// CHECK:STDOUT: %.12: type = tuple_type (((i32,), i32)*, (i32, i32)*) [template] -// CHECK:STDOUT: %.13: type = ptr_type (((i32,), i32)*, (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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -160,29 +160,29 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: ref (i32,) = import_ref ir0, inst+16, loaded -// CHECK:STDOUT: %import_ref.2: ref (((i32,), i32), (i32, i32)) = import_ref ir0, inst+60, loaded +// CHECK:STDOUT: %import_ref.1: ref %.3 = import_ref ir0, inst+16, loaded +// CHECK:STDOUT: %import_ref.2: ref %.9 = import_ref ir0, inst+60, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_13.1: (type,) = tuple_literal (%int.make_type_32.loc4) +// CHECK:STDOUT: %.loc4_13.1: %.2 = 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 (i32,) = var a -// CHECK:STDOUT: %a: ref (i32,) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %a.var: ref %.3 = var a +// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_15: (type,) = tuple_literal (%int.make_type_32.loc5_11) -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_15: %.2 = tuple_literal (%int.make_type_32.loc5_11) +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_21: ((type,), type) = tuple_literal (%.loc5_15, %int.make_type_32.loc5_18) -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc5_21: %.4 = tuple_literal (%.loc5_15, %int.make_type_32.loc5_18) +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_25: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc5_30: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc5_33: (type, type) = tuple_literal (%int.make_type_32.loc5_25, %int.make_type_32.loc5_30) -// CHECK:STDOUT: %.loc5_34.1: (((type,), type), (type, type)) = tuple_literal (%.loc5_21, %.loc5_33) +// 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_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] @@ -195,50 +195,50 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // 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 (((i32,), i32), (i32, i32)) = var b -// CHECK:STDOUT: %b: ref (((i32,), i32), (i32, i32)) = bind_name b, %b.var +// CHECK:STDOUT: %b.var: ref %.9 = var b +// CHECK:STDOUT: %b: ref %.9 = 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: %a_ref.ref: ref (i32,) = name_ref a_ref, file.%import_ref.1 +// CHECK:STDOUT: %a_ref.ref: ref %.3 = name_ref a_ref, file.%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 (i32,) = tuple_init (%.loc4_17.2) to file.%a.var -// CHECK:STDOUT: %.loc4_22: init (i32,) = converted %a_ref.ref, %.loc4_17.3 +// 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: assign file.%a.var, %.loc4_22 -// CHECK:STDOUT: %b_ref.ref: ref (((i32,), i32), (i32, i32)) = name_ref b_ref, file.%import_ref.2 -// CHECK:STDOUT: %.loc5_38.1: ref ((i32,), i32) = tuple_access %b_ref.ref, element0 -// CHECK:STDOUT: %.loc5_38.2: ref (i32,) = tuple_access %.loc5_38.1, element0 +// CHECK:STDOUT: %b_ref.ref: ref %.9 = name_ref b_ref, file.%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: %.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 ((i32,), i32) = tuple_access file.%b.var, element0 -// CHECK:STDOUT: %.loc5_38.6: ref (i32,) = tuple_access %.loc5_38.5, element0 -// CHECK:STDOUT: %.loc5_38.7: init (i32,) = tuple_init (%.loc5_38.4) to %.loc5_38.6 -// CHECK:STDOUT: %.loc5_38.8: init (i32,) = converted %.loc5_38.2, %.loc5_38.7 -// CHECK:STDOUT: %.loc5_38.9: init (i32,) = initialize_from %.loc5_38.8 to %.loc5_38.6 +// 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.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 ((i32,), i32) = tuple_init (%.loc5_38.9, %.loc5_38.13) to %.loc5_38.5 -// CHECK:STDOUT: %.loc5_38.15: init ((i32,), i32) = converted %.loc5_38.1, %.loc5_38.14 -// CHECK:STDOUT: %.loc5_38.16: ref (i32, i32) = tuple_access %b_ref.ref, element1 +// 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.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 (i32, i32) = tuple_access file.%b.var, element1 +// CHECK:STDOUT: %.loc5_38.19: ref %.8 = 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 (i32, i32) = tuple_init (%.loc5_38.21, %.loc5_38.25) to %.loc5_38.19 -// CHECK:STDOUT: %.loc5_38.27: init (i32, i32) = converted %.loc5_38.16, %.loc5_38.26 -// CHECK:STDOUT: %.loc5_38.28: init (((i32,), i32), (i32, i32)) = tuple_init (%.loc5_38.15, %.loc5_38.27) to file.%b.var -// CHECK:STDOUT: %.loc5_43: init (((i32,), i32), (i32, i32)) = converted %b_ref.ref, %.loc5_38.28 +// 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: assign file.%b.var, %.loc5_43 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/nested_tuple.carbon b/toolchain/check/testdata/tuples/nested_tuple.carbon index cebaa605445b..75ee70b3437a 100644 --- a/toolchain/check/testdata/tuples/nested_tuple.carbon +++ b/toolchain/check/testdata/tuples/nested_tuple.carbon @@ -15,19 +15,19 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %.3: type = tuple_type ((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 ((i32, i32), i32) [template] -// CHECK:STDOUT: %.6: type = ptr_type (i32, i32) [template] -// CHECK:STDOUT: %.7: type = tuple_type ((i32, i32)*, i32) [template] -// CHECK:STDOUT: %.8: type = ptr_type ((i32, 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_literal 12 [template] // CHECK:STDOUT: %.10: i32 = int_literal 76 [template] // CHECK:STDOUT: %.11: i32 = int_literal 6 [template] -// CHECK:STDOUT: %tuple.1: (i32, i32) = tuple_value (%.9, %.10) [template] -// CHECK:STDOUT: %tuple.2: ((i32, i32), i32) = tuple_value (%tuple.1, %.11) [template] +// CHECK:STDOUT: %tuple.1: %.4 = tuple_value (%.9, %.10) [template] +// CHECK:STDOUT: %tuple.2: %.5 = tuple_value (%tuple.1, %.11) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,14 +36,14 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_18: (type, type) = tuple_literal (%int.make_type_32.loc11_10, %int.make_type_32.loc11_15) -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.loc11_18: %.2 = tuple_literal (%int.make_type_32.loc11_10, %int.make_type_32.loc11_15) +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_24.1: ((type, type), type) = tuple_literal (%.loc11_18, %int.make_type_32.loc11_21) +// CHECK:STDOUT: %.loc11_24.1: %.3 = 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] @@ -52,8 +52,8 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // 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 ((i32, i32), i32) = var x -// CHECK:STDOUT: %x: ref ((i32, i32), i32) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.5 = var x +// CHECK:STDOUT: %x: ref %.5 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -62,20 +62,20 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_30: i32 = int_literal 12 [template = constants.%.9] // CHECK:STDOUT: %.loc11_34: i32 = int_literal 76 [template = constants.%.10] -// CHECK:STDOUT: %.loc11_36.1: (i32, i32) = tuple_literal (%.loc11_30, %.loc11_34) +// CHECK:STDOUT: %.loc11_36.1: %.4 = tuple_literal (%.loc11_30, %.loc11_34) // CHECK:STDOUT: %.loc11_39: i32 = int_literal 6 [template = constants.%.11] -// CHECK:STDOUT: %.loc11_40.1: ((i32, i32), i32) = tuple_literal (%.loc11_36.1, %.loc11_39) -// CHECK:STDOUT: %.loc11_40.2: ref (i32, i32) = tuple_access file.%x.var, element0 +// 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_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.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 (i32, i32) = tuple_init (%.loc11_36.3, %.loc11_36.5) to %.loc11_40.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_40.3: init (i32, i32) = converted %.loc11_36.1, %.loc11_36.6 [template = constants.%tuple.1] +// 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_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 ((i32, i32), i32) = tuple_init (%.loc11_40.3, %.loc11_40.5) to file.%x.var [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc11_41: init ((i32, i32), i32) = converted %.loc11_40.1, %.loc11_40.6 [template = constants.%tuple.2] +// 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: assign file.%x.var, %.loc11_41 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon index d55150ce522f..3b2801c33263 100644 --- a/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon @@ -23,24 +23,24 @@ fn H() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] -// CHECK:STDOUT: %.4: type = tuple_type ((type, type, type), (type, type, type)) [template] -// CHECK:STDOUT: %.5: type = tuple_type ((i32, i32, i32), (i32, i32, i32)) [template] -// CHECK:STDOUT: %.6: type = ptr_type (i32, i32, i32) [template] -// CHECK:STDOUT: %.7: type = tuple_type ((i32, i32, i32)*, (i32, i32, i32)*) [template] -// CHECK:STDOUT: %.8: type = ptr_type ((i32, i32, i32)*, (i32, i32, i32)*) [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: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] -// CHECK:STDOUT: %.9: type = tuple_type (type, (type, type, type), type) [template] -// CHECK:STDOUT: %.10: type = tuple_type (i32, (i32, i32, i32), i32) [template] -// CHECK:STDOUT: %.11: type = tuple_type (i32, (i32, i32, i32)*, i32) [template] -// CHECK:STDOUT: %.12: type = ptr_type (i32, (i32, i32, i32)*, i32) [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_literal 1 [template] // CHECK:STDOUT: %.14: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -53,14 +53,14 @@ fn H() { // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %int.make_type_32.loc11_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: (type, type, type) = 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: %.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.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] @@ -68,38 +68,38 @@ fn H() { // 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: @F.%return: ref (i32, i32, i32) = var +// CHECK:STDOUT: @F.%return: ref %.3 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} -// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> (i32, i32, i32); +// CHECK:STDOUT: fn @F() -> %.3; // 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: (type, type, type) = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22) +// 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: %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: (type, type, type) = 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: ((type, type, type), (type, type, type)) = tuple_literal (%.loc14_25, %.loc14_42) +// 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_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] @@ -115,17 +115,17 @@ fn H() { // 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 ((i32, i32, i32), (i32, i32, i32)) = var v -// CHECK:STDOUT: %v: ref ((i32, i32, i32), (i32, i32, i32)) = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14_48: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_56.1: ref (i32, i32, i32) = tuple_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_49: init (i32, i32, i32) = call %F.ref.loc14_48() to %.loc14_56.1 -// CHECK:STDOUT: %F.ref.loc14_53: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_56.2: ref (i32, i32, i32) = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_54: init (i32, i32, i32) = call %F.ref.loc14_53() to %.loc14_56.2 -// CHECK:STDOUT: %.loc14_56.3: ((i32, i32, i32), (i32, i32, i32)) = tuple_literal (%F.call.loc14_49, %F.call.loc14_54) -// CHECK:STDOUT: %.loc14_56.4: init ((i32, i32, i32), (i32, i32, i32)) = tuple_init (%F.call.loc14_49, %F.call.loc14_54) to %v.var -// CHECK:STDOUT: %.loc14_57: init ((i32, i32, i32), (i32, i32, i32)) = converted %.loc14_56.3, %.loc14_56.4 +// CHECK:STDOUT: %v.var: ref %.5 = var v +// CHECK:STDOUT: %v: ref %.5 = 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: %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: assign %v.var, %.loc14_57 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -136,9 +136,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: (type, type, type) = tuple_literal (%int.make_type_32.loc18_17, %int.make_type_32.loc18_22, %int.make_type_32.loc18_27) +// 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: %int.make_type_32.loc18_33: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc18_36.1: (type, (type, type, type), type) = tuple_literal (%int.make_type_32.loc18_11, %.loc18_30, %int.make_type_32.loc18_33) +// 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.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] @@ -151,20 +151,20 @@ fn H() { // 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 (i32, (i32, i32, i32), i32) = var v -// CHECK:STDOUT: %v: ref (i32, (i32, i32, i32), i32) = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref %.10 = var v +// CHECK:STDOUT: %v: ref %.10 = bind_name v, %v.var // CHECK:STDOUT: %.loc18_41: i32 = int_literal 1 [template = constants.%.13] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc18_50.1: ref (i32, i32, i32) = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call: init (i32, i32, i32) = call %F.ref() to %.loc18_50.1 +// 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_literal 2 [template = constants.%.14] -// CHECK:STDOUT: %.loc18_50.2: (i32, (i32, i32, i32), i32) = tuple_literal (%.loc18_41, %F.call, %.loc18_49) +// CHECK:STDOUT: %.loc18_50.2: %.10 = 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.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 (i32, (i32, i32, i32), i32) = tuple_init (%.loc18_50.4, %F.call, %.loc18_50.6) to %v.var -// CHECK:STDOUT: %.loc18_51: init (i32, (i32, i32, i32), i32) = converted %.loc18_50.2, %.loc18_50.7 +// 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: assign %v.var, %.loc18_51 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/no_prelude/empty.carbon b/toolchain/check/testdata/tuples/no_prelude/empty.carbon index 326b1a6b2e3c..3b349c9e2c48 100644 --- a/toolchain/check/testdata/tuples/no_prelude/empty.carbon +++ b/toolchain/check/testdata/tuples/no_prelude/empty.carbon @@ -15,7 +15,7 @@ var y: () = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = 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: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () +// 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 () = var y -// CHECK:STDOUT: %y: ref () = bind_name y, %y.var +// 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_14.1: () = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: init () = tuple_init () to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_15: init () = converted %.loc11_14.1, %.loc11_14.2 [template = constants.%tuple] +// 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: assign file.%x.var, %.loc11_15 -// CHECK:STDOUT: %x.ref: ref () = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_13: init () = tuple_init () to file.%y.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_14: init () = converted %x.ref, %.loc12_13 [template = constants.%tuple] +// 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: assign file.%y.var, %.loc12_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/no_prelude/fail_assign_empty.carbon b/toolchain/check/testdata/tuples/no_prelude/fail_assign_empty.carbon index a873f63ee083..f71e2d96631f 100644 --- a/toolchain/check/testdata/tuples/no_prelude/fail_assign_empty.carbon +++ b/toolchain/check/testdata/tuples/no_prelude/fail_assign_empty.carbon @@ -17,24 +17,24 @@ var x: ((),) = (); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type (()) [template] +// CHECK:STDOUT: %.2: type = tuple_type (%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_10: () = tuple_literal () -// CHECK:STDOUT: %.loc14_12.1: ((),) = tuple_literal (%.loc14_10) +// 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 ((),) = var x -// CHECK:STDOUT: %x: ref ((),) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14: () = tuple_literal () +// CHECK:STDOUT: %.loc14: %.1 = tuple_literal () // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/no_prelude/fail_assign_to_empty.carbon b/toolchain/check/testdata/tuples/no_prelude/fail_assign_to_empty.carbon index 5d34c7b66944..8daa5fd058c9 100644 --- a/toolchain/check/testdata/tuples/no_prelude/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/tuples/no_prelude/fail_assign_to_empty.carbon @@ -17,23 +17,23 @@ var x: () = ((),); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = tuple_type (()) [template] +// CHECK:STDOUT: %.2: type = tuple_type (%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_9.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// 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: %.loc14_15: () = tuple_literal () -// CHECK:STDOUT: %.loc14_17: ((),) = tuple_literal (%.loc14_15) +// CHECK:STDOUT: %.loc14_15: %.1 = tuple_literal () +// CHECK:STDOUT: %.loc14_17: %.2 = tuple_literal (%.loc14_15) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/one_element.carbon b/toolchain/check/testdata/tuples/one_element.carbon index 76efb4182a02..1f1bdb9ef972 100644 --- a/toolchain/check/testdata/tuples/one_element.carbon +++ b/toolchain/check/testdata/tuples/one_element.carbon @@ -16,11 +16,11 @@ var y: (i32,) = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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_literal 4 [template] -// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,22 +30,22 @@ var y: (i32,) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_13.1: (type,) = tuple_literal (%int.make_type_32.loc11) +// CHECK:STDOUT: %.loc11_13.1: %.2 = 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 (i32,) = var x -// CHECK:STDOUT: %x: ref (i32,) = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_13.1: (type,) = tuple_literal (%int.make_type_32.loc12) +// CHECK:STDOUT: %.loc12_13.1: %.2 = 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 (i32,) = var y -// CHECK:STDOUT: %y: ref (i32,) = bind_name y, %y.var +// 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"; @@ -53,15 +53,15 @@ var y: (i32,) = x; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_18: i32 = int_literal 4 [template = constants.%.4] -// CHECK:STDOUT: %.loc11_20.1: (i32,) = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_20.2: init (i32,) = tuple_init (%.loc11_18) to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_21: init (i32,) = converted %.loc11_20.1, %.loc11_20.2 [template = constants.%tuple] +// 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: assign file.%x.var, %.loc11_21 -// CHECK:STDOUT: %x.ref: ref (i32,) = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.3 = 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 (i32,) = tuple_init (%.loc12_17.2) to file.%y.var -// CHECK:STDOUT: %.loc12_18: init (i32,) = converted %x.ref, %.loc12_17.3 +// 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: assign file.%y.var, %.loc12_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/two_elements.carbon b/toolchain/check/testdata/tuples/two_elements.carbon index 38e83ebab6cd..dcd18f5c2d41 100644 --- a/toolchain/check/testdata/tuples/two_elements.carbon +++ b/toolchain/check/testdata/tuples/two_elements.carbon @@ -19,13 +19,13 @@ var y: (i32, i32) = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: = struct_value () [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 (i32, i32) [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] // CHECK:STDOUT: %.5: i32 = int_literal 4 [template] // CHECK:STDOUT: %.6: i32 = int_literal 102 [template] -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] +// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,11 +35,11 @@ var y: (i32, i32) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) +// CHECK:STDOUT: %.loc11_17.1: %.2 = 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] @@ -47,46 +47,46 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %.loc11_22: i32 = int_literal 4 [template = constants.%.5] // CHECK:STDOUT: %.loc11_25: i32 = int_literal 102 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_28: (i32, i32) = tuple_literal (%.loc11_22, %.loc11_25) -// CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.loc11_22, %.loc11_25) [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_29: (i32, i32) = converted %.loc11_28, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %v: (i32, i32) = bind_name v, %.loc11_29 -// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// 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: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc12_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_17.1: (type, type) = tuple_literal (%int.make_type_32.loc12_9, %int.make_type_32.loc12_14) +// CHECK:STDOUT: %.loc12_17.1: %.2 = 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: %v.ref: (i32, i32) = name_ref v, %v -// CHECK:STDOUT: %w: (i32, i32) = bind_name w, %v.ref -// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %v.ref: %.3 = name_ref v, %v +// CHECK:STDOUT: %w: %.3 = bind_name w, %v.ref +// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) +// CHECK:STDOUT: %.loc14_17.1: %.2 = 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 (i32, i32) = var x -// CHECK:STDOUT: %x: ref (i32, i32) = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %x.var: ref %.3 = var x +// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var +// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc15_9: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %int.make_type_32.loc15_14: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc15_17.1: (type, type) = tuple_literal (%int.make_type_32.loc15_9, %int.make_type_32.loc15_14) +// CHECK:STDOUT: %.loc15_17.1: %.2 = 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 (i32, i32) = var y -// CHECK:STDOUT: %y: ref (i32, i32) = bind_name y, %y.var +// 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"; @@ -95,15 +95,15 @@ var y: (i32, i32) = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_22: i32 = int_literal 4 [template = constants.%.5] // CHECK:STDOUT: %.loc14_25: i32 = int_literal 102 [template = constants.%.6] -// CHECK:STDOUT: %.loc14_28.1: (i32, i32) = tuple_literal (%.loc14_22, %.loc14_25) +// CHECK:STDOUT: %.loc14_28.1: %.3 = 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.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 (i32, i32) = tuple_init (%.loc14_28.3, %.loc14_28.5) to file.%x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_29: init (i32, i32) = converted %.loc14_28.1, %.loc14_28.6 [template = constants.%tuple] +// 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: assign file.%x.var, %.loc14_29 -// CHECK:STDOUT: %x.ref: ref (i32, i32) = name_ref x, file.%x +// CHECK:STDOUT: %x.ref: ref %.3 = 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 @@ -112,8 +112,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 (i32, i32) = tuple_init (%.loc15_21.4, %.loc15_21.8) to file.%y.var -// CHECK:STDOUT: %.loc15_22: init (i32, i32) = converted %x.ref, %.loc15_21.9 +// 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: 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 efc32314a479..496431c85c8d 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -34,8 +34,8 @@ fn F(x: X) { // 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: %F: = struct_value () [template] -// CHECK:STDOUT: %.3: type = ptr_type {} [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [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: } @@ -48,10 +48,10 @@ fn F(x: X) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %X.ref: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %x.loc14_6.1: X = param x -// CHECK:STDOUT: @F.%x: X = bind_name x, %x.loc14_6.1 +// CHECK:STDOUT: %x.loc14_6.1: %X = param x +// CHECK:STDOUT: @F.%x: %X = bind_name x, %x.loc14_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -60,16 +60,16 @@ fn F(x: X) { // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%x: X) { +// CHECK:STDOUT: 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.%.5] // CHECK:STDOUT: assign %s.var, // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %y.var: ref X = var y -// CHECK:STDOUT: %y: ref X = bind_name y, %y.var -// CHECK:STDOUT: %x.ref: X = name_ref x, %x +// CHECK:STDOUT: %y.var: ref %X = var y +// CHECK:STDOUT: %y: ref %X = bind_name y, %y.var +// CHECK:STDOUT: %x.ref: %X = name_ref x, %x // CHECK:STDOUT: assign %y.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index 9e2c499c02a5..ec11996d0e10 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -20,7 +20,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -30,7 +30,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { 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 529c524acc82..6760dc4d2ba3 100644 --- a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon +++ b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon @@ -60,10 +60,10 @@ var y2: bool = false or true; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,21 +75,21 @@ var y2: bool = false or true; // CHECK:STDOUT: .y2 = %y2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.loc23_9.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var -// CHECK:STDOUT: %.loc37_10.1: () = tuple_literal () +// 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 () = var x2 -// CHECK:STDOUT: %x2: ref () = bind_name x2, %x2.var -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %x2.var: ref %.1 = var x2 +// CHECK:STDOUT: %x2: ref %.1 = bind_name x2, %x2.var +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // 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] // CHECK:STDOUT: %y.var: ref bool = var y // CHECK:STDOUT: %y: ref bool = bind_name y, %y.var -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type.loc56: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc56_9.1: type = value_of_initializer %bool.make_type.loc56 [template = bool] // CHECK:STDOUT: %.loc56_9.2: type = converted %bool.make_type.loc56, %.loc56_9.1 [template = bool] diff --git a/toolchain/check/testdata/var/no_prelude/decl.carbon b/toolchain/check/testdata/var/no_prelude/decl.carbon index 840f58080fce..515e85bee9af 100644 --- a/toolchain/check/testdata/var/no_prelude/decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl.carbon @@ -17,22 +17,22 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = 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 9c836ac7e6cd..2c0a35cdd1d6 100644 --- a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon @@ -17,26 +17,26 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init () = tuple_init () to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init () = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// 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: 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 73eb893073df..04c9816ff614 100644 --- a/toolchain/check/testdata/var/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/var/no_prelude/export_name.carbon @@ -57,10 +57,10 @@ var w: () = v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () +// 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 () = var v -// CHECK:STDOUT: %v: ref () = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref %.1 = var v +// CHECK:STDOUT: %v: ref %.1 = bind_name v, %v.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon @@ -73,15 +73,15 @@ var w: () = v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: ref () = import_ref ir1, inst+5, loaded -// CHECK:STDOUT: %v: ref () = export v, %import_ref +// CHECK:STDOUT: %import_ref: ref %.1 = import_ref ir1, inst+5, loaded +// CHECK:STDOUT: %v: ref %.1 = export v, %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: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,18 +89,18 @@ var w: () = v; // CHECK:STDOUT: .v = %import_ref // CHECK:STDOUT: .w = %w // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: ref () = import_ref ir1, inst+3, loaded [template = ] -// CHECK:STDOUT: %.loc15_9.1: () = tuple_literal () +// CHECK:STDOUT: %import_ref: ref %.1 = import_ref ir1, inst+3, loaded [template = ] +// 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: %w.var: ref () = var w -// CHECK:STDOUT: %w: ref () = bind_name w, %w.var +// CHECK:STDOUT: %w.var: ref %.1 = var w +// CHECK:STDOUT: %w: ref %.1 = bind_name w, %w.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: ref () = name_ref v, file.%import_ref [template = ] -// CHECK:STDOUT: %.loc15_13: init () = tuple_init () to file.%w.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_14: init () = converted %v.ref, %.loc15_13 [template = constants.%tuple] +// CHECK:STDOUT: %v.ref: ref %.1 = name_ref v, file.%import_ref [template = ] +// CHECK:STDOUT: %.loc15_13: init %.1 = tuple_init () to file.%w.var [template = constants.%tuple] +// CHECK:STDOUT: %.loc15_14: init %.1 = converted %v.ref, %.loc15_13 [template = constants.%tuple] // CHECK:STDOUT: assign file.%w.var, %.loc15_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 5f52e9f8b4fe..16b710446314 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon @@ -25,34 +25,34 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x.loc13: ref () = bind_name x, %x.var.loc13 -// CHECK:STDOUT: %.loc13_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc13_16.2: init () = tuple_init () to %x.var.loc13 [template = constants.%tuple] -// CHECK:STDOUT: %.loc13_17: init () = converted %.loc13_16.1, %.loc13_16.2 [template = constants.%tuple] +// 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: assign %x.var.loc13, %.loc13_17 -// CHECK:STDOUT: %.loc20_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x.loc20: ref () = bind_name x, %x.var.loc20 -// CHECK:STDOUT: %.loc20_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc20_16.2: init () = tuple_init () to %x.var.loc20 [template = constants.%tuple] -// CHECK:STDOUT: %.loc20_17: init () = converted %.loc20_16.1, %.loc20_16.2 [template = constants.%tuple] +// 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: 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 a6534eeb888f..74cf89cb8dca 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon @@ -20,27 +20,27 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %x: () = bind_symbolic_name x 0 [symbolic] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %x: %.1 = bind_symbolic_name x 0 [symbolic] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_12.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: () = bind_symbolic_name x 0, %x.var [symbolic = constants.%x] -// CHECK:STDOUT: %.loc15_17.1: () = tuple_literal () -// CHECK:STDOUT: %.loc15_17.2: init () = tuple_init () to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_18: init () = converted %.loc15_17.1, %.loc15_17.2 [template = constants.%tuple] +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: %.1 = bind_symbolic_name x 0, %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: 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 94b42a0ff1c5..8c91d9970021 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 @@ -20,7 +20,7 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -28,16 +28,16 @@ fn Main() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: {} = struct_literal () +// 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 {} = var x -// CHECK:STDOUT: %x: ref {} = bind_name x, %x.var -// CHECK:STDOUT: %.loc15_16: () = tuple_literal () +// CHECK:STDOUT: %x.var: ref %.2 = var x +// CHECK:STDOUT: %x: ref %.2 = bind_name x, %x.var +// CHECK:STDOUT: %.loc15_16: %.1 = tuple_literal () // 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 dad44adc9b70..4bbade0171da 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 @@ -20,22 +20,22 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: () = tuple_literal () +// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.var: ref () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = 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 f07b559f574c..d9908208907b 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 @@ -22,7 +22,7 @@ var y: () = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,19 +30,19 @@ var y: () = x; // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} -// CHECK:STDOUT: %.loc18_9.1: () = tuple_literal () +// 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 () = var y -// CHECK:STDOUT: %y: ref () = bind_name y, %y.var +// 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 @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref %.1 = var x +// CHECK:STDOUT: %x: ref %.1 = 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 22ceb8b823dc..4ad8ae1bbe13 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon @@ -54,21 +54,21 @@ abstract var e: (); // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_19.1: () = tuple_literal () +// 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 () = var b -// CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %.loc24_27.1: () = tuple_literal () +// 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 () = var c -// CHECK:STDOUT: %c: ref () = bind_name c, %c.var -// CHECK:STDOUT: %.loc37_29.1: () = tuple_literal () +// 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 () = var d -// CHECK:STDOUT: %d: ref () = bind_name d, %d.var -// CHECK:STDOUT: %.loc42_18.1: () = tuple_literal () +// 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 () = var e -// CHECK:STDOUT: %e: ref () = bind_name e, %e.var +// CHECK:STDOUT: %e.var: ref %.1 = var e +// CHECK:STDOUT: %e: ref %.1 = 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 a620cfe6f16c..774075da3747 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon @@ -31,7 +31,7 @@ var A: () = (); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = 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: () = tuple_literal () +// 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 () = var A -// CHECK:STDOUT: %A.loc20: ref () = bind_name A, %A.var.loc20 -// CHECK:STDOUT: %.loc28_9.1: () = tuple_literal () +// 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 () = var A -// CHECK:STDOUT: %A.loc28: ref () = bind_name A, %A.var.loc28 +// CHECK:STDOUT: %A.var.loc28: ref %.1 = var A +// CHECK:STDOUT: %A.loc28: ref %.1 = bind_name A, %A.var.loc28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc28_14.1: () = tuple_literal () -// CHECK:STDOUT: %.loc28_14.2: init () = tuple_init () to file.%A.var.loc28 [template = constants.%tuple] -// CHECK:STDOUT: %.loc28_15: init () = converted %.loc28_14.1, %.loc28_14.2 [template = constants.%tuple] +// 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: 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 e54e74a9c2d4..52703b065d83 100644 --- a/toolchain/check/testdata/var/no_prelude/global_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_decl.carbon @@ -14,17 +14,17 @@ var x: {.v: ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: ()} [template] +// CHECK:STDOUT: %.2: type = struct_type {.v: %.1} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: () = tuple_literal () +// 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: ()} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref {.v: ()} = var x -// CHECK:STDOUT: %x: ref {.v: ()} = bind_name x, %x.var +// 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: } // 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 c1c25fa410f1..7e11780910dc 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 @@ -14,31 +14,31 @@ var x: {.v: ()} = {.v = ()}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: {.v: ()} = struct_value (%tuple) [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: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: () = tuple_literal () +// 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: ()} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref {.v: ()} = var x -// CHECK:STDOUT: %x: ref {.v: ()} = bind_name x, %x.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26.1: () = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: {.v: ()} = struct_literal (%.loc11_26.1) -// CHECK:STDOUT: %.loc11_27.2: ref () = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_26.2: init () = tuple_init () to %.loc11_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.3: init () = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init {.v: ()} = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init {.v: ()} = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// 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: 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 4daa1c4c58fd..566e9c5ae64e 100644 --- a/toolchain/check/testdata/var/no_prelude/global_lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_lookup.carbon @@ -15,9 +15,9 @@ var y: {.v: ()} = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: {.v: ()} = struct_value (%tuple) [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: } // 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: () = tuple_literal () +// 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: ()} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref {.v: ()} = var x -// CHECK:STDOUT: %x: ref {.v: ()} = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_14.1: () = tuple_literal () +// 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: ()} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref {.v: ()} = var y -// CHECK:STDOUT: %y: ref {.v: ()} = bind_name y, %y.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_26.1: () = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: {.v: ()} = struct_literal (%.loc11_26.1) -// CHECK:STDOUT: %.loc11_27.2: ref () = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_26.2: init () = tuple_init () to %.loc11_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.3: init () = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init {.v: ()} = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init {.v: ()} = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// 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: assign file.%x.var, %.loc11_28 -// CHECK:STDOUT: %x.ref: ref {.v: ()} = name_ref x, file.%x -// CHECK:STDOUT: %.loc12_19.1: ref () = struct_access %x.ref, element0 -// CHECK:STDOUT: %.loc12_19.2: ref () = struct_access file.%y.var, element0 -// CHECK:STDOUT: %.loc12_19.3: init () = tuple_init () to %.loc12_19.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_19.4: init () = converted %.loc12_19.1, %.loc12_19.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_19.5: init {.v: ()} = struct_init (%.loc12_19.4) to file.%y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc12_20: init {.v: ()} = converted %x.ref, %.loc12_19.5 [template = constants.%struct] +// 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: 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 c620fa7ddc41..8cb20cf885cb 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 @@ -18,11 +18,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %.2: type = struct_type {.v: ()} [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct: {.v: ()} = struct_value (%tuple) [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: %Main.type: type = fn_type @Main [template] -// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,41 +30,41 @@ fn Main() { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: () = tuple_literal () +// 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: ()} [template = constants.%.2] -// CHECK:STDOUT: %x.var: ref {.v: ()} = var x -// CHECK:STDOUT: %x: ref {.v: ()} = bind_name x, %x.var -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// 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: %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: () = tuple_literal () +// 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: ()} [template = constants.%.2] -// CHECK:STDOUT: %y.var: ref {.v: ()} = var y -// CHECK:STDOUT: %y: ref {.v: ()} = bind_name y, %y.var -// CHECK:STDOUT: %x.ref: ref {.v: ()} = name_ref x, file.%x -// CHECK:STDOUT: %.loc14_21.1: ref () = struct_access %x.ref, element0 -// CHECK:STDOUT: %.loc14_21.2: ref () = struct_access %y.var, element0 -// CHECK:STDOUT: %.loc14_21.3: init () = tuple_init () to %.loc14_21.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21.4: init () = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21.5: init {.v: ()} = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct] -// CHECK:STDOUT: %.loc14_22: init {.v: ()} = converted %x.ref, %.loc14_21.5 [template = constants.%struct] +// 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: 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: () = tuple_literal () -// CHECK:STDOUT: %.loc11_27.1: {.v: ()} = struct_literal (%.loc11_26.1) -// CHECK:STDOUT: %.loc11_27.2: ref () = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_26.2: init () = tuple_init () to %.loc11_27.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.3: init () = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init {.v: ()} = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] -// CHECK:STDOUT: %.loc11_28: init {.v: ()} = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] +// 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: 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 352adc5fc373..91249f1f7d1e 100644 --- a/toolchain/check/testdata/var/no_prelude/import.carbon +++ b/toolchain/check/testdata/var/no_prelude/import.carbon @@ -24,24 +24,24 @@ var a: () = a_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = 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: () = tuple_literal () +// 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 () = var a_ref -// CHECK:STDOUT: %a_ref: ref () = bind_name a_ref, %a_ref.var +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_18.1: () = tuple_literal () -// CHECK:STDOUT: %.loc4_18.2: init () = tuple_init () to file.%a_ref.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_19: init () = converted %.loc4_18.1, %.loc4_18.2 [template = constants.%tuple] +// 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: assign file.%a_ref.var, %.loc4_19 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -50,7 +50,7 @@ var a: () = a_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -58,18 +58,18 @@ var a: () = a_ref; // CHECK:STDOUT: .a_ref = %import_ref // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: ref () = import_ref ir0, inst+5, loaded -// CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () +// CHECK:STDOUT: %import_ref: ref %.1 = import_ref ir0, inst+5, loaded +// 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 () = var a -// CHECK:STDOUT: %a: ref () = bind_name a, %a.var +// 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 @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref () = name_ref a_ref, file.%import_ref -// CHECK:STDOUT: %.loc4_13: init () = tuple_init () to file.%a.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_18: init () = converted %a_ref.ref, %.loc4_13 [template = constants.%tuple] +// CHECK:STDOUT: %a_ref.ref: ref %.1 = name_ref a_ref, file.%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: 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 8542bcad2d34..6565f51a8935 100644 --- a/toolchain/check/testdata/var/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/var/no_prelude/import_access.carbon @@ -59,24 +59,24 @@ var v2: () = Test.v; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %tuple: %.1 = 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: () = tuple_literal () +// 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 () = var v -// CHECK:STDOUT: %v: ref () = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref %.1 = var v +// CHECK:STDOUT: %v: ref %.1 = bind_name v, %v.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_22.1: () = tuple_literal () -// CHECK:STDOUT: %.loc4_22.2: init () = tuple_init () to file.%v.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc4_23: init () = converted %.loc4_22.1, %.loc4_22.2 [template = constants.%tuple] +// 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: assign file.%v.var, %.loc4_23 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -91,10 +91,10 @@ var v2: () = Test.v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_10.1: () = tuple_literal () +// 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: %v2.var: ref () = var v2 -// CHECK:STDOUT: %v2: ref () = bind_name v2, %v2.var +// CHECK:STDOUT: %v2.var: ref %.1 = var v2 +// CHECK:STDOUT: %v2: ref %.1 = bind_name v2, %v2.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -114,10 +114,10 @@ var v2: () = Test.v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_10.1: () = tuple_literal () +// 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 () = var v2 -// CHECK:STDOUT: %v2: ref () = bind_name v2, %v2.var +// CHECK:STDOUT: %v2.var: ref %.1 = var v2 +// CHECK:STDOUT: %v2: ref %.1 = bind_name v2, %v2.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -139,10 +139,10 @@ var v2: () = Test.v; // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %.loc9_10.1: () = tuple_literal () +// 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 () = var v2 -// CHECK:STDOUT: %v2: ref () = bind_name v2, %v2.var +// CHECK:STDOUT: %v2.var: ref %.1 = var v2 +// CHECK:STDOUT: %v2: ref %.1 = 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 cacce47dd079..6f30443b25cb 100644 --- a/toolchain/check/testdata/var/no_prelude/lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/lookup.carbon @@ -18,28 +18,28 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x: ref () = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc12_16.2: init () = tuple_init () to %x.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc12_17: init () = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%tuple] +// 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: assign %x.var, %.loc12_17 -// CHECK:STDOUT: %x.ref: ref () = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref %.1 = 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 8f51c066cbf3..5a4c93f7a608 100644 --- a/toolchain/check/testdata/var/no_prelude/shadowing.carbon +++ b/toolchain/check/testdata/var/no_prelude/shadowing.carbon @@ -28,8 +28,8 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Main: = struct_value () [template] -// CHECK:STDOUT: %tuple: () = tuple_value () [template] +// CHECK:STDOUT: %Main: %Main.type = struct_value () [template] +// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,48 +39,48 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NS: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_12.1: () = tuple_literal () +// 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 () = var NS -// CHECK:STDOUT: %NS: ref () = bind_name NS, %NS.var -// CHECK:STDOUT: %.loc14_17.1: () = tuple_literal () -// CHECK:STDOUT: %.loc14_17.2: init () = tuple_init () to %NS.var [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_18: init () = converted %.loc14_17.1, %.loc14_17.2 [template = constants.%tuple] +// 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: assign %NS.var, %.loc14_18 -// CHECK:STDOUT: %NS.ref: ref () = name_ref NS, %NS -// CHECK:STDOUT: %.loc15_9.1: () = tuple_literal () -// CHECK:STDOUT: %.loc15_9.2: init () = tuple_init () to %NS.ref [template = constants.%tuple] -// CHECK:STDOUT: %.loc15_6: init () = converted %.loc15_9.1, %.loc15_9.2 [template = constants.%tuple] +// 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: assign %NS.ref, %.loc15_6 -// CHECK:STDOUT: %.loc17_11.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x.loc17: ref () = bind_name x, %x.var.loc17 -// CHECK:STDOUT: %.loc17_16.1: () = tuple_literal () -// CHECK:STDOUT: %.loc17_16.2: init () = tuple_init () to %x.var.loc17 [template = constants.%tuple] -// CHECK:STDOUT: %.loc17_17: init () = converted %.loc17_16.1, %.loc17_16.2 [template = constants.%tuple] +// 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: assign %x.var.loc17, %.loc17_17 // CHECK:STDOUT: %.loc18: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: if %.loc18 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc19_13.1: () = tuple_literal () +// 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 () = var x -// CHECK:STDOUT: %x.loc19: ref () = bind_name x, %x.var.loc19 -// CHECK:STDOUT: %.loc19_18.1: () = tuple_literal () -// CHECK:STDOUT: %.loc19_18.2: init () = tuple_init () to %x.var.loc19 [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_19: init () = converted %.loc19_18.1, %.loc19_18.2 [template = constants.%tuple] +// 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: assign %x.var.loc19, %.loc19_19 -// CHECK:STDOUT: %x.ref: ref () = name_ref x, %x.loc19 -// CHECK:STDOUT: %.loc22_10.1: () = tuple_literal () -// CHECK:STDOUT: %.loc22_10.2: init () = tuple_init () to %x.ref [template = constants.%tuple] -// CHECK:STDOUT: %.loc22_7: init () = converted %.loc22_10.1, %.loc22_10.2 [template = constants.%tuple] +// 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: assign %x.ref, %.loc22_7 // CHECK:STDOUT: br !if.else // CHECK:STDOUT: diff --git a/toolchain/check/testdata/while/break_continue.carbon b/toolchain/check/testdata/while/break_continue.carbon index bbe074cfc1d7..354ae9c11b17 100644 --- a/toolchain/check/testdata/while/break_continue.carbon +++ b/toolchain/check/testdata/while/break_continue.carbon @@ -35,25 +35,25 @@ fn While() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] -// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] -// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] -// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] -// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] -// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %While.type: type = fn_type @While [template] -// CHECK:STDOUT: %While: = struct_value () [template] +// CHECK:STDOUT: %While: %While.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -70,63 +70,63 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: @A.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type.loc12, %.loc12_11.1 [template = bool] // CHECK:STDOUT: @B.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %import_ref.3: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %bool.make_type.loc13 [template = bool] // CHECK:STDOUT: %.loc13_11.2: type = converted %bool.make_type.loc13, %.loc13_11.1 [template = bool] // CHECK:STDOUT: @C.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] { +// CHECK:STDOUT: %import_ref.4: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] { // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_11.2: type = converted %bool.make_type.loc14, %.loc14_11.1 [template = bool] // CHECK:STDOUT: @D.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] { +// CHECK:STDOUT: %import_ref.5: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] { // CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_11.2: type = converted %bool.make_type.loc15, %.loc15_11.1 [template = bool] // CHECK:STDOUT: @E.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %import_ref.6: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_11.2: type = converted %bool.make_type.loc16, %.loc16_11.1 [template = bool] // CHECK:STDOUT: @F.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %import_ref.7: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_11.2: type = converted %bool.make_type.loc17, %.loc17_11.1 [template = bool] // CHECK:STDOUT: @G.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %import_ref.8: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_11.2: type = converted %bool.make_type.loc18, %.loc18_11.1 [template = bool] // CHECK:STDOUT: @H.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} +// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -152,14 +152,14 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !while.cond.loc21: -// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init bool = call %A.ref() // CHECK:STDOUT: %.loc21_13.1: bool = value_of_initializer %A.call // CHECK:STDOUT: %.loc21_13.2: bool = converted %A.call, %.loc21_13.1 // CHECK:STDOUT: if %.loc21_13.2 br !while.body.loc21 else br !while.done.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !while.body.loc21: -// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init bool = call %B.ref() // CHECK:STDOUT: %.loc22_12.1: bool = value_of_initializer %B.call // CHECK:STDOUT: %.loc22_12.2: bool = converted %B.call, %.loc22_12.1 @@ -169,7 +169,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc22: -// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.call: init bool = call %C.ref() // CHECK:STDOUT: %.loc23_12.1: bool = value_of_initializer %C.call // CHECK:STDOUT: %.loc23_12.2: bool = converted %C.call, %.loc23_12.1 @@ -182,14 +182,14 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !while.cond.loc24: -// CHECK:STDOUT: %D.ref: = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %D.call: init bool = call %D.ref() // CHECK:STDOUT: %.loc24_15.1: bool = value_of_initializer %D.call // CHECK:STDOUT: %.loc24_15.2: bool = converted %D.call, %.loc24_15.1 // CHECK:STDOUT: if %.loc24_15.2 br !while.body.loc24 else br !while.done.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !while.body.loc24: -// CHECK:STDOUT: %E.ref: = name_ref E, file.%E.decl [template = constants.%E] +// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %E.call: init bool = call %E.ref() // CHECK:STDOUT: %.loc25_14.1: bool = value_of_initializer %E.call // CHECK:STDOUT: %.loc25_14.2: bool = converted %E.call, %.loc25_14.1 @@ -199,7 +199,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc25: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc26_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc26_14.2: bool = converted %F.call, %.loc26_14.1 @@ -212,7 +212,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !while.done.loc24: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init bool = call %G.ref() // CHECK:STDOUT: %.loc28_12.1: bool = value_of_initializer %G.call // CHECK:STDOUT: %.loc28_12.2: bool = converted %G.call, %.loc28_12.1 @@ -222,7 +222,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc28: -// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] +// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init bool = call %H.ref() // CHECK:STDOUT: %.loc29_12.1: bool = value_of_initializer %H.call // CHECK:STDOUT: %.loc29_12.2: bool = converted %H.call, %.loc29_12.1 diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index b9d3ac8ec4b2..1adfdf39a6b4 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -20,7 +20,7 @@ fn While() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %While.type: type = fn_type @While [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %While: = struct_value () [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: } @@ -31,7 +31,7 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} +// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { diff --git a/toolchain/check/testdata/while/fail_break_continue.carbon b/toolchain/check/testdata/while/fail_break_continue.carbon index 27f24fbcb004..676bfbb7c248 100644 --- a/toolchain/check/testdata/while/fail_break_continue.carbon +++ b/toolchain/check/testdata/while/fail_break_continue.carbon @@ -39,7 +39,7 @@ fn While() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %While.type: type = fn_type @While [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %While: = struct_value () [template] +// CHECK:STDOUT: %While: %While.type = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -49,7 +49,7 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} +// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { diff --git a/toolchain/check/testdata/while/unreachable_end.carbon b/toolchain/check/testdata/while/unreachable_end.carbon index 9785d80f113a..bc3d35029d48 100644 --- a/toolchain/check/testdata/while/unreachable_end.carbon +++ b/toolchain/check/testdata/while/unreachable_end.carbon @@ -28,17 +28,17 @@ fn While() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template] -// CHECK:STDOUT: %Cond: = struct_value () [template] +// CHECK:STDOUT: %Cond: %Cond.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %While.type: type = fn_type @While [template] -// CHECK:STDOUT: %While: = struct_value () [template] +// CHECK:STDOUT: %While: %While.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,17 +51,17 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Cond.decl: = fn_decl @Cond [template = constants.%Cond] { +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Cond.decl: %Cond.type = fn_decl @Cond [template = constants.%Cond] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [template = bool] // CHECK:STDOUT: @Cond.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} -// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} +// 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: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -76,25 +76,25 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: -// CHECK:STDOUT: %Cond.ref: = name_ref Cond, file.%Cond.decl [template = constants.%Cond] +// CHECK:STDOUT: %Cond.ref: %Cond.type = name_ref Cond, file.%Cond.decl [template = constants.%Cond] // CHECK:STDOUT: %Cond.call: init bool = call %Cond.ref() // CHECK:STDOUT: %.loc19_16.1: bool = value_of_initializer %Cond.call // CHECK:STDOUT: %.loc19_16.2: bool = converted %Cond.call, %.loc19_16.1 // CHECK:STDOUT: if %.loc19_16.2 br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init () = call %G.ref() +// 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: return // CHECK:STDOUT: // CHECK:STDOUT: !while.done: -// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init () = call %H.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/while/while.carbon b/toolchain/check/testdata/while/while.carbon index 1fc5c5c6e01b..7a99b0fa5102 100644 --- a/toolchain/check/testdata/while/while.carbon +++ b/toolchain/check/testdata/while/while.carbon @@ -27,17 +27,17 @@ fn While() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template] -// CHECK:STDOUT: %Cond: = struct_value () [template] +// CHECK:STDOUT: %Cond: %Cond.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] -// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] -// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] -// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %While.type: type = fn_type @While [template] -// CHECK:STDOUT: %While: = struct_value () [template] +// CHECK:STDOUT: %While: %While.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,17 +50,17 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] -// CHECK:STDOUT: %Cond.decl: = fn_decl @Cond [template = constants.%Cond] { +// CHECK:STDOUT: %import_ref: %Bool.type = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Cond.decl: %Cond.type = fn_decl @Cond [template = constants.%Cond] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [template = bool] // CHECK:STDOUT: @Cond.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} -// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} -// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} -// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} +// 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: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -75,25 +75,25 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %F.call: init () = call %F.ref() +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] +// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: -// CHECK:STDOUT: %Cond.ref: = name_ref Cond, file.%Cond.decl [template = constants.%Cond] +// CHECK:STDOUT: %Cond.ref: %Cond.type = name_ref Cond, file.%Cond.decl [template = constants.%Cond] // CHECK:STDOUT: %Cond.call: init bool = call %Cond.ref() // CHECK:STDOUT: %.loc19_16.1: bool = value_of_initializer %Cond.call // CHECK:STDOUT: %.loc19_16.2: bool = converted %Cond.call, %.loc19_16.1 // CHECK:STDOUT: if %.loc19_16.2 br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: -// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %G.call: init () = call %G.ref() +// 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: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.done: -// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] -// CHECK:STDOUT: %H.call: init () = call %H.ref() +// 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: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index fcbf24661328..fe89a54c7087 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -829,7 +829,10 @@ class Formatter { if (!id.is_valid()) { out_ << "invalid"; } else { - out_ << sem_ir_.StringifyType(id); + // Types are formatted in the `constants` scope because they only refer to + // constants. + llvm::SaveAndRestore file_scope(scope_, InstNamer::ScopeId::Constants); + FormatInstName(sem_ir_.types().GetInstId(id)); } }